Multiple js files

Questions, problems, suggestions, bug reports, and so on.
Post Reply
trailblazer
Posts: 7
Joined: 2008-04-11 8:13 am

Multiple js files

Post by trailblazer » 2008-04-15 9:59 am

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

siliconforks
Site Admin
Posts: 34
Joined: 2007-05-26 5:25 am

Re: Multiple js files

Post by siliconforks » 2008-04-15 3:55 pm

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?

trailblazer
Posts: 7
Joined: 2008-04-11 8:13 am

Re: Multiple js files

Post by trailblazer » 2008-04-16 4:01 am

there are not being listed in the summary tab

siliconforks
Site Admin
Posts: 34
Joined: 2007-05-26 5:25 am

Re: Multiple js files

Post by siliconforks » 2008-04-16 4:10 pm

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 */

Post Reply