kohinsky46 / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Coverage reports 0% if runner is using Safari Version 6.0.2 (8536.26.17) on Mountain Lion (and possibly other Safaris?) #410

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running jsTD with the coverage plugin
2. Capture Safari Version 6.0.2 (8536.26.17) - latest on Mountain Lion
3. run tests.

What is the expected output? What do you see instead?
I expect to see test coverage at the end of each line
I see 0% test coverage on every line

What version of the product are you using? On what operating system?
1.3.5
OSX Mountain Lion
Safari only

Full config is here: https://github.com/scottbert/ObjectJS

Please provide any additional information below.
Happy to help test any fixes if you can't reproduce it.

Original issue reported on code.google.com by sickpu...@gmail.com on 15 Nov 2012 at 8:21

GoogleCodeExporter commented 9 years ago
I can also reproduce this issue with phantomjs
http://phantomjs.org
This is a problem for us as we're gping to be using this in our CI to keep test 
coverage above 80%

Original comment by sickpu...@gmail.com on 16 Nov 2012 at 5:21

GoogleCodeExporter commented 9 years ago
I'm also facing this issue with phantomjs on mac os x...

Original comment by karthi...@gmail.com on 14 May 2013 at 5:21

GoogleCodeExporter commented 9 years ago
The code coverage reports 0% in safari/phantom because each javascript file's 
are loaded twice, so LCOV.js is getting executed again after running all the 
test scripts so the Reporter object gets reset and the process test results 
sending the POST request to the server with empty array for  linesCovered 
property.

[{"testCaseName":"dummy - 
module","testName":"test1","result":"passed","message":"","log":"","time":4,"dat
a":{"linesCovered":"[]"}}]

Anybody has an idea why the files are getting loaded twice ?

Original comment by karthi...@gmail.com on 17 May 2013 at 9:10