質問

Recently I installed the Chutzpah Test Adapter extension for running my jasmine tests in VS2012's test explorer and it worked brilliantly out-of-the-box. However after repeating the process on a second machine I cannot get the tests to show up in the test explorer, and I'm having trouble diagnosing why.

I've reduced the scenario down to creating a new empty ASP.NET web project, adding the jasmine.js NuGet package, and then adding a simple test.js file with a single test. On the first machine, it appears in the test explorer almost immediately; on the second it doesn't at all. Furthermore, on the first machine I see Chutzpah creates a HTML script-runner file for jasmine.js but not for test.js; where as on the second machine (where it fails) I see it creates the HTML script-runner file for both. Manually opening the script-runner page for test.js does in fact properly invoke jasmine and everything works there, I just can't seem to get test explorer integration. I've tried tinkering with the "Testing Mode" settings to no avail. Does anyone have any suggestions for what else I can look into?

役に立ちましたか?

解決

Ok I figured this out; turns out it was this known problem with NVIDIA drivers causing PhantomJS to hang.

他のヒント

For those who have navigated to this question because of the title (struggling with the same manifestation): this can also happen if you are using requireJs or other asynchronous means to load test scripts. PhantomJs will hang not because of a graphics driver, but because of module load timeouts, or because of unresolved module dependencies.

So to prevent this from happening one needs to be extra careful about dependency resolution when creating asynchronous chutzpah tests.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top