livserver never loading the fixture data #8

Closed
chris-hireiq opened this Issue Aug 10, 2011 · 4 comments

Comments

Projects
None yet
3 participants
@chris-hireiq

We've got django-nose-selenium so close to working properly.

Really, everything works except for the loading of the test sqlite data for use by CherryPy. We determined that the default :memory: database was no good, so we're forcing sqlite to use a file.

However, it doesn't appear that the selenium_fixtures data gets loaded properly. Actually, we can get the test data to load and be visible to the actual selenium webdriver script, but the process running CherryPy can't seem to see that data when we go to perform operations against it.

Besides the selenium_fixtures configuration, is there anything else we need to do to get this working?

@chris-hireiq

This comment has been minimized.

Show comment
Hide comment
@chris-hireiq

chris-hireiq Aug 11, 2011

We worked around this issue, but it would be great if the documentation and plugin assisted with these problems.

  1. SQLITE had an issue with using the default :memory: database for testing. CherryPy can't use that same database populated by the fixture populating mechanism. You need to set the TEST_NAME for the test database to an actual file in your settings.py.
  2. Additionally, you MUST use the Django TransactionTestCase as the base class for your Selenium test cases or else the initial fixture data is never persisted. Once you do that, there doesn't seem to be a point to using the selenium_fixtures parameter vs the regular fixtures one (although I didn't experiment too much to determine the differences).

We worked around this issue, but it would be great if the documentation and plugin assisted with these problems.

  1. SQLITE had an issue with using the default :memory: database for testing. CherryPy can't use that same database populated by the fixture populating mechanism. You need to set the TEST_NAME for the test database to an actual file in your settings.py.
  2. Additionally, you MUST use the Django TransactionTestCase as the base class for your Selenium test cases or else the initial fixture data is never persisted. Once you do that, there doesn't seem to be a point to using the selenium_fixtures parameter vs the regular fixtures one (although I didn't experiment too much to determine the differences).

@ghost ghost assigned passy Aug 17, 2011

@cpbotha

This comment has been minimized.

Show comment
Hide comment
@cpbotha

cpbotha Aug 27, 2011

Thank you thank you thank you! I've been fighting for hours first with django-nose-selenium, then with django-sane-testing and now with django-nose-selinum again. Your tip on setting TEST_NAME to a real sqlite3 filename got everything working, in my case with a selenium_fixture. I did NOT need to use the TransactionTestCase.

Thanks again,
Charl

P.S. I'll be writing a full blog post documenting how to set this beast up. It's cost far too much time.

cpbotha commented Aug 27, 2011

Thank you thank you thank you! I've been fighting for hours first with django-nose-selenium, then with django-sane-testing and now with django-nose-selinum again. Your tip on setting TEST_NAME to a real sqlite3 filename got everything working, in my case with a selenium_fixture. I did NOT need to use the TransactionTestCase.

Thanks again,
Charl

P.S. I'll be writing a full blog post documenting how to set this beast up. It's cost far too much time.

@cpbotha

This comment has been minimized.

Show comment
Hide comment
@passy

This comment has been minimized.

Show comment
Hide comment
@passy

passy Aug 29, 2011

Member

Awesome! I'm going to add a link to the README.

Thanks a lot!

Member

passy commented Aug 29, 2011

Awesome! I'm going to add a link to the README.

Thanks a lot!

@passy passy closed this Aug 29, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment