Chutzpah 4.0 cleans up some of the legacy baggage while adding the much requested feature of test file batching.
Changes
- Added test file batching
- Added chutzpah.json inheritance
- Enable multiple Includes/Excludes for the Tests and References settings
- Removed legacy built in TypeScript and CoffeeScript compiler
- Remove support for VS 2010
- Package the test adapter assemblies in nuget and zip package
- Upgrade to Phantom 2.0
- Upgrade to QUnit 1.18
Test File Batching
Chutzpah has always created an HTML harness for each of your test files. This has the advantage of isolated one test from another but it has the big draw back of limiting throughput of running all your tests. Especially for people with large suite of tests parallel execution of individual test harnesses will not be as fast as batching them all together in one harness. With this release Chutzpah now adds support for both modes. When you set the following in your chutzpah.json file:
"EnableTestFileBatching": true
It tells Chutzpah to put all the test files under this chutzpah.json file into one HTML harness (see full sample). Because the settings file determines the grouping of files that get combined into one harness it gives you the ability to determine what tests you want to get loaded into one harness. Chutzpah can then run those harness in parallel which can give you increased throughput. In the future (based on user feedback) batching may become the default.
Settings File Inheritance
The addition of the test file batching feature above encourages the use of multiple chutzpah.json files to help control how files are batched and parallelized. This presents a problem though since your project will often have a set of common files and you would rather not list them multiple times in different settings files. To address this you can now inherit settings from a parent chutzpah.json file. In your chutzpah.json file (see full sample) you write:
"InheritFromParent": true
Which instructs Chutzpah to traverse recursively up the folder hierarchy and look for another chutzpah.json file. If found it will merge the two files and combine their settings. The inheritance between a parent and child settings works as follows when both the parent and child files contain the same setting:
Setting Name | What happens? |
References | References from child template are prepended with the references from the parent template |
Templates | Templates from the child template are prepended with the templates from the parent template |
Tests | Not inherited |
*All Others* | Child template overwrites the parent template setting |
Multiple Includes/Excludes for Tests and References Settings
The Tests and References settings now have Excludes and Includes properties (in addition to the old singular Exclude and Include setting). The new plural settings let you specify an array of patterns. This provides more flexibility when describing what files you do and do not want to include for a folder. For example:
{ "Tests": [ { "Path": "someFolder/someOtherFolder", "Includes": [ "*Dir1/*.js", "*Dir2/*.js"], "Excludes": [ "*Dir1/test4.js", "*Dir2/test2.js" ] } ] }
Legacy Compilation Support Removed
The 4.0 release removes the legacy compilation support. Chutzpah no longer ships with a built in TypeScript and CoffeeScript compiler. Please use the compile setting now to configure how Chutzpah handles TypeScript or CoffeeScript files.
After upgrading to 4.0 from 3.3 I am no longer seeing the context menu extensions. Also, when going to Tools -> Options -> Chutzpah the main settings view shows “An error occurred loading this property page”. Any ideas? I’ve tried uninstalling + reinstalling several times with no luck. Thanks in advance!
Thanks for reporting this. I think you filed an issue on the github page also (https://github.com/mmanela/chutzpah/issues/344). I will track this issue and update you there.
This issue is fixed
Jasmine is still at 2.1.3, right?
Yes.
Thanks, I’m trying to keep the jasmine library we use outside of Chutzpah in sync with your embedded version.
Does Chutzpah work with VS 2015? I have it installed and used it, but the problem that I have is in VS2015 I’m also using the Task Runner Explorer to run a bunch of gulp files. Once I run the tests with Chutzpah in the Test Explorer then the Task Runner Explorer steps fail, looks like a file in use error with some delete steps in the Task Runner. If I disable the Test Explorer and just use the right click run tests then I don’t have any problems?
I have not seen that issue. Chutzpah fully supports VS2015 and I have not heard any issues. Please file a bug with more details on the github page if you need help.
When I am testing a component in jasmine, visual studio says all is well and tests pass. However when I right click and say open in browser (chutzpah test runner) I get a lot of errors such as module not found as if it can’t find my referenced files. Does chutzpah work alright with angular components?
Can you file an issue on https://github.com/mmanela/chutzpah where I can better follow up?