I am working on a .NET project and using Angular 1.5 with TypeScript at client side. For test case execution and code coverage I am using Jasmine + Chutzpah. Chutzpah is integrated with Visual Studio 2013.
In my project number of client side test cases are 1400+. Now I have started facing issues with Test case discovery and client side code coverage. With current Chutzpah.json file test cases are not getting discovered but when I change the path to specific file it starts discovering test cases. Please find chutzpah.json below:
{
"Framework":"jasmine",
"TestFileTimeout":"3600000",
"ExpandReferenceComments": "false",
"ExpandTestFileBatching":"true",
"TestHarnessReferenceMode": "AMD",
"TestHarnessLocationMode": "SettingsFileAdjacent",
"Compile": {
"Mode": "External",
"Extensions": [".ts"],
"ExtensionsWithNoOutput": [".d.ts"]
},
"References": [
{"Path": "Scripts/require.js"},
{"Path": "Scripts/angular.js"}
],
"Tests": [
{"Path": "app/TestCases/"}
],
"CodeCoverageIncludes": ["app/module1/controllers/*.ts", "app/module1/module2/*.ts"],
"CodeCoverageExcludes": ["*.d.ts", "Scripts/*", "*Spec.ts"],
"EnableCodeCoverage": "true"
}
Now with above chutzpah.json I get timeout error where as when I provide complete file name in "Path" for "Tests" It start dicovering test cases.
"Tests": [
{"Path": "app/TestCases/testCaseSpec.ts"}
]
Also I have installed utilities from VisualStudio gallery to integrate test cases execution and code coverage in visual studio itself but I am not able to get it. When I try to get code coverage by right click on TestCases folder and selecting "show code coverage", it says 710 passed, 54 failed Total 764. But I have more than 1400 test cases. Not sure why it only runs for 764.