Learn to use Visual Studio, Visual Studio Online, Application Insights and Team Foundation Server to decrease rework, increase transparency into your application and increase the rate at which you can ship high quality software throughout the application lifecycle
1. Download Chutzpah.VS2012.vsix from VS Gallery.
Rename it to Chutzpah.VS2012.zip. Extract all its contents.
Rename it to Chutzpah.VS2012.zip.
Extract all its contents.
2. Check in the following extracted files into source control in Team Foundation Service.
q. TestFiles/jasmine/* if you are using jasmine tests.
3. In Visual Studio, Open Team Explorer & connect to Team Foundation Service.
Bring up the Manage Build Controllers dialog. [Build –> Manage Build Controllers]
Select Hosted Build Controller
Click on Properties button to bring up the Build Controller Properties dialog.
4. Change Version Control Path to custom Assemblies to refer to the folder where you checked in the binaries in step 2.
Click on the Process tab
Select the row named Automated Tests.
Click on … button next to the value.
6. Select the Tests to Run and click Edit. Change the Test assembly specification to **\*.js
7. Create your Web application in Visual Studio and add your Qunit or Jasmine unit tests to them. Make sure that the js files (that contain the tests) are getting copied to the build output directory.
8. Check in your project and the unit tests into Team Foundation Service. Add this project to the build which you modified in step 5.
Now go ahead and queue your build.
Program Manager – Visual Studio ALM.
This is perfect news Mathew!
Cool... well done
does this work using Visual Studio 2012 & TFS 2010 or do I need TFS 2012?
This requires Visual Studio 2012 and Team Foundation Server 2012.
Any change for an update for the new chutzpah?
I've been working on this and I can't get it to work.
The first problem occurs when extracting the "Chutzpah.VS11.vsix" as this file is called "Chutzpah.VS2012.vsix". Also the contents are not the same as you list in this how-to. The items that I'm missing in the extracted dir are:
- Chutzpah.VS11.dll (But I've used "Chutzpah.VS2012.dll" for it, not sure if this is OK)
I check-in all the files in TFS2012 and I make a JS testfile with 4 tests in them and one will fail. I also check-in my testproject which must be build.
The next step is setting up the build definition like you described in this how-to. I did make a small difference in the automated tests section of the build definition... "Fail build on test failure" is set to YES.
Now when all is checked-in and the build is run the build just completes and at the 'test section' doesn't give any notification that tests are runned, exact text is "No Test Results".
I'm using TFS2012 and VS2012 Premium.
Any help would be much appreciated.
PS: Chutzpah itself is installed in VS2012 and the testproject runs perfectly when running the tests in 'Test Explorer' (one of the 4 tests is failing like it should)
@Ferdy & @Nadav
I have updated the article to refer to the VS 2012 version of CHutzpah.
The key difference is that you need to checkin the files under TestFiles folder.
Thanks for the post. I have followed the instructions here for Visual Studio 2012 and TFS 2012, and I get the following message:
No test is available in C:\Builds\4\..\Scripts\Test\site\tests. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
I checked on the server, and the files are there, any ideas?
I also posted this to the Chutzpah CodePlex site as a discussion.
Please try and disable antivirus on the build machine. A bing search indicates that other folks who hit similar issues were able to work around it by disabling antivirus. The antivirus tool may be blocking phantomjs.exe.
The specific version control path you suggest appears to be a subfolder under the actual unit test project, in the solution being built. Is there a specific reason you chose that path, or is it arbitrary?
The path to version control control assemblies can be any arbitrary path.
Here is the response from Matthew Manela for your query:
"Include a .runsettings file with the following contents:
<?xml version="1.0" encoding="utf-8"?>
This will tell Chutzpah to looks for all types of files."
This feature work with git repository? I cann't set .runsettings file. It proceeds @Mathew?