Page 1 of 1

Multiple js files

Posted: 2008-04-15 9:59 am
by trailblazer
Hi,

suppose i have multiple js files ... will that work for me i.e., will i be able to get the code coverage ...like i have many js files inside the jar ... like ui.js in meta-inf folder of the jar and other js files in tomahawk resource folder of the jar.. i have unziped that jar and added the insturmented js files (which contains the embedded code of jscoverage inside that) to the jar and then created the instrumented web folder and then created the war file and then deployed into the server... followed as you said the post.....but now i was able to get the coverage only for the ui.js...which was there in META-INF folder of the jar file i cannot get the coverage for other js files....can you help me if i have gone wrong some where....

Thanks

Re: Multiple js files

Posted: 2008-04-15 3:55 pm
by siliconforks
Are the .js files not being listed in the JSCoverage "Summary" tab? Or are they being listed but with no coverage information (0% coverage)? Or are they displayed correctly in the "Summary" tab but not in the "Source" tab?

Re: Multiple js files

Posted: 2008-04-16 4:01 am
by trailblazer
there are not being listed in the summary tab

Re: Multiple js files

Posted: 2008-04-16 4:10 pm
by siliconforks
Are you sure the scripts not being listed are actually being executed? If none of the lines of code in a script are executed, then JSCoverage will not display that script at all. (It might be better for JSCoverage to display the script as having 0% coverage, but JSCoverage cannot currently do this.)

If you are sure the scripts are being executed, view the script source in the web browser to make sure the browser is using the instrumented JavaScript (and not, for example, an old script from the cache). Every instrumented script should start out with this line:

Code: Select all

/* automatically generated by JSCoverage - do not edit */