Django selenium (StaticLiverServerTestCase): tests run together fail but pass if run individually

17 views
Skip to first unread message

Jérôme Le Carrou

unread,
Mar 30, 2022, 6:09:36 AM3/30/22
to Django users

write tests with StaticLiverServerTestCase for my Django application.

My issue: tests runs together fail while pass when run individually.

I have read much about this behavior on SO but none of answer/comments help.

It seems that issue may come from shared files/fields/data.

I have tried using setUpClass/tearDownClass class methods as well as setUp/tearDown methods.

Using fixture did not resolve anymore.

I also tryed to make individual class for each test instead of one class with many test ethods but doesn't work anymore.

My tests involve Ajax calls and I think this is related.


You can see code in SO: https://stackoverflow.com/questions/71674587/django-selenium-staticliverservertestcase-tests-run-together-fail-but-pass-if

Reply all
Reply to author
Forward
0 new messages