3

I am trying to test the testSpec.js file in Visual Studio Online in TFS by Chutzpah java script test runner:

/// <reference path="jasmine.js"/>

describe('Javascript test: testjsinTFS', function () {

it('should have scope defined', function () {

    var a =1;
    expect(a).toBeDefined();

    expect(a).toEqual(1);
});
});

I have added the dependencies as found in the blog:


    Error: Unknown error occurred when executing test file. Received exit code of -1
    While Running:C:\a\bin\testSpec.js

So how can I fix the problem?

Thanks in advance for help.

5
  • That test runs fine for me so can you please give more details about how you are trying to run it. Does it work fine if you run chutzpah from the command line directly on that file? Is this error only when run from inside of TFS Build? Feb 28, 2015 at 14:42
  • @Matthew Manela Thanks for the reply, Actually we can run in visual studio successfully but when run from VSO using the build definition, dependencies and js with chutzpah in TFS although it runs C# test properly. Mar 1, 2015 at 11:27
  • That usually indicates you aren't copying your static content to the build dir correctly so Chutzpah cannot find them Mar 1, 2015 at 23:37
  • @MatthewManela Again thank you, here in visual studio i get the error "Summary: There were 0 failures, 1 errors and 1 warnings loading custom activities and services. Error: Method 'ToXml' in type 'Chutzpah.VS2012.TestAdapter.ChutzpahAdapterSettings' from assembly 'Chutzpah.VS2012.TestAdapter, Version=3.3.1.0, Culture=neutral, PublicKeyToken=1ca802c37ffe1896' does not have an implementation. Warning: Could not load file or assembly 'file:///C:\Users..\phantomjs.exe' or one of its dependencies. The module was expected to contain an assembly manifest." in out put window, can it be any issue? Mar 2, 2015 at 5:57
  • 1
    Now I am tiring with simple project in visual studio. But still does not test java script tests I have checked in the bin folder it does not copy the js contents after running build from VSO though it does in manual local build. Here to mention I have setup file "Copy To Output Directory" to "Copy always" and another issue I don't find the file "Chutzpah.VisualStudio.Settings.dll" in the extracted "Chutzpah.VS2012" folder. The build warning is: No test found. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again. Mar 2, 2015 at 8:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.