Tuesday, 13 March 2012

SP2010 Continuous Integration–pt 6:Running UI tests as part of a build

The 6th article in our CI with SharePoint 2010 and TFS series is now live on the official SharePoint Developer blog (as mentioned on Twitter last week) – see Running Tests as Part of a Build. It took a while to write, and it took a while to publish (you’d think Mike Morton and his colleagues had actual products to ship or something) but it’s there now.

The article shows how to integrate tests into a build, particularly user interface tests via Visual Studio 2010’s Coded UI Tests. After all, if you’re going to continually check that what you’re putting together works, usually you’ll want to go beyond simply checking that it builds and deploys. You might choose to run unit tests, integration tests or UI tests (or most likely a combination), but UI tests seemed like a good place to start since they can slot into a build very easily.

As a side-note, running integration tests (unit tests which call the SharePoint API) within a build is not so straightforward (but pure unit tests can be done). I might discuss this in a future post.

Links:

TestSubscribeRibbon_RecordSteps

 

CodedUI_RunTest_Results

No comments: