TestStack / TestStack.Seleno

Seleno helps you write automated UI tests in the right way by implementing Page Objects and Page Components and by reading from and writing to web pages using strongly typed view models.
http://teststack.github.com/TestStack.Seleno/
MIT License
180 stars 60 forks source link

(Help) Test sometimes asserts before pageload is done when running on Team City #217

Open kjohann opened 9 years ago

kjohann commented 9 years ago

I have setup a POC for running UI tests on Team City using Seleno. For now it contains one single test that simply signs in to our application through a controller action, which in turn redirects to the "Homepage". The test should then proceed with asserting that the title of the page is what i expect. Mostly this works, but sometimes the test fails, claiming that the Title is null. When reviewing the build log, I see the normal output of IIS Express being started:

[17:21:10][Step 8/8] Starting IIS Express ... [17:21:13][Step 8/8] Successfully registered URL "http://localhost:1901/"; for site "Development Web Site" application "/" [17:21:13][Step 8/8] Registration completed [17:21:13][Step 8/8] IIS Express is running.

However, insted of seeing the normal "Request started: 'GET' ..." etc. It jumps straight to assertion which then fails. It seems to be random when the test is successful and when it isn't. We have three build agents, all with equal configuration (all running in Azure).

Any ideas on what could possibly cause this would be much appriciated.