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

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: using the new showFailureReport flag from v3 fixed my issue - Thanks!

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've moved jasmine out of the test directory and turned on tracing. Here's the contents from the Chutzpah.log. Web Publish Package: Entering GetPublishableProjectCfg Web Publish Package: Creating a new project publish data Web Publish Package: Advise shell related events Web Publish Package: Exiting GetPublishableProjectCfg Web Publish Package: Entering ProjectOpened Web Publish Package: Exiting ProjectOpened Informational: ------ Load Playlist started ------ Informational: ========== Load Playlist finished (0:00:00.0010001) ========== Web Publish Package: Entering GetPublishableProjectCfg Web Publish Package: Creating a new project publish data Web Publish Package: Exiting GetPublishableProjectCfg Web Publish Package: Entering ProjectOpened Web Publish Package: Exiting ProjectOpened Web Publish Package: Entering GetPublishableProjectCfg Web Publish Package: Creating a new project publish data Web Publish Package: Exiting GetPublishableProjectCfg Web Publish Package: Entering ProjectOpened Web Publish Package: Exiting ProjectOpened devenv.exe Information: 0 : Time:16:02:27.0351799; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:27.1821946; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:27.3452109; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:27.9112675; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:27.9902754; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:28.0072771; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:28.0102774; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:28.0132777; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:28.0162780; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:28.0232787; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:16:02:28.2903054; Thread:1; Message:Chutzpah.json file not found Informational: ------ Discover test started ------ Informational: ========== Discover test finished: 391 found (0:00:01.0531053) ========== Informational: ------ Run test started ------ Warning: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion. Warning: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion. Informational: ========== Run test finished: 391 run (0:00:17.0257024) ==========

Created Unassigned: Test Explorer Adapter shows no js tests [187]

$
0
0
Hi,

Have installed both the test explorer adapter as well as the context menu extension. When I right click and select Chutzpah's Run JS Tests it all works and I get status output in the Output window. However, when I do Ctrl A + R (run all tests in VS) no tests are shown in the test explorer.

