0

Is there a way with Chutzpah to specify multiple test specification file sources when running the JS unit tests via Team Build?

I understand that I can add multiple test sources in the build definition. The major downside to this is it generates a code coverage file for each source, overwriting the code coverage file for each configured test source. I would like to be able to produce one code coverage report for all tests in the project. I should be able to accomplish this by reorganizing the source for the project or changing the file pattern we use to identify tests (*_test.js) so it is unique, but I was hoping to avoid these if possible.

Thanks, Shane

1 Answers1

0

Have you tried using a Chutzpah.json file? This lets you specify multiple test files to run.

{
    "Tests": [
        { "Includes": ["*test1*"] },
        { "Path": "Dir3/test.js"},
        { "Path": "Dir1", "Includes": ["*.js"], "Excludes": ["*test4.js"] },
        { "Path": "Dir2" }
    ]
}

from https://github.com/mmanela/chutzpah/wiki/tests-setting

Matthew Manela
  • 16,572
  • 3
  • 64
  • 66
  • I use the chutzpah.json file and it woks great when running the tests in Visual Studio. How do you use chutzpah.json when running the tests from Team Build? – Shane Jimmerson Aug 27 '15 at 20:51