Chutzpah 4.4.11 failing with exit code 2 when running with vstest

303 Views Asked by At

vstest.console.exe 16.10 works with Chutzpah 4.2.3. But upgraded to Chutzpah 4.4.11, and it fails with exit code of 2. chutzpah.console.exe also works by itself in 4.4.11, so I'm not sure if I'm missing something in the vstest command line. (I get the same results with vstest.console.exe when running from an Azure DevOps pipeline.)

Any suggestions?

> "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
 "[path-to-test-file]\index-tests.js"
 /TestAdapterPath:"C:\Users\TFSBuild\.nuget\packages\chutzpah\4.4.11\tools"
Microsoft (R) Test Execution Command Line Tool Version 16.10.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Error: Unknown error occurred when executing test file. Received exit code of 2
While Running:[path-to-test-file]\index-tests.js

No test is available in [path-to-test-file]\index-tests.js. 
Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Test Run Failed.
1

There are 1 best solutions below

0
timprice On

Found the solution. I'm using Engine: Chrome, and the newer version of Chutzpah was failing to find chrome.exe. Defining the path to the exe in Chutzpah.json resolved the issue.

  "Engine": "Chrome",
  "EngineOptions": {
    "ChromeBrowserPath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
  }