Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all 1864 articles
Browse latest View live

Commented Unassigned: Chutzpah not discovering requirejs tests [164]

$
0
0
This is a followup of this discussion:

https://chutzpah.codeplex.com/discussions/462027#editor

Unfortunately, chutzpah alone is larger than the attachment limit, so I have added the project to dropbox:
https://www.dropbox.com/s/z8439wwlalp02wg/Origin.DaVinci.zip

I made two bat files, one for running the tests under phantom, and one for running under chutzpah, in the root directory to make things easy.

The scheme being used was copied from the Durandal testing framework. PhantomJS runs the tests just fine, but the closest I could come with Chutzpad was getting it to discover the tests (but they would all pass no matter what).
Comments: The improved requirejs support has been released in [version 3.0](http://matthewmanela.com/blog/chutzpah-3-0-mocha-requirejs-and-more/)

Commented Unassigned: /failOnError not working properly [165]

$
0
0
A syntax-error in one of our tests did not trigger a non-zero exitcode as expected:

Logs from TeamCity:

[12:04:24][Step 3/5] Starting: C:\TeamCity\buildAgent\work\7404058d576e467c\buildframework\Chutzpah\chutzpah.console.exe /path src\JSClient.Tests\spec __/failOnError__ /timeoutMilliseconds 20000
[12:04:24][Step 3/5] in directory: C:\TeamCity\buildAgent\work\7404058d576e467c
[12:04:25][Step 3/5] Chutzpah console test runner (64-bit .NET 4.0.30319.1008)
[12:04:25][Step 3/5] Copyright (C) 2013 Matthew Manela (http://matthewmanela.com).
[12:04:29][Step 3/5]
[12:04:29][Step 3/5] chutzpah.dll: Version __2.5.0.0__
<SNIP>
[12:07:20][JavaScript Tests] Chutzpah Error: C:\TeamCity\buildAgent\work\7404058d576e467c\src\JSClient.Tests\spec\contract_controller_spec.coffee: Error in [JavaScript runtime error]:
[12:07:20][JavaScript Tests] unmatched )
[12:07:20][JavaScript Tests] While Running:C:\TeamCity\buildAgent\work\7404058d576e467c\src\JSClient.Tests\spec\contract_controller_spec.coffee
<SNIP>
[12:09:31][Step 3/5] Process exited with code 0


Comments: This fix has been released in [version 3.0](http://matthewmanela.com/blog/chutzpah-3-0-mocha-requirejs-and-more/)

Commented Unassigned: JavaScript tests disappeared in VS 2013 [186]

$
0
0
Several people on my team installed 3.0.0 today and now we don't see any tests in Visual Studio 2013 Test Explorer. Is there something we're supposed to do to see our tests?
Comments: Not sure what additional info would be helpful. We installed 3.0.0 and can no longer see our tests. They were there before. We are using jasmine, all tests are in the same dir as jasmine.js. Our chutzpah.json file is pretty simple: { "Framework": "jasmine", "TestFileTimeout": 90000, "MaxDegreeOfParallelism" : 5 }

Commented Unassigned: JavaScript tests disappeared in VS 2013 [186]

$
0
0
Several people on my team installed 3.0.0 today and now we don't see any tests in Visual Studio 2013 Test Explorer. Is there something we're supposed to do to see our tests?
Comments: Could you give me a sample of a test that its not working? A runnable samples attached in a zip file please.

Commented Unassigned: JavaScript tests disappeared in VS 2013 [186]

$
0
0
Several people on my team installed 3.0.0 today and now we don't see any tests in Visual Studio 2013 Test Explorer. Is there something we're supposed to do to see our tests?
Comments: Added a zip file with a solution with the same structure as ours and the tests are not in Test Explorer.

Commented Unassigned: JavaScript tests disappeared in VS 2013 [186]

$
0
0
Several people on my team installed 3.0.0 today and now we don't see any tests in Visual Studio 2013 Test Explorer. Is there something we're supposed to do to see our tests?
Comments: I am unable to repro the issue. The tests do load for me. What I do see though is it taking a really long time. The issue here is you have a large timeout combined with Chutzpah incorrectly thinking jasmine.js is a unit test file and attempting to run it. However, this is not different than the previous version of Chutzpah.

Commented Unassigned: JavaScript tests disappeared in VS 2013 [186]

$
0
0
Several people on my team installed 3.0.0 today and now we don't see any tests in Visual Studio 2013 Test Explorer. Is there something we're supposed to do to see our tests?
Comments: To help see what is going on for you can you turn on Chutzpah tracing. You can turn this on in the Tools->Options->Chutzpah. It will create a file named chutzpah.log in %temp%.

Source code checked in, #21c0aacc728c340f20b2aef9106cf1ede613bbd8


Commented Issue: No tests found when using require.js, jquery, and underscore [90]

$
0
0
I have a situation where Chutzpah is completing with no tests executed, even though there are tests present. There is no error message, it just says zero tests found. I have distilled the situation down to the barest elements necessary for reproduction.

I am using require.js for module management, and have tests in a module which requires both jquery and underscore, which are used for convenience in the real tests. I use a shim for underscore, since it is not an AMD module.

When __both dependencies__ are present in the test module definition, Chutzpah finds no tests. If I comment out __either one of the two dependencies__, it does find the tests in the module. I have reference directives in the test module as well, but their presence or absence seems to have no effect. The file structure of the project is completely flat at present, for simplicity's sake, but putting the 3rd party libraries in a sub-folder and adding path directives has had no effect either.

Attached are the test harness, the test module, and a screenshot showing the file structure.
Comments: I attached an updated version of your repro (fixed.zip) that is now working. The changes I made were: * Added Chutzpah.json with right settings for typescript and amd test running * Added reference path for non test files so they chutzpah compiles them * Swapped out versions of require.js (and d.ts) * Updated version of qunit.d.ts and require.d.ts The key is the chutzpah.json file: ``` { "TestHarnessReferenceMode": "AMD", "TestHarnessLocationMode": "SettingsFileAdjacent", "TypeScriptModuleKind": "AMD" "References" : [ { "Path": "defs/qunit.d.ts", "IncludeInTestHarness": "false" }, { "Path": "defs/require.d.ts", "IncludeInTestHarness": "false" }, { "Path": "lib/require.js" }, { "Path": "js", "Include": "*.ts", "IncludeInTestHarness": "false" } ] } ```

Edited Issue: No tests found when using require.js, jquery, and underscore [90]

$
0
0
I have a situation where Chutzpah is completing with no tests executed, even though there are tests present. There is no error message, it just says zero tests found. I have distilled the situation down to the barest elements necessary for reproduction.

I am using require.js for module management, and have tests in a module which requires both jquery and underscore, which are used for convenience in the real tests. I use a shim for underscore, since it is not an AMD module.

When __both dependencies__ are present in the test module definition, Chutzpah finds no tests. If I comment out __either one of the two dependencies__, it does find the tests in the module. I have reference directives in the test module as well, but their presence or absence seems to have no effect. The file structure of the project is completely flat at present, for simplicity's sake, but putting the 3rd party libraries in a sub-folder and adding path directives has had no effect either.

Attached are the test harness, the test module, and a screenshot showing the file structure.

Commented Unassigned: Chutzpah not discovering requirejs tests [164]

$
0
0
This is a followup of this discussion:

https://chutzpah.codeplex.com/discussions/462027#editor

Unfortunately, chutzpah alone is larger than the attachment limit, so I have added the project to dropbox:
https://www.dropbox.com/s/z8439wwlalp02wg/Origin.DaVinci.zip

I made two bat files, one for running the tests under phantom, and one for running under chutzpah, in the root directory to make things easy.

The scheme being used was copied from the Durandal testing framework. PhantomJS runs the tests just fine, but the closest I could come with Chutzpad was getting it to discover the tests (but they would all pass no matter what).
Comments: I attached a new version of your spec2 folder that now works with Chutzpah 3.0 using some of its new features. (fixed.zip) The main issue your code had was the app.start().then(require...). This is tough for Chutzpah since it tried to start running tests before that call. The solution (until I figure out a better one) is to use a custom test harness template. This template is a slightly modified version of the one that ships with Chutzpah except it won't try to start test execution on its own, It lets your code do it. With these changes you can run chutzpah.console.exe "Origin.DaVinci.UnitTests\Javascript Tests\spec2\harness.js"

Edited Unassigned: Chutzpah not discovering requirejs tests [164]

$
0
0
This is a followup of this discussion:

https://chutzpah.codeplex.com/discussions/462027#editor

Unfortunately, chutzpah alone is larger than the attachment limit, so I have added the project to dropbox:
https://www.dropbox.com/s/z8439wwlalp02wg/Origin.DaVinci.zip

I made two bat files, one for running the tests under phantom, and one for running under chutzpah, in the root directory to make things easy.

The scheme being used was copied from the Durandal testing framework. PhantomJS runs the tests just fine, but the closest I could come with Chutzpad was getting it to discover the tests (but they would all pass no matter what).

Edited Issue: Can't find variable [71]

$
0
0
What am I doing wrong here? I'm using web essentials. I tried both AMD module syntax and commonjs.

common.auth.ts
```

import api = module("lib/api")
export function getAuthorizationHeader(): string {
...
}

export function setAuthorizationHeader(val: string): string {
...
}

```
my test.ts:
```

///<reference path="../dep/qunit/qunit.d.ts"/>
///<reference path="../lib/common.auth.ts"/>
///<reference path="../lib/common.auth.js"/>

import Auth = module('lib/common.auth')

test("authorization header is set", () => {

// arrange
var key = "Bearer ABDE1234";

// act
Auth.setAuthorizationHeader(key);
var header = Auth.getAuthorizationHeader();

// assert
ok(header === key, "The actual header does not match");

});
```

Chutzpah.auth.js:7: Can't find variable: Auth

Commented Issue: Can't find variable [71]

$
0
0
What am I doing wrong here? I'm using web essentials. I tried both AMD module syntax and commonjs.

common.auth.ts
```

import api = module("lib/api")
export function getAuthorizationHeader(): string {
...
}

export function setAuthorizationHeader(val: string): string {
...
}

```
my test.ts:
```

///<reference path="../dep/qunit/qunit.d.ts"/>
///<reference path="../lib/common.auth.ts"/>
///<reference path="../lib/common.auth.js"/>

import Auth = module('lib/common.auth')

test("authorization header is set", () => {

// arrange
var key = "Bearer ABDE1234";

// act
Auth.setAuthorizationHeader(key);
var header = Auth.getAuthorizationHeader();

// assert
ok(header === key, "The actual header does not match");

});
```

Chutzpah.auth.js:7: Can't find variable: Auth
Comments: That repro you link to is no longer available. Can you re-post it?

Commented Issue: Form submission causes test run to hang and eventually timeout [87]

$
0
0
We have a test suite which has recently grown to just over 200 tests. Recently I have started experiencing an issue on our build server whereby the test run appears to hang at around 150 tests and subsequently bombs out with a ChutzpahTimeoutException. Interestingly the number of tests after which it hangs varies between runs, but is always around 150.

We can run the tests locally fine, but our development machines are quite powerful compared to the build server.

I am using Chutzpah 2.2.1.173 and our tests are written in Jasmine using RequireJS.
Comments: Using new functionality in Chutzpah 3.0 I was able to get your repro to work! I attached an updated version of your sample (fixed.zip). The key addition is adding the chutzpah.json file with the following contents: ``` { "TestHarnessReferenceMode": "AMD", "TestHarnessLocationMode": "SettingsFileAdjacent", "References" : [ {"Path" : "require.js"}, {"Path" : "test-main.js"} ] } ``` With this in place you can run tests like: ``` chutzpah.console.exe tests\collections\SearchResultsSpecs.js ```

Edited Issue: Form submission causes test run to hang and eventually timeout [87]

$
0
0
We have a test suite which has recently grown to just over 200 tests. Recently I have started experiencing an issue on our build server whereby the test run appears to hang at around 150 tests and subsequently bombs out with a ChutzpahTimeoutException. Interestingly the number of tests after which it hangs varies between runs, but is always around 150.

We can run the tests locally fine, but our development machines are quite powerful compared to the build server.

I am using Chutzpah 2.2.1.173 and our tests are written in Jasmine using RequireJS.

New Post: Feature request: CasperJS support

$
0
0
Hi!

It would be great to have CasperJS support. Is it possible?

New Post: Feature request: CasperJS support

$
0
0
Can you elaborate? What should the feature provide, how should it work?

Commented Unassigned: Could not find test executor with URI 'executor://chutzpah-js/'. [169]

$
0
0
Test adapter finds tests and shows them on test explorer, however when trying to run any of them the below message is displayed:

------ Run test started ------
Could not find test executor with URI 'executor://chutzpah-js/'. Make sure that the test executor is installed and supports .net runtime version 4.0.30319.34003.
========== Run test finished: 0 run (0:00:00.1242099) ==========

This happens both on VS 2013 and VS 2012
Comments: Created [http://youtrack.jetbrains.com/issue/RSRP-400244](http://youtrack.jetbrains.com/issue/RSRP-400244)

New Post: Open in browser leaves temporary files around

$
0
0
No. It's not the HTML files. It's the temporary .js files.

Try these steps on a web project that has tests, hopefully they'll yield the same results as me:
  1. Put an alert in a typescript file.
  2. Run web project. Do whatever actions to get the alert to appear. Notice it's what you put.
  3. Change the alert.
  4. Use the Test Explorer to run tests.
  5. Run web project and get the alert to appear. It has changed to the new value correctly.
  6. Change the alert again.
  7. Use the Run JS Tests context menu shortcut.
  8. Run web project and get the alert to appear. It has changed correctly again.
  9. Change the alert for a final time.
  10. Use the Open in Browser context menu item.
  11. Run web project and get the alert to appear. Notice it has not changed the last time.
Hopefully this will demonstrate the issue.
Viewing all 1864 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>