This blog demonstrates
step by step how to add unit test task in TFS build definition and run unit
test from TFS build so that code only be deployed once all unit test are
passed.
Here is TFS
Build definition
TFS Build Definition |
In TFS Build Definition,
the following steps are defined
1.
Get
source code from specified branch
2.
Set
assembly manifest data
3.
Build
Source Code
4.
Publish
the artifact of Built Source to respective staging folder
Now we want
to add Unit Test Task in TFS build definition so that we can able to run unit
test from TFS build.
Microsoft
provides Visual Studio Test Task
which help us to run test with visual studio test runner from TFS build.
By using this
Visual Studio Test in a build or
release pipeline, we can also run functional tests (Selenium, Coded UI Tests
and more) using the Visual Studio Test Runner
Add Visual Studio Task:
No comments:
Post a Comment