I want to include a run of my Jasmine JavaScript tests when building my solution but can't really find any good walkthroughs or tutorials on how to do this.
Previously we had chutzpah install on the build server and this would run the tests but builds on TFS2012 are a bit different to VSO. Someone has mentioned to me that the karma extensions would be useful but not sure where to start yet.
Any tips welcome.
I recently wrote a blogpost about enabling JavaScript unit tests in Visual Studio Online (Visual Studio Team Services :)) Hopefully this helps a little.
Related
I already have several unitary test written with google test within my solution.
I've just install the "GoogleTest Runner" visual studio extension (2013).
I did not found any user's guide.
Could somesone tell me how to use this extension, please?
Thank you.
Yeah, it took me a while to figure out how to use it as well. The extension integrates with the unit testing facilities that are built-in to visual studio, so when it's enabled you should be able to just click TEST->Run->All tests and it will pick up your test cases automatically.
One of the little hidden details is that the project containing the test cases must be named {something}Test, otherwise the plugin won't know where to look for the test cases.
I have a .net poject (wpf, excel and asp.net site), I also have a build machine for the purpose of continuous integration. For continuous integration to work, I need to be able to build the project. So, what I have done so far is install visual studio on a build machine and things will build fine, but I dont really have that option, so I was wondering what do I need to run from the visual studio setup, just to be able to build projects, meaning I am pretty sure some of things like f# in this case or MVC frameworks are not something that I need. Is it possible to run a few of the executable or just customize the install and if so what are the mandatory things that I need to select to basically boil down to having a solution be able to build and not have the ide installed?
Thanks
MSBuild is the component that builds your solutions. You can have a look at this question to run it with minimal installation:
Installing MSBuild 4.0 without Visual Studio 2010
I´m new to Visual Studio and this might be very easy to do but i've been researching for almost a week now and haven't got any results.
The thing is i'm trying to do some QA on a web project in visual studio 2010 that is under a TFS. I've recorded and coded some of my tests but i need this tests to run when there is a new check in by any of the developers.
I've read some of the How To's from MSDN but this step by step walkthroughs are not specific enough for the web performance test.
Thank you in advance
In you case you need to edit the build definition to include Build Verification Tests (BVTs) : theses tests can do check post build and also post deploy.
Web Performance Test, Load Test, Coded UI Test ... it's quite the same for TFS : some code to run to check something.
The good starting point is here.
I use NUnit for Mono/C# on my Mac, but I need to use Microsoft.VisualStudio.TestTools.UnitTesting for unit testing.
How is Microsoft TestTools' UnitTesting different from NUnit? Can I just change the namespace and recompile to get the same result, or do I have to rewrite the test?
Can I copy some of the assemblies to my Mac to run tests for Microsoft.VisualStudio.TestTools.UnitTesting? If so, what files should be copied?
See Migrating from NUnit to MSTest.
As to why you might try convincing your team to migrate the other way, see NUnit vs. MsTest: NUnit wins for Unit Testing.
Ask yourself - why do you need the Ms tools if you already have a working set with NUnit.
Personally I've worked with both and unless working in legacy where the MS tool was in great use, I'd choose NUnit for this toolset due to the larger community support I get in cases of problems.
MSTest can be used without installing Visual Studio. You will need to install Visual Studio Test Agent, which is a free download from Microsoft: http://www.microsoft.com/download/en/details.aspx?id=1334.
I think this approach is better from a licensing perspective than manually copying MSTest.exe and its dependencies onto the build server.
My biggest problem with MSTest is that it requires the install of Visual Studio, even if you are trying to run a lean build server.
NUnit can install and run anywhere.
I think most people here understand the importance of fully automated builds.
The problem is one of our project is now using an integrated Visual Studio Setup project (vdproj) and has recently been ported to Visual Studio 2008. Unfortunatly, those won't build in MSBuild and calling devenv.exe /build on 2008 just crashes, apparently it does that on all multi core computer (!!!). So now I have the choice to either rollback to .Net 2.0 and 2005 or simply ditch Visual Studio deployement, but first, I'd like a second opinion.
Anyone knows of another automated way to build a .vdproj that will not require us to open the IDE and click on stuff?
WiX was what I had in mind when saying we would ditch vdproj. Do you have any experience with it, good things, caveat?
The low cost solution is to switch to using ClickOnce, which you can automate using MSBuild. But if you still need to create a Windows Installer package, you will need to convert your project to WiX (pretty straight foward) and build that with your solution.
This will get you started:
Automate Releases With MSBuild And Windows Installer XML
I've used WiX a little bit before, and generally I found that it's great once you figure out what to do but there is a steep learning curve. If you spend a solid day going over the WiX tutorial you should be be able to get 80% of your setup working.
WiX Toolset Tutorial
I had the same requirement and ended up using what is suggested in these two links
David Williams Blog
MSDN article
Basically, since Team Build, by itself, will not build the setup projects for you, this approach has you add a new build step after the regular build is complete. This step fires off a second build by launching the devenv.exe. The IDE will build your setup files. The extra build is a bit costly but we only needed it for builds that were going to be pushed out. The Daily build at most would need this customization our CI build does not need to build setup files each time.
After that you execute some Copy commands, once again build steps that show up in your Team System build results, to move the setup files to a network share etc.
It feels a bit like a kluge at first, but it does work, it is also a full-fledged part of the automated build in Team System so it worked for my Continuous Integration goals.