Jenkins + GitHub, MSBuild, MSTest (and SpecFlow)

After experimenting with SpecFlow a bit, now I want to try and run the tests automatically with Jenkins. It turns out it was incredibly easy. Really there are just 4 straight forward steps, which I think are best explained with screenshots.

1. Install Jenkins

Easiest way to do this is with Chocolatey.

cinst Jenkins

2. Install Plugins

I installed the GIT, MSTest and MSBuild Plugins.


3. Configure Global Settings

I had to set the paths for MStest and MSBuild.


4. Configure my project

This is a very straight forward project. It gets the latest source from GIT, builds it with MSBuild and then runs MSTest. The tests are actually written with SpecFlow, but they are compiled and ran as standard MSTests.



Final Thoughts

I realize my computer has Visual Studio, .Net and everything else I already need setup. Normally on a build server you have to install all of that from scratch. Running MSTest without Visual Studio is a bit of a pain too. MS must figure that people will be running their tests from Team System. Overall, I’m really impressed with Jenkins. It takes no time to get an automated build running with no previous experience.

This entry was posted in .Net, C# and tagged , , . Bookmark the permalink.

1 Response to Jenkins + GitHub, MSBuild, MSTest (and SpecFlow)

  1. Suren says:

    thanks for the article, really helped me to setup Jenkins with MSBuild. Good work!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s