Page 2 of 2

Re: Can I integrate jscoverage with automation framework.

Posted: 2010-07-19 2:34 am
by Ed
The jscoverage.json file should always have the source in it. You can see this in my code post:

http://siliconforks.com/forum/viewtopic.php?p=401#p401

... you can see it is reporting the source for each file in there.

Re: Can I integrate jscoverage with automation framework.

Posted: 2010-07-19 2:16 pm
by Amit
Ok. Problem of not viewing source code is solved by including source code lines in json object. But when test uses large number of java script files(500-600 in mu case), it results in OOM memory while selenium.geteval call. In general my test used 500-600 js files.

So, do jscoverage have any recommendations for java heap size settings OR it be solved by changing jscoverage javascript function?

Re: Can I integrate jscoverage with automation framework.

Posted: 2010-07-20 3:33 am
by Ed
OK, that is a lot of files. :!: Probably if there are that many files then using getEval is not the best way to get the source code.

You could do one of two things to view the source from the report:

1. Write the "source" to the jscoverage.json file from your Java code (not the JavaScript code). What you would have to do is read each .js file (the original, uninstrumented .js file) and write out the lines as a JSON array of strings. Keep in mind this will create a huge jscoverage.json file, though.

2. You could do what you were suggesting above, modify the jscoverage.js file (in the report directory) to get the source code for each .js file when it is viewed. Although if you do that, you may run into web browser security restrictions if you try to use a file:/// URL.

Re: Can I integrate jscoverage with automation framework.

Posted: 2010-08-05 3:57 am
by Amit
Ed,

Thanks a lot all the way.
I am able to get complete code coverage report for my application.

Regards,
Amit

Re: Can I integrate jscoverage with automation framework.

Posted: 2012-07-18 12:09 pm
by agadamsetty
Hi Amit,

Could you please tell me how you integrated the results of each test and created consolidated report.

I am able to get the code coverage for individual tests, but unable to combine all the test results. I have 100 tests in my suite and we close the browser after every test.

Thanks,
Ashok