I have an ASP.NET website that I want to test with Selenium. I want to configure a Jenkins instance on an "intermediate" virtual machine to run tests automatically.
The problem is that the tests run very slowly - several times slower than on my development machine. One simple test can take more than 2-3 minutes.
I would like to know whether to expect this if there are any obvious errors for such a test setup as mine, and if something I can do to profile and improve the performance of the test suite.
Tests are performed on a 2.7 GHz Ram RAM virtual machine with Windows 7 64 bit. My Dev machine is similar, but with a 32-bit installation of Win.
Jenkins does the following:
The selenium project uses NUnit and WebRunner. Driver instances are created once - before all tests in the [SetUp] attribute inside the [SetUpFixture] class. They are deleted once in the class [TearDown] attribute.
An example test is as follows:
[Test, Combinatorial] public void AnExistingUserCanLogin( [ValueSource(typeof(Drivers), "Good")] IWebDriver driver) { // This function clicks on some buttons and fills in some forms. LoginUser(driver); // Make sure the user is now logged in Assert.IsTrue(driver.ElementIsPresent(By.ClassName("imgUserAvatar"))); Assert.IsTrue(driver.ElementIsPresent(By.CssSelector("a.my-profile"))); Assert.IsTrue(driver.ElementIsPresent(By.CssSelector("a.logout"))); }
( "" lazily- webdriver FF, IE, Chrome. , "" )
, , , , . ? Windows (- ). Vista, Windows 7 Server 2003.
, , , 64- , 32- . , - , , , . duh, , , . , , .
, , , . IE8 IE9 selenium . , , , . , Chrome (, , , -).
, . , , .
, , , , . , . , , . , , , VM .
!