Silicon Forks » Forum

It is currently 2010-09-05 7:42 pm

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Can I integrate jscoverage with automation framework.
PostPosted: 2010-07-19 2:34 am 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 103
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Can I integrate jscoverage with automation framework.
PostPosted: 2010-07-19 2:16 pm 
Offline

Joined: 2010-07-08 6:30 am
Posts: 9
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Can I integrate jscoverage with automation framework.
PostPosted: 2010-07-20 3:33 am 
Offline

Joined: 2008-10-11 6:52 pm
Posts: 103
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Can I integrate jscoverage with automation framework.
PostPosted: 2010-08-05 3:57 am 
Offline

Joined: 2010-07-08 6:30 am
Posts: 9
Ed,

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

Regards,
Amit


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group