+1 vote
1 view
in DevOps and Agile by (19.8k points)

By design, Selenium makes a new copy of your Firefox profile each time a new test is run. I find this copy time is a considerable bottleneck, especially when running 100s of tests. (5-15 seconds to copy the profile a new).

Does anyone know of any overridden behaviour for this? I'd prefer my Selenium server to just reuse the same firefox profile. I know this violates the "cleanly set up your test fixtures" philosophy, but it's a shortcut I'm willing to take, as my tests don't materially alter my firefox profile enough to jeopardize future tests.

1 Answer

0 votes
by (63.4k points)

It's merely a matter of moving the code below outside of your test setup and into the fixture setup and keeping a global of selenium instance (code assumes NUnit.)

[TestFixtureSetUp()] public void FixtureSetup() {

selenium = New DefaultSelenium("localhost", 4444, "*firefox", "http://localhost/");





Your test setup should then look something like this:

[SetUp()] public void SetUpTest() { selenium.Open("default.aspx"); selenium.WaitForPageToLoad("30000"); }

Welcome to Intellipaat Community. Get your technical queries answered by top developers !