Closed ramprasadgk closed 9 years ago
Proxying in general is inferior to pre-instrumenting the JavaScript before deploying to your web-server for a number of reasons, even though this can be more difficult to set up - usually it will be worth the effort.
How much is the effort to get https websites via JSCover proxy
I haven't had time to look at this in depth, but I suspect it is quite difficult. You're welcome to take a look at implementing it. I would imagine this would best be done by combining JSCover with an existing (and license compatible) open-source (preferably Java) proxy-specific project. I'm unaware of any such projects, but haven't looked recently.
Thanks for the prompt reply , "I would imagine this would best be done by combining JSCover with an existing (and license compatible) open-source (preferably Java) proxy-specific project"
If we have, lets a SSl proxy project ,then what would be the effort, we are kind of blocked now in using this tool on a large scale project
That depends on how easy it is to integrate.
we are kind of blocked now in using this tool on a large scale project
I strongly recommend instrumenting the JS before deploying, and measuring the coverage without the proxy.
I strongly recommend instrumenting the JS before deploying, and measuring the coverage without the proxy.
How does this work, if i just instrument JS using fs mode and than should I have to run webdriver test to make sure these code this coverage ?
Yes. Take a look at https://github.com/tntim96/JSCover/tree/master/examples/localStorage-file-system which is a working example of this
If your server is Java based, you may be to set up a filter to instrument the JavaScript as it is served.
I would imagine this would best be done by combining JSCover with an existing (and license compatible) open-source (preferably Java) proxy-specific project.
The LittleProxy project may suite, but it would be some time before anything is useable.
sure, will keep a tab on LittleProxy project We plan to do during deployment, in that case after deployment if that is served using apche/weblogic server, can we generate report from client side,
can we generate report from client side
Yes. The example linked to above demonstrates this. It is also documented in the manual.
Thanks! and when we have the JSON file how do we convert it to html report and 2) what is the difference between local-storage and file-system mode ,please elaborate
Proxying in general is inferior to pre-instrumenting the JavaScript before deploying to your web-server
Could I bother to consult the steps? Are the commands below sufficient? java -cp target/dist/JSCover-all.jar jscover.server.SimpleWebServer . 8080 java -jar target/dist/JSCover-all.jar -ws --proxy --port=3128 --report-dir=target
I am gettign this error when trying to merge two reports, can you take a look
Jul 10, 2015 8:47:33 PM jscover.report.Main runMain INFO: Args: --merge,C:\Users\testreport,C:\Users\report2,C:\rep Jul 10, 2015 8:47:33 PM jscover.report.Main runMain INFO: Starting JSCover 1.0.20-SNAPSHOT merge Jul 10, 2015 8:47:33 PM jscover.report.Main mergeJSON INFO: Merging JSON from 'C:\Users\testreport\jscoverage.json' Jul 10, 2015 8:47:33 PM jscover.report.Main mergeJSON INFO: Merging JSON from 'C:\Users\report2\jscoverage.json' Jul 10, 2015 8:47:34 PM jscover.report.Main mergeOriginalSource INFO: Couldn't find directory 'C:\Users\testreport\original-src' to merge -->\ we need original source code here **
That's just a an INFO
log, not an error, the program will continue. The report uses the original-src
directory to display the file coverage, so it tries to merge them but won't fail if it's not there. It depends on what you're doing as to whether this is a problem or not.
hey I get this error now when trying to merge report Exception in thread "main" java.lang.NullPointerException at jscover.report.FileData.addCoverage(FileData.java:379) at jscover.report.JSONDataMerger.mergeJSONCoverageMaps(JSONDataMerger.java:381) at jscover.report.Main.mergeJSON(Main.java:443) at jscover.report.Main.mergeReports(Main.java:421) at jscover.report.Main.runReport(Main.java:411) at jscover.report.Main.runMain(Main.java:394) at jscover.report.Main.main(Main.java:366)
Can you provide the two files you're trying to merge?
How much is the effort to get https websites via JSCover proxy, can you please elaborate on details? and effort required