1
votes

Running Chutzpah 3.2.2.0 from command line all tests are discovered and executed in about 40 seconds, which I think is a good speed for more than 100 unit tests split into several files:

chutzpah.console.exe path\to\MyProjectRootFolder\chutzpah.json

However, in Visual Studio, it takes 9-10 minutes for the list of tests to be loaded in Test Explorer.

Monitoring VS with Process Explorer, I noticed that the process "vstest.discoveryengine.x86.exe" is calling phantomjs.exe several times during the discovering process.

My understanding was that Chutzpah would require PhantomJS to execute the tests in a browser context, and only for tests execution. Maybe I am misunderstanding the process here.

My chutzpah.json file:

{
    "Framework":"qunit",
    "TypeScriptCodeGenTarget":"ES5",
    "TestFileTimeout":"60000",
    "Compile": {
        "Extensions": [
            ".ts"
        ],
        "ExtensionsWithNoOutput": [
            ".d.ts"
        ],
        "Mode": "External"
    },
    "CodeCoverageExcludes": [
        "*ests.ts",
        "*ests.js"
    ],
    "Tests": [
        {
            "Path": "TestsSubfolder", "Include": "*.ts"
        }
    ]
}

Is there any settings to tell Chutzpah: "hey buddy, I just need a list of tests loaded in VS Test Explorer, no need to compile or run them now."?

1

1 Answers

2
votes

Chutzpah uses PhantomJS for both test execution and test discovery. In order for Chutzpah to know what tests exist it must run them in discovery mode (where it run the file but tells the test framework to not execute the bodies).

That said, it should not take that long in VS. It should be as fast as when you run them. Can you please file a bug on chutzpah.codeplex.com with a repro and I will take a look.