[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
siliconforks.com • View topic - Java script code coverage

Silicon Forks » Forum

It is currently 2019-11-16 11:31 pm

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 2009-02-26 1:54 pm 
Hi,

We are having a requirement to generate the coverage report for a set of java script files, and store the coverage report programmatically in a html file.

Now, I am through in running the jsunit test cases with testRunner.html. How to proceed further using JSCoverage to create the coverage report.

Thanks,
Saran


Top
  
Reply with quote  
PostPosted: 2009-02-26 2:53 pm 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 120
To store a coverage report you will need to use the jscoverage-server program. Are you using jscoverage-server?


Top
 Profile  
Reply with quote  
PostPosted: 2009-02-26 3:31 pm 


Top
  
Reply with quote  
PostPosted: 2009-02-26 3:43 pm 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 120
If your test suite requires the Tomcat server (presumably you are using servlets/JSPs in your project), then you will probably want to run jscoverage-server with the --proxy option. See the for details on the jscoverage-server command-line options.


Top
 Profile  
Reply with quote  
PostPosted: 2009-02-27 9:12 am 
Hi,

I started the jscoverage-server with --proxy option, and executed the test cases from a test suite using JSunit. The following code snippet is included in the test suite.

function tearDownPage() {
if (window.jscoverage_report) {
jscoverage_report();
}
}

But the coverage report is not generated after executing all the test cases.

The steps which I followed are

1. Started the tomacat web server from the build file.
2. Started the jscoverage-server from the build file.
<exec executable="${lib.dir}/jscoverage-0.4/jscoverage-server.exe" spawn="true">
<arg value="--verbose" />
<arg value="--port=8888" />
</exec>
3. executed the test cases through testrunner.html using the URL "http://localhost:8080/testrunner.html?testpage=http://localhost:8080/testsuite.html"
3. Stopped the jscoverage-server.
4. Stopped the tomcat server.

After performing all these steps the coverage report is not generated. Please let me know if I am wrong anywhere.

Thanks,


Top
  
Reply with quote  
PostPosted: 2009-02-27 3:01 pm 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 120


Top
 Profile  
Reply with quote  
PostPosted: 2009-02-27 4:32 pm 
Yes, it is a copy paste mistake. Here is the correct code in the build file.

<echo message="Starting jscoverage server....."/>
<exec executable="${lib.dir}/jscoverage-0.4/jscoverage-server.exe" spawn="true">
<arg value="--verbose" />
<arg value="--proxy" />
<arg value="--port=8888" />
</exec>

Please let me know where I am going wrong.


Top
  
Reply with quote  
PostPosted: 2009-02-27 6:15 pm 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 120


Top
 Profile  
Reply with quote  
PostPosted: 2009-03-02 6:38 am 


Top
  
Reply with quote  
PostPosted: 2009-03-02 4:55 pm 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 120


Top
 Profile  
Reply with quote  
PostPosted: 2009-03-02 5:19 pm 


Top
  
Reply with quote  
PostPosted: 2009-03-02 5:38 pm 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 120
Basically, the example test suite is designed to work with or without the jscoverage-server proxy running. Without the proxy, jscoverage_report will be undefined. With the proxy, jscoverage_report should be defined as a function, and then the function will be called. Are you running the example test suite through the proxy?


Top
 Profile  
Reply with quote  
PostPosted: 2009-03-02 5:44 pm 
No, I am not running the test suite through the proxy.


Top
  
Reply with quote  
PostPosted: 2009-03-02 5:49 pm 
When I run the test suite after starting the jscoverage-server proxy also I got the same undefined value and the coverage is not generated.


Top
  
Reply with quote  
PostPosted: 2009-03-02 5:51 pm 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 120
If you run the example through the proxy, it should create a "jscoverage-report/", directory containing the stored coverage report. (This will be located in the directory where you started the jscoverage-server program.) Does that work correctly?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group