How do you integrate MSTest and MSBuild results into specifically CruiseControl 2.8.4. I've read documentation online, but it seems to be outdated and not in line with how the later versions of cruisecontrol work.
Any suggestions?
Related
I've written tests using Selenium in NUnit Framework using C# language. I want to associate these tests as part of builds in the TFS. So whenever new build is generated. These tests would be able to run as part of builds and generate/email reports as well.
Recommend you to use the new build system vNext build. vNext builds are JSON based, and you can plugin tasks built in msbuild, powershell and varied other scripting languages.
About how to integrate NUnit Tests in TFS builds, this blog describes clearly how to do this: Running NUnit Tests in a TFS 2015 Build vNext
Simply summarized as follows:
Add Nuget Package for NUnit Test Adapter
Specify path of custom Test Adapter inside build definition
Copying adapters inside Visual Studio TestWindows folder
Specify Path to Custom Test Adapter with nunit packages
Some other tutorial for you reference:
xUnit or NUnit with Visual Studio Online Build
Running nUnit and Jasmine.JS unit tests in TFS/VSO vNext build
Is it possible to run tests written in Concordion.Net using some form of Visual Studio addin? I am looking to start using Concordion.Net. However, I was used to running tests from Visual Studio directly through the Resharper plugin. Since Concordion.Net is a different concept, and uses HTML files to 'specify' the tests, one cannot use the Resharper plugin.
You can run them using the nUnit GUI, but it is a bit of a pain to use it and slow.
You can use TestDriven.NET (http://testdriven.net/) to execute Concordion.NET tests within Visual Studio. To run a test please use the "Run Test(s)" command of TestDriven.NET on your Concordion.NET fixture class (http://testdriven.net/quickstart.aspx).
Please, make sure that you have specified the [assembly: RequiredAddin("ConcordionNUnitAddin")] attribute in the AssemblyInfo.cs of your specification project as described in the how to "Run Concordion.NET Tests with NUnit" (http://concordion.org/dotnet/RunningTests.html).
When you run Concordion.NET tests with TestDriven.NET in Visual Studio, you should see an output similar to:
“------ Test started: Assembly: Concordion.Spec.dll ------
Processed specifications : C:\Users\myuser\AppData\Local\Temp\Concordion\Spec\Concordion\Command\AssertEquals\NonString\Boolean.html
1 passed, 0 failed, 0 skipped, took 0,67 seconds (NUnit 2.6.2).”
To be able to run Concordion.NET tests with TestDriven.NET you have to install the Concordion.NUnit.dll into the installation directory of TestDriven.NET (C:\Program Files (x86)\TestDriven.NET\NUnit\2.6\addins\Concordion.NUnit.dll).
Concordion.NET tests can be run with the help of NUnit (http://concordion.org/dotnet/RunningTests.html) based on the Concordion NUnit addin. When NUnit discovers a class containing Concordion.NET fixture code annotated with [ConcordionTest], the Concordion.NUnit addin loads the related HTML specification document and creates a test instance that is executed with the help of NUnit.
Unfortunatelly, ReSharper uses a different mechanism to find tests than NUnit(http://confluence.jetbrains.com/display/NETCOM/4.09+Test+Framework+Support+%28R8%29). Thus, it would be necessary to write a ReSharper plugin to recognize classes annotated with [ConcordionTest] and use the ReSharper NUnit support to execute them. NUnit 3.0 will probably comply with interfaces consumed by ReSharper.
On the other Hand, the current version of the NUnit Adapter for Visual Studio (http://nunit.org/index.php?p=vsTestAdapter&r=2.6.2) is not able to load NUnit addins appropriately. An update of NUnit is necessary, which is planned for NUnit 3.0 (https://github.com/nunit/nunit-vs-adapter/issues/9).
To run Concordion.NET tests in Visual Studio you can use TestDriven.NET as described above.
I am trying to convert a build system setup with TeamCity and Nant scripts to use TFS2010 (We bought the license and might just as well make use of it) After some work I get the web project to build and deploy to the web-server. We have a domain, API, test and web project in our solution.
How do I configure TFS to run the unit tests that we have written so far? I did configure the build to look for ***.UnitTest.dll in(VS2010) Edit build definition>Process>Automated Tests
Now the build fails with a message that says:"Could not load file or assembly 'nunit.framework, Version=2.5.3.9345" Am I correct when I say that TFS is trying to run NUnit on the build server? I did install NUnit-2.5.3.9345 on that TFS2010 build server and still nothing?
Thank you
Jack
The build facility in TFS uses MSTest as test runner, with which it's tightly integrated.
If you want to run your unit tests with NUnit as part of your build, take a look at the NUnit for Team Build project on CodePlex.
The project started out for TFS 2008, however support for TFS 2010 has been added in version 2.0. Note that this feature is still in early stages of development, so your mileage may vary.
I'm late to the game, because I've had to deal with this issue recently. I found this article helpful for me in this. It didn't work right off the bat, but I found if I added it into my buildscript via the controls in a similar manner/pattern, it would work.
My only problem now has been getting it to actually error (right now it warns) even when flagging them to cause the build to error
Link: http://blog.gfader.com/2011/06/running-nunit-tests-in-tfs-2010.html
We were using nant for building our project (10+Class Lib) and a Web Site which was based on the ASP.NET 2.0. Recently we are in the process of moving towards the ASP.NET 3.5. I searched in the net and found that nant doesn't support 3.5.
I am also looking in to option of migrating MSBuild.
Is the MS Build right candidate for this?
I heard people saying that MSBuild is slow? is it True?
With MS Build can I have a Single step build ? in nant all I will do is to call nant.ext and give a build file it will do a build and give me the output.
NAnt can easily be made to support .NET 3.5 - we use it here. Rather than claim credit, check this blog post.
Have a look at the Nant Site
.net Framework 3.5 is supported
In MsBuild you can have a single step build. Nant can be used with .Net 3.5 but is always behind the times (.Net 4.0 is soon to be shipped). Nant .86 beta1 has issues with x64 Windows Server 2003 (You will need to use a nightly build). I have used both and prefer MsBuild. For more details check out an older blog post I wrote Nant vs MsBuild
I'm pretty new with TeamCity but have 2-3 years experience with CC.NET-t. I'm familiar with MSBuild but maybe TeamCity has other ways to build things.
I see that TeamCity has a nice UI and great plug-in framework. But I have no idea how can I configure an installer package build.
My questions:
I've checked out the source and built the artifacts (some dll and exe). There is no problem, but
how can I create a zip package "on TeamCity way"? (Project/artifact dependency?)
how can I create a NSIS installer "on TeamCity way"?
Can I download plugins or tutorials? Or I have no other choice just MSBuild?
There are some build runner plugins for TeamCity and you can roll your own but I believe the "TeamCity way" is to do that in your build script... since it's a build server right?
And you might want to check out the MSBuild Extension Pack which has a lot of nice-to-haves stuffs like zipping and registry access and whatnot... which will definitely help with those zip and nsis task.
You probably will need to do this using your own handwritten build scripts.
MsBuild or NAnt will probably offer the best options for you.
If you use MsBuild you probably want to look at Msbuild community tasks.
Hope this helps