Page 1 of 1

JSCoverage-Server --proxy is not working

Posted: 2010-01-29 2:23 pm
by SK
I am using jscoverage-server –proxy for getting the storage report. I followed the steps given in the manual
1. I copied jscoverage-server.exe into my tomcat/webapps/myappl-name directory
2. from command prompt I run the jscoverage-server --proxy --ip-address=10.10.10.10 --port=8080
3. I opened the browser (IE) window and given the url 10.10.10.10:8080/jscoverage.html
4. I typed myHost/myapplication in the url box and click Go Button
5. It opens the application and I go to the summary Tab. I have seen no data

Please help me on this Thanks in advance.


Thanks,
SK

Re: JSCoverage-Server --proxy is not working

Posted: 2010-01-29 8:22 pm
by Ed
SK wrote:I am using jscoverage-server –proxy for getting the storage report. I followed the steps given in the manual
1. I copied jscoverage-server.exe into my tomcat/webapps/myappl-name directory
2. from command prompt I run the jscoverage-server --proxy --ip-address=10.10.10.10 --port=8080
Try using the --verbose command line option here - it is easier to diagnose problems.
SK wrote:3. I opened the browser (IE) window and given the url 10.10.10.10:8080/jscoverage.html
Although JSCoverage does work with IE, I recommend using Firefox, especially if you are having problems - it is usually easier to troubleshoot with Firefox.
SK wrote:4. I typed myHost/myapplication in the url box and click Go Button
What is the actual URL you are using? (What is "myHost/myapplication"?)

Re: JSCoverage-Server --proxy is not working

Posted: 2010-02-01 10:06 am
by SK
Try using the --verbose command line option here - it is easier to diagnose problems.
Our application doesn’t support anyother browser. It supports only IE.
What is the actual URL you are using? (What is "myHost/myapplication"?)
http://20.167.32.98:9080/login
More Info:
10.10.10.10 is my machine name and the application hosted on the server. I am accessing the application from my machine and run the scripts. Please help me if I missed out anything here.


Thanks
SK

Re: JSCoverage-Server --proxy is not working

Posted: 2010-02-01 6:17 pm
by Ed
The jscoverage.html URL must use the same host as your application being tested. So you have to use http://20.167.32.98:9080/jscoverage.html to get any coverage data.

Re: JSCoverage-Server --proxy is not working

Posted: 2010-02-02 11:10 am
by Guest
Thanks for your help on this regard.
But I am still not able to see the report.
Again I repeat the step that I can performed.

1. Run the jscoverage-server in the command prompt using the following option
jscoverage-server -- Proxy --verbose --ip-address=10.10.10.10 --port=8080
2. Go to the LAN settings of IE and provided proxy server address as 10.10.10.10 and port=8080
3. Open the new IE window and typed the following address.
a. http://20.167.32.98:9080/jscoverage.html
b. Type logon.jsp in the addressbar and click go button
4. My application start running and I am able to see the JS file in the commend prompt.
GET http://20.167.32.98:9080/touchpoint/js/globalsJSP.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/constants.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/session/session.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... ions_SI.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... matter.vbs HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/acc ... ctTypes.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/products.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/stringUtil.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/Logger.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/hostSupport.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... port_RM.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... port_ST.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... port_IM.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... ort_PRF.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... Factory.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/ ... nerator.js
5. I am able to save the report but if I open the jscoverage-report/jscoverage.html , there is no coverage detail in the report.

So please let me know where I am doing the mistake.

Re: JSCoverage-Server --proxy is not working

Posted: 2010-02-02 7:40 pm
by Ed
Guest wrote: 4. My application start running and I am able to see the JS file in the commend prompt.
GET http://20.167.32.98:9080/touchpoint/js/globalsJSP.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/constants.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/session/session.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/optionActions_SI.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/DataFormatter.vbs HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/account/acctTypes.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/products.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/stringUtil.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/Logger.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/hostSupport.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/hostSupport_RM.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/hostSupport_ST.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/hostSupport_IM.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/hostSupport_PRF.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/XSLTemplateFactory.js HTTP/1.1
GET http://20.167.32.98:9080/touchpoint/js/IFXTransactions/RqUIDGenerator.js
The --verbose output looks OK, the proxy seems to be serving all the JavaScript files. Are you getting the coverage data at this point? If you click the "Summary" tab, do you see the coverage data?
Guest wrote: 5. I am able to save the report but if I open the jscoverage-report/jscoverage.html , there is no coverage detail in the report.
When you are using the --verbose option and you save the coverage report, you should see a line like this:

POST http://20.167.32.98:9080/jscoverage-store HTTP/1.1

Are you getting this line in the output?

Re: JSCoverage-Server --proxy is not working

Posted: 2010-02-03 9:44 am
by SK
I am able to see the coverage result now. Thanks for your help all the way.

however, there is an issue.

jscoverage-server: http:// 20.167.32.98:9080/touchpoint/js/xml.js: script contains line with more than 65,535 characters

jscoverage-server: http://fis-tpapps06-in:9080/touchpoint/ ... saction.js: script contains line with more than 65,535 characters

our JS files are too large and I received these error frequently.
Can you help me to solve this?

Thanks in advance
SK

Re: JSCoverage-Server --proxy is not working

Posted: 2010-02-03 5:08 pm
by Ed
SK wrote:jscoverage-server: http:// 20.167.32.98:9080/touchpoint/js/xml.js: script contains line with more than 65,535 characters

jscoverage-server: http://fis-tpapps06-in:9080/touchpoint/ ... saction.js: script contains line with more than 65,535 characters
Yes, this is a known issue, although it seems unusual that you would have a file with a line longer than 65,535 characters. Are you running your JavaScript code through some sort of minifier or compressor? (e.g., YUI Compressor)

You always want to make sure you are not using compressed/minified files when you are measuring code coverage. Even if the file does not exceed the 65,535 character limit, the code coverage statistics will not make any sense, because JSCoverage measures line coverage, and a compressed/minified file will probably have only one line. You want to use the original, uncompressed source code for your tests.