tags:

views:

94

answers:

1

I am testing a django application's frontend with selenium and that's first time I use it. I have multiple tests that test things after user logged in.

I want them to be separate tests, but I want to have only log in once, is that possible? (As oppose to what I do right now: I log in first, then execute my testing actions of test1, then log in again and execute my testing actions for test2, etc.)

A: 

Basically, you want to keep the selenium = New DefaultSelenium(...) out of your tests and move it into some common setup code. You could have selenium be a class memeber that only gets initialized one time, and then is reused in all of the tests in that class.

See: http://stackoverflow.com/questions/714792/selenium-testing-any-way-to-speed-up-the-selenium-server-load-time/714880#714880

Tom E