Chutzpah 3.3.0 is now available at your usual locations.
Changes
- Update to QUnit 1.16
- Update to Jasmine 2.1.3
- Improve parsing of Chutzpah.json files (finally allow comments)
- Skip paths that are too long while discovering tests
- Integrate test result transformers into Chutzpah.json file
- Add LCOV test result transformer
- Add TRX test result transformer
- Add source map support for code coverage
- Fix issue with requirejs urls containing querystrings
- Move HTML template injection from HEAD tag to BODY tag
Test Result Transforms
Chutzpah has long had support to transform your test results into the JUnit XML format but this was only exposed from the command line. With recent additions this feature has been greatly improved: Chutzpah now supports JUnit, LCOV (for code coverage) and TRX file formats. In addition, you can now specify what transforms you want and where the output files should live using the chutzpah.json file.
For example the settings below will output the results as lcov, trx and junit to the specified paths whenever Chutzpah runs.
{ "Transforms": [ { "Name": "lcov", "Path": "C:\temp\lcov.dat" }, { "Name": "junit", "Path": "C:\temp\junit.xml" }, { "Name": "trx", "Path": "C:\temp\trx.trx" } ] }
Code Coverage Source Map Support
One annoyance with Chutzpah’s code coverage was that is always showed coverage in terms of the .js files even if your source files were TypeScript or CoffeeScript. To address that problem this release contains a new option as part of the compile settings called UseSourceMaps. This will instruct Chutzpah to look for source map files in your configured compile output directory. If it finds them it will map your coverage results to the lines of the source files and generate the coverage HTML accordingly.
Here is an example config using this setting:
{ "Compile": { "UseSourceMaps": true, "Mode": "External", "Extensions": [ ".ts" ], "ExtensionsWithNoOutput": [ ".d.ts" ] }, "Tests": [ { "Path": "Tests.ts" } ], "References": [ { "Path": "SourceMappedLibrary.ts" } ], "CodeCoverageExcludes": ["*Tests.ts"] }
Hi Matthew, I just upgraded the Test Adapter and Context Menu for Visual Studio 2012 then ran tests that were passing before upgrading and received a number errors related to the JsonTextReader: “Error: Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: “. Path ‘References[15].Path’, line 22, position 24.” Is there a certain version on Newtonsoft that needs to be upgraded as well?
Move along, nothing to see here – missing comma! Sorry for the post!
What’s new in 4.0?
See http://matthewmanela.com/blog/chutzpah-4-0-batching-inheritance-and-more/
Thanks! I should have had a little patience!