How to configure the MStest with the CruiseControl - msbuild

I have cruise control setup with the Nunit test embedded and it works fine,however now I want to use the MSTest project and its result, Please advice me over the same.
Please forgive me for this small and silly question.
Thanks
Praveen

This topic may help you a lot : Integrating MSTest with Cruise control for multiple projects
From the question, you can follow this tuto : http://www.codeproject.com/KB/tips/VSTS2008_Tests_With_CCNET.aspx?display=Print
if you want to compare mstest to nunit you can check this topic : NUnit vs Visual Studio 2010's MSTest?
Edit : Maslow's answer in this topic may greatly helps you as well. make ccnet self test

Related

Gendarme integration with visual studio 2010 premium

I am new to using Gendarme. I downloaded this version of the tool (Gendarme 2.11 (unsupported build - Win32 - Requires .NET Framework 4.0)) from https://github.com/spouliot/gendarme/downloads and it worked fine as an independent app. But I want to integrate it with my VS2010 Premium. After lot of search I found that this (https://github.com/unintelligible/GendarmeMsBuild) is the only wrapper that serves my purpose. I did what has been mentioned there to integrate it with VS but I did not see any code review suggestion from the tool i.e. no output from the tool. I tried to integrate it only to VS and did not try for MSBuild yet.
What is it that I might be doing wrong? Anyone please?
I am also open to the idea of integrating Gendarme to VS and MSBuild by some other way too if it works.
Thanks in advance!

ShimNotSupportedException when running tests from MSTest or Resharper

I am currently working with Microsoft Visual Studio 2012 and the new Fakes framework. And after adding my unit tests to the MSBuild and continuous integration process, the Fakes unit tests happen to raise a ShimNotSupportedException.
I tried different stuff and read into that issue and found out that, this only happens when I run my tests from the Resharper feature, or directly in the code with MSTest. These exceptions DO NOT occur when running from the Test menu bar, which made me think about checking the setting files of this features.
After further research I found some articles where it says that it might has something to do with the code coverage setting specified in the Resharper or MSTest settings and if you switch that off, it solves the issue. ShimNotSupportedException in MS VisualStudio 2012 also relates to that problem.
I also found some input on the MSDN about that issue, which confirmed me that it has to do something with the code coverage: http://social.msdn.microsoft.com/Forums/en-US/vstest/thread/17fcfdc6-1cda-4692-a242-656b48195327/ and http://social.msdn.microsoft.com/Forums/en-US/vstest/thread/bfa792b0-b3fc-4a51-b49d-f7aaf1f2f4b8.
Nevertheless, since I have to implement code coverage into the continuous integration process somehow soon, and skipping that part is not an option, I am now asking here for any advice regarding this issue, and if there is any kind of solution to that problem!
Thanks for all advice!
Fakes is not supported by MsTest: http://msdn.microsoft.com/en-us/library/ms253138.aspx.
Here's how you can run the Visual Studio Testrunner from Team City (which supports Fakes): http://blog.degree.no/2012/09/unit-testing-visual-studio-2012-fakes-in-team-city/
You can also use the Visual Studio Testrunner if you use TFS.

TFS2010 build with unit test

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

Publish MVC website using MSBuild and CruiseControl

I am trying to publish a MVC2 Web app as part of our continuous integration using Cruise Control ccnet.config file with msbuild. I have searched through numerous posts but cant find the right answer or get the suggestions to work. Does anyone know how to get this going so I can output the published files to a directiory ont he build server?
I have this so far:-
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe C:\SVNWork\projectNAME_labelled\
projectNAME.csproj /noconsolelogger /p:Configuration=Release;outDir=Release\ /v:diag
ResolveReferences;_CopyWebApplication>
Can someone perhaps get in touch so I can ask them some questions?
Thanks Gregor
I have the a similar issue. The suggestions seem good although havent got it to successfully work.
Publish MVC v1 C# application through Cruise Control

When do we use msbuild file?

I am working on a web application in VS 2008. To compile the applicaiton I go to Build in Visual Studio and click on Build Solution and when i have to deploy the site I click on Publish and it publishes the site to a directory.
Now my question is when do we use this msbuild file? what exactly this file does for Us?
Thanks.
You use a Build file when you have to do a series of operations that you want to do before or after compiling. This is used in most of the big projects where there will be other things (examples for other things are given below) that needs to be done and through MS build they will automated.
Examples of things that can be done with build :
Running Unit tests
Functional testing
Static Code analysis and reports
Packaging as an installer