Am I missing something? Do I have to do some extra configuration to tell Chutzpah where the tests are located? (They reside in the same project as the regular C#-unit tests.)

/Fredrik

Commented Unassigned: Test Explorer Adapter shows no js tests [187]

$
0
0
Hi,

Have installed both the test explorer adapter as well as the context menu extension. When I right click and select Chutzpah's Run JS Tests it all works and I get status output in the Output window. However, when I do Ctrl A + R (run all tests in VS) no tests are shown in the test explorer.

Am I missing something? Do I have to do some extra configuration to tell Chutzpah where the tests are located? (They reside in the same project as the regular C#-unit tests.)

/Fredrik
Comments: Another detail: when i execute "Run all tests" in VS I can see what is going on in the Output window by selecting "Build" or "Tests" from the "Show output from" dropdown. However, when I right-click and execute Chutzpah's Run JS Tests it show output under "Test". So, in the dropdown list I have these items: Build, Build order, Debug, JavaScript Language Service, Test and Tests. I am running the latest version of Chutzpah with VS2013 Premium.

Commented Unassigned: Test Explorer Adapter shows no js tests [187]

$
0
0
Hi,

Have installed both the test explorer adapter as well as the context menu extension. When I right click and select Chutzpah's Run JS Tests it all works and I get status output in the Output window. However, when I do Ctrl A + R (run all tests in VS) no tests are shown in the test explorer.

Am I missing something? Do I have to do some extra configuration to tell Chutzpah where the tests are located? (They reside in the same project as the regular C#-unit tests.)

/Fredrik
Comments: Are you using version 3.0? If so to help debug your issue I would like you to enable chutzpah tracing. If you go to Tools->Options->Chutzpah there will be a setting to enable tracing which will output a chutzpah.log file to your %temp% dir. Please do the following: 1. Close the solution 2. turn this setting one 3. open your solution 4. open the test explorer if it is not open 5. It should be showing that it is trying to find tests 6. Wait a couple minutes and when it stops send me the chutzpah.log file.

New Post: Console runner and the lack of exclusion options?

$
0
0
Hello,

I've been playing around with Chutzpah for the last few days and I could use some hints on how to best configure Chutzpah console for test results and code coverage with my automated .NET build.

I have the following project structure:
project.sln
project.csproj
project.msbuild
Module1/
Module1/src/module1.js
Module1/test/module1Spec.js
Module2/
Module2/src/module2.js
Module2/test/module2Spec.js
...
packages/
packages/Jasmine<version>/jasmine.js
packages/<other JS libs>/*.js
...

My goal is to run Jasmine specs using Chutzpah, providing test results for those specs in a junit result(s) file (consumable by some CI tool, e.g., Jenkins) as well as generating code coverage for all these spec files and *.js referenced with ///<reference .../> comments in a single HTML file.

I would gladly use Chutzpah directory scanning feature by simply providing Chutzpah with the "." directory and then letting it find all my specs. This however traverses deep down into my nuget packages/ directory doing lots of stuff with *.js files found there. I haven't been able to find a simple directory exclusion parameter to solve that approach.

And so I am scanning for specs myself and so far came up with the following piece of project.msbuild:
<Project ...>
  <ItemGroup>
    <TestSpecs Include="**\*Spec.js" />
  </ItemGroup>
  
  <Target Name="Test" DependsOnTargets="PackageRestore">
    <MakeDir Directories="$(TestResultsDir)"/>
    <Exec Command="$(ChutzpahExePath) %(TestSpecs.FullPath) /junit $(TestResultsDir)/%(TestSpecs.Filename).junit.xml /coverage" IgnoreExitCode="true"/>
  </Target>
  </Project>
However, the problem here is, that Chutzpah (given /coverage flag) does not simply append to the coverage html but overrides it. There's also no way (correct me if I'm wrong) to specify a different coverage HTML file name at each Chutzpah execution.

Could someone comment on whether I am missing some Chutzpah options and/or whether a reasonable feature request is emerging from my description?

Thanks

New Post: Console runner and the lack of exclusion options?

$
0
0
Does that msbuild result in chutzpah.console.exe being executed multiple times?

Created Unassigned: xhr requests via the command line [188]

$
0
0
When trying to run jasmine unit tests via the command line chutzpah.console.exe, if any tests use $.ajax() or XHR requests, the test runner is not able to execute the code. Is there any update in the works to support this for pulling in files asynchronously?

Thanks!

Commented Unassigned: xhr requests via the command line [188]

$
0
0
When trying to run jasmine unit tests via the command line chutzpah.console.exe, if any tests use $.ajax() or XHR requests, the test runner is not able to execute the code. Is there any update in the works to support this for pulling in files asynchronously?

Thanks!
Comments: This does work. I have an integration test validating this scenario: https://chutzpah.codeplex.com/SourceControl/latest#Facts.Integration/JS/Test/ajaxCall.js

New Post: Console runner and the lack of exclusion options?

$
0
0
Yes. It iterates recursively through all Spec.js files creating a separate .junit.xml results file for each.

New Post: Console runner and the lack of exclusion options?

$
0
0
Instead of doing that just create one call to chutzpah.console.exe passing multiple /path arguments.

Released: Sample Tests (Dec 12, 2013)

$
0
0
This zip contains a sample QUnit, Jasmine, Mocha tests that demonstrate both normal test running and using RequireJS.

You can also view these samples in the repository's Samples folder.

Updated Release: Sample Tests (Dec 12, 2013)

$
0
0
This zip contains a sample QUnit, Jasmine, Mocha tests that demonstrate both normal test running and using RequireJS.

You can also view these samples in the repository's Samples folder.

Source code checked in, #9ea6e3154b2d28598ce8986d187135153ebb0e6b

$
0
0
add full set of polyfills for typescript

Commented Unassigned: Test Explorer Adapter shows no js tests [187]

$
0
0
Hi,

Have installed both the test explorer adapter as well as the context menu extension. When I right click and select Chutzpah's Run JS Tests it all works and I get status output in the Output window. However, when I do Ctrl A + R (run all tests in VS) no tests are shown in the test explorer.

Am I missing something? Do I have to do some extra configuration to tell Chutzpah where the tests are located? (They reside in the same project as the regular C#-unit tests.)

/Fredrik
Comments: Yes, I am using 3.0. Tracing is on and it says that it has found one test (which is correct). But it is not showing up in the test explorer. See the log file attached.

Commented Unassigned: Test Explorer Adapter shows no js tests [187]

$
0
0
Hi,

Have installed both the test explorer adapter as well as the context menu extension. When I right click and select Chutzpah's Run JS Tests it all works and I get status output in the Output window. However, when I do Ctrl A + R (run all tests in VS) no tests are shown in the test explorer.

Am I missing something? Do I have to do some extra configuration to tell Chutzpah where the tests are located? (They reside in the same project as the regular C#-unit tests.)

/Fredrik
Comments: Web Publish Package: Entering ProjectClosed Web Publish Package: Removing a project publish data Web Publish Package: Unadvise shell related events Web Publish Package: Exiting ProjectClosed devenv.exe Information: 0 : Time:09:01:20.4536573; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.4926690; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.7367422; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8327710; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8347716; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8357719; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8447746; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8467752; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8487758; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8507764; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8537773; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8547776; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8557779; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8577785; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8587788; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8597791; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8617797; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8637803; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8657809; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8667812; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8677815; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8687818; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8697821; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8717827; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8727830; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8737833; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8757839; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8777845; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8787848; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8807854; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8817857; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8837863; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8847866; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8847866; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8867872; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8877875; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8897881; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8907884; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8947896; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8967902; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8977905; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.8987908; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.9017917; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.9027920; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.9047926; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.9538073; Thread:1; Message:Chutzpah.json file not found devenv.exe Information: 0 : Time:09:01:20.9558079; Thread:1; Message:Chutzpah.json file not found Informational: ------ Discover test started ------ Informational: ========== Discover test finished: 1 found (0:00:00,640192) ========== Informational: ------ Run test started ------ Informational: ========== Run test finished: 1 run (0:00:00,630189) ==========

Commented Unassigned: Test Explorer Adapter shows no js tests [187]

$
0
0
Hi,

Have installed both the test explorer adapter as well as the context menu extension. When I right click and select Chutzpah's Run JS Tests it all works and I get status output in the Output window. However, when I do Ctrl A + R (run all tests in VS) no tests are shown in the test explorer.

Am I missing something? Do I have to do some extra configuration to tell Chutzpah where the tests are located? (They reside in the same project as the regular C#-unit tests.)

/Fredrik
Comments: Here's my QUnit test: /// <reference path="../../navet.web/scripts/app/leadviewmodel.js" /> /// <reference path="../scripts/qunit.js" /> test("First QUnit test", function() { var x = 3; equal(x, 5, "Should be 5"); });

New Post: Can't get the test adapter to work.

New Post: Console runner and the lack of exclusion options?

$
0
0
That was my first idea but then I thought there's a lot of hacking to prepare such param list with msbuild. It happened to be easier than I thought and the following syntax worked perfectly:
<ItemGroup>
    <TestSpecs Include="**\*Spec.js" />
  </ItemGroup>
  <Target Name="Test" DependsOnTargets="PackageRestore">
    <MakeDir Directories="$(TestResultsDir)"/>
    <Exec Command="$(ChutzpahExePath) @(TestSpecs->'/path %(FullPath)', ' ') /junit $(TestResultsDir)/js-test-results.junit.xml /coverage" IgnoreExitCode="true"/>
  </Target>
Thanks for straightening me out on this.

New Post: Can't get the test adapter to work.

$
0
0
I encountered this issues with Visual Studio 2013 after I upgraded TypeScript to 0.9.5 and Chutzpah to 3.0.

------ Discover test started ------
========== Discover test finished: 0 found (0:00:00.228) ==========

I only use Jasmine, knockout and jQuery in my projects. How can I trouble shoot this issue?
Viewing all 1864 articles
Browse latest View live


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