Search code examples
.netseleniummstesttfsbuildfunctional-testing

TFSBuild, execute Selenium UI Tests on being built code before deploy


I've a set of Selenium tests using the C# WebDriver and MSTest (Visual Studio Test).

Hopefully, I could integrate these tests successfully and they're working as expected.

Sadly, I found a big problem: the automated UI tests are executed against the previously deployed solution, so if previous build was successful, the test run will pass, and a bugged deploy can happen.

Perhaps I can have a different Web site to pre-deploy the solution before the tests are executed, something like http://test.mydomain.com and execute the UI tests against this, and if nothing goes wrong with the test run, then the same site could be deployed to the production Web site.

In summary, do you know any other better approach for solving this problem?

Thank you in advance.


Solution

  • Yes, that is an excellent solution, and one which is in common use. Depending on exactly what you use the pre-deploy server for and how it fits into your overall development/deployment process, you might refer to it as a test server or staging server.