I like the plugin on my local development environment. But it has been a huge problem on setting up TFS with chutzpah in typescript. I have not able to fix an issue in the issue tracker almost a month: http://chutzpah.codeplex.com/workitem/98
I also not sure whether it is the only problem I faced unless I can solve it and move forward. Also the blog for setting up TFS with chutzpah is outdated. The dll files are not matched. So I am also wonder whether I am doing a right by following the blog. Thanks.
Sorry that you are running into issues. I responded a few days ago on your StackOverflow post asking if you could file a bug on chutzpah.codeplex.com and attach a zip file which contains a repro. That would help me track and diagnose your issue.
I had to add the following to the extension.vsixmanifest in Chutzpah.VS2012.vsix, to get it to install in VS Express: <InstallationTarget Version="[11.0,12.0)" Id="Microsoft.VisualStudio.VWDExpress" />
This seems to happen quite a bit, I've noticed. At my company, it seems to be a coin toss on whether installing Chutzpah will actually show our tests in Test Explorer. Works for some but not for others. I'm currently running version 2.5.0 on VS 2012 Update 4 and haven't gotten it to work. Not sure if these matter, but also installed are Chutzpah Context Menu Extension 2.5.0, TypeScript 0.9.1.1, and Web Essentials 2.9. We are using QUnit tests in TypeScript files.
I installed the Chutzpah Test Adapter for the Test Explorer and the Test Runner Context Menu Extension, running with Jasmine 2.0, VS2013.
The Context Menu Extension works fine, and I get the results on the output window, however my Test Explorer doesn't show any results at all. Test is written in Typescript.
========== Load Playlist finished (0:00:00.005) ==========
------ Discover test started ------
Error: Timeout occured when executing test file
========== Discover test finished: 0 found (0:00:24.624) ==========
So you want when *any* JS file is saved to run all tests? This is possible but not implemented in Chutzpah. Ideally, Chutzpah would know when you changed any file that matters for your tests but I could look into adding a setting to do what you want. Can you file a work item at chutzpah.codeplex.com to track this feature?
i have run below command on command prompt for code coverage but i am getting below error.
C:\Tools\Chutzpah.2.4.3>chutzpah.console.exe /coverage /path C:\Build\Dev\Solutions**.js
Chutzpah console test runner (64-bit .NET 4.0.30319.17929)
Copyright (C) 2013 Matthew Manela (http://matthewmanela.com).
chutzpah.dll: Version 188.8.131.521
System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.IO.Path.GetFullPath(String path)
at Chutzpah.FileProbe.FindPath(String path, Predicate1 pathExists) in c:\Dev\chutzpah\Chutzpah\FileProbe.cs:line 171
at Chutzpah.FileProbe.GetPathInfo(String path) in c:\Dev\chutzpah\Chutzpah\FileProbe.cs:line 133
at Chutzpah.FileProbe.<FindScriptFiles>d__4.MoveNext() in c:\Dev\chutzpah\Chutzpah\FileProbe.cs:line 98
at System.Collections.Concurrent.Partitioner.DynamicPartitionerForIEnumerable1.InternalPartitionEnumerable.GrabChunk_Buffered(KeyValuePair2 destArray, Int32 requestedChunkSize, Int32& actualNumElementsGrabbed)
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass10.<ExecuteSelfReplicating>b__f(Object param0)
Hi, thanks for your work, I have 2 questions:
#1: currently I'm using Chai (chaijs.com) with Mocha for tests (BDD "should" style; mostly in-browser for some reasons). Is there a chance to make them working using your adapter or should I rewrite them to Jasmine/QUnit?
#2: is it possible to automate these test in VS (immediately after source file modification)?
#1: Chutzpah doesn't support Mocha yet. This would be a nice addition but I probably won't get to it for a while. You can file an issue for this on chutzpah.codeplex.com so we can track it. You can use ChaiJS though with QUnit or Jasmine.
#2: Yes you can, in the Unit Test Explorer you can check the "Run Tests after Build" toggle. Even though it says "after build" for Chutzpah this will mean each time you save your test file.
I have integrated Chutzpah in TFS server, but is there any way to let it run code coverage while TFS build?
Another question is why it cannot generate code coverage result for .html unit test file?
I'm using Chutzpah to test some Typescript files and I have the Run Tests After Build option selected in the Test Explorer. I'm also using Web Essentials and the Compile TS on save/build options are set to true. If I save one of my test files then all of the tests are re-run but if I save any other file then the tests are not run. Any idea why not?
Thanks for making Chutzpah! Seems like a great tool.
From looking at your code it looks like this may be the expected behavior. Are there any work arounds that will let me run the tests whenever I save a TypeScript file.
I tried adding a reference to QUnit in one of my TS files so that chutzpah would think it was a test file but this didn't make any of the tests in the actual test files get run. I also tried adding a dummy test to one of my TS files which sort of worked but it seemed to cause some circular dependency issue and tests were run multiple times and had the wrong line numbers in the output.
First I must say, nice work!
However, I can't get the Test Adapter to run headless through using phantom.js.
I've installed the NuGet-package for phantom.js and headless jasmine.js, but it still opens the jasmine side in the browser (not displaying anything).
I can't find any options for this - the "test explorer" however runs headless, but do not have as much feedback as the "unit test sessions"-tab.
"JS Error: ReferenceError: Can't find variable: WinJS"
Hi , Thanks for your work, I have one question
I configured TFS Build to use Chutzpah runner & it is running my jasmine java script(.js) test ,without any issue.
But the issue is , the unit test for .html files is not running as part of the TFS build. I am using QUnit for my .html files. i have added a separate automated test for html (**\*html ) as part build configuration .
No ,it is not working. where should the .runsettings be put ,is it as part of chutzpah binaries or part of test scripts. it cannot be included in the vs2012 solution because , the file name starts ".". Please advise.
Sorry, I wasn't clear enough. You need to create a file named something.runsettings. Then in the TFS Build setup there is a section where you can specify your test settings and you can point at this file. I will look this up and add screenshots to that page I sent soon.