简体   繁体   中英

UI Testing Framework + Continuous Integration?

So I have an application that I inherited and I want to build up an automated test suite around it. The application wasn't designed with testability in mind, and the code is a "big ball of mud". My plan was to use a UI Automation testing framework and create a suite of tests at the UI level until I had enough coverage to allow me to start refactoring with confidence and introducing some seams into the code to improve testability and design.

It's a .Net WinForms application, and the two frameworks I'm aware of are:

NUnitForms

and

Project White

From what I've read both frameworks pose issues when trying to run as part of an automated build (Continuous Integration) due to the fact that most CI products run as a Windows Service and if the UI uses modal dialogs the application will die a horrible death. I'm using CruiseControl.Net as my CI tool.

Does anybody have any suggestions to work around this issue? An alternative framework to use that may make the situation better?

Thanks,

Dylan

You can actually run cruise control via the console app so it can have interactive desktop access. It won't recover automatically if the server is rebooted or it crashes, but at least you can do it.

That said, the approach most people take with automated UI testing (winforms, wpf or web) is to run all the non-interactive tests via the build server. Once those tests pass, then they deploy the application to a test environment and manually trigger a test run against the newly built version of the code.

This gives people the chance to reset the test environment (important for UI testing) as well as check that he new version of the application was built correctly and that all unit tests passed. After all, there's no point running the UI tests if you know the unit tests fell over. :-)

我还没有尝试过,但微软的UI自动化框架

We ran the continuous integration acceptance tests in console mode instead of as a Windows service within a logged in Virtual PC. That worked for us.

Take a look at this approach . There is detailed information in the project's wiki .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM