Suitable for use in CI enviroment?
-
- Posts: 1
- Joined: 2008-11-14 4:34 pm
Suitable for use in CI enviroment?
I've not used JSCoverage myself - I'm just asking a question based on what a colleague said.
1) As it understand it JSCoverage requires that a human being press a button in the browser to generate coverage reports.
2) In addition there appears to be no way to save a report.
Clearly these two limitations limit the utility of JSCoverage as part of automated build (i.e. Continuous Integration).
Is my colleague mistaken? Are there workarounds? Do you think this might addressed in future releases?
Thanks
Mark Levison
--
Cheers
Mark Levison
Blog: http://www.notesfromatooluser.com/
Recent Entries: Agile/Scrum Smells: http://www.notesfromatooluser.com/2008/ ... mells.html
Agile Games for Making Retrospectives Interesting: http://www.notesfromatooluser.com/2008/ ... sting.html
1) As it understand it JSCoverage requires that a human being press a button in the browser to generate coverage reports.
2) In addition there appears to be no way to save a report.
Clearly these two limitations limit the utility of JSCoverage as part of automated build (i.e. Continuous Integration).
Is my colleague mistaken? Are there workarounds? Do you think this might addressed in future releases?
Thanks
Mark Levison
--
Cheers
Mark Levison
Blog: http://www.notesfromatooluser.com/
Recent Entries: Agile/Scrum Smells: http://www.notesfromatooluser.com/2008/ ... mells.html
Agile Games for Making Retrospectives Interesting: http://www.notesfromatooluser.com/2008/ ... sting.html
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Suitable for use in CI enviroment?
Hello, Mark,
You might want to try compiling the latest code from the Subversion repository - it can save coverage reports to the file system. Probably this can be automated, although the details will depend on what sort of test framework you are using.
You might want to try compiling the latest code from the Subversion repository - it can save coverage reports to the file system. Probably this can be automated, although the details will depend on what sort of test framework you are using.
Re: Suitable for use in CI enviroment?
Hi, Did anybody succeed in saving the result as html through scripts. I'm trying to do it with jsunit, if so how ?
Thanks,
Reva.
Thanks,
Reva.
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Suitable for use in CI enviroment?
The code for this is now in the latest released version of JSCoverage (version 0.4). You have to use the jscoverage-server program.
Re: Suitable for use in CI enviroment?
Hi Ed, Thanks for your response,
1. ran jscoverage-server.exe with --proxy --port=8888 --verbose
2. setup my ie to run as proxy.
3. Turned off browser caching
4. Ran URL - http://127.0.0.1/staticjs/jsunit/testRu ... toRun=true
5. Still get undefined dialogue for doc/exampl-jsunit test.
6. Test runs to completion with green status, but no jscoverage-report directory is found peer to doc directory.
7. jsunit version 2.2, jscoverage version 0.4
Please suggest whats not right ?, let me know if you need any other info.
Thanks,
Reva.
1. ran jscoverage-server.exe with --proxy --port=8888 --verbose
2. setup my ie to run as proxy.
3. Turned off browser caching
4. Ran URL - http://127.0.0.1/staticjs/jsunit/testRu ... toRun=true
5. Still get undefined dialogue for doc/exampl-jsunit test.
6. Test runs to completion with green status, but no jscoverage-report directory is found peer to doc directory.
7. jsunit version 2.2, jscoverage version 0.4
Please suggest whats not right ?, let me know if you need any other info.
Thanks,
Reva.
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Suitable for use in CI enviroment?
When you run jscoverage-server with the --verbose option, you should get a message printed out to the console for every HTTP request. You should get a bunch of these when you run the JsUnit test suite. Are you getting these messages?
Re: Suitable for use in CI enviroment?
Hi,
Yes, I get the message printed out. But still get undefined dialogue box.
- Reva
Yes, I get the message printed out. But still get undefined dialogue box.
- Reva
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Suitable for use in CI enviroment?
Could you paste the verbose messages here? They might provide some clues.
Re: Suitable for use in CI enviroment?
Ant Target
URL Used
http://localhost/staticjs/jsunit/testRu ... toRun=true
Command Prompt Logs
Code: Select all
<target name="jsunit_coverage">
<echo message="Starting jscoverage server....."/>
<exec executable="jscoverage/jscoverage-server.exe">
<arg value="--verbose" />
<arg value="--proxy" />
<arg value="--port=8888" />
</exec>
<echo message="Started jscoverage server....."/>
</target>
http://localhost/staticjs/jsunit/testRu ... toRun=true
Command Prompt Logs
Code: Select all
jsunit_coverage:
[echo] Starting jscoverage server.....
[exec] Starting HTTP server on 127.0.0.1:8888
[exec] GET http://localhost/staticjs/jsunit/testRunner.html?testPage=http://localhost/staticjs/jscoverage
/doc/example-jsunit/test.html&autoRun=true HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/xbDebug.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/jsUnitCore.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/jsUnitTestManager.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/jsUnitTracer.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/jsUnitTestSuite.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-frame.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-loader.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/testContainer.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-data.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-status.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-progress.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-counts.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-results.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-errors.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/testContainerController.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/emptyPage.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-counts-runs.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-counts-errors.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/main-counts-failures.html HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/css/jsUnitStyle.css HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/jsUnitCore.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/images/green.gif HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/app/jsUnitVersionCheck.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/images/logo_jsunit.gif HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/images/powerby-transparent.gif HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/images/green.gif HTTP/1.1
[exec] GET http://localhost/staticjs/jscoverage/doc/example-jsunit/test.html?cacheBuster=1239819312687 HT
TP/1.1
[exec] GET http://localhost/staticjs/jscoverage/doc/example-jsunit/jsunit/app/jsUnitCore.js HTTP/1.1
[exec] GET http://localhost/staticjs/jscoverage/doc/example-jsunit/script.js HTTP/1.1
[exec] GET http://localhost/staticjs/jsunit/images/green.gif HTTP/1.1
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Suitable for use in CI enviroment?
One thing I notice is that you're using 2 separate copies of jsunit. (The example in doc/example-jsunit contains its own copy of jsunit.) What happens if you run this URL:
Code: Select all
http://localhost/staticjs/jscoverage/doc/example-jsunit/jsunit/testRunner.html?testPage=http://localhost/staticjs/jscoverage/doc/example-jsunit/test.html&autoRun=true
Re: Suitable for use in CI enviroment?
Ed,
Using
http://localhost/staticjs/jscoverage/do ... toRun=true
I still get the undefined dialogue box.
- Reva
Using
http://localhost/staticjs/jscoverage/do ... toRun=true
I still get the undefined dialogue box.
- Reva
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Suitable for use in CI enviroment?
Have you tried running the test in any other browsers? They may give more comprehensible error messages.