I have experimented with JSCover but unfortunately it does not seem to be ready to use
I have spent several hours trying to get the -proxy option of JSCover to work, but the proxy binding does not seem to work
Furthermore JSCover does not seem to be suited for running automated Selenium tests. The JSCover manual mentions however that it shall be possible but I fail to understand how to make that happen.
I would be really grateful for a solution to my problem.
I have experimented with JSCover but unfortunately it does not seem to be ready to usePlenty of people are using this successfully including myself.
I have spent several hours trying to get the -proxy option of JSCover to work, but the proxy binding does not seem to work
Furthermore JSCover does not seem to be suited for running automated Selenium tests. The JSCover manual mentions however that it shall be possible but I fail to understand how to make that happen.
I would be really grateful for a solution to my problem.
a lot of java codeRemoving the comments header and imports, and it's only ~100 lines of code.
If you'd prefer to wait, I'll (hopefully) add those bits of functionality into special HTML pages so you can achieve the same without any JavaScript calls, so the process will be:
Thanks for the explanation. I have now had time to look more into this and I believe that I have gotten further but I am not quite there yet. I am afraid that I need an even more detailed description. Let me describe the steps I have done and please point out were I have misunderstood and go wrong. I am using JSCover-1.0.5, Firefox 24.0 and the target html page I want to run the tests on is located at http://localhost/LL/Study.php on my local PC. What I do is:
I am dying to get the information as shown in the Source tab of jscoverage.html in your server example. I am guessing that I confuse when to use “localhost”, when to use “localhost-proxy” and when to add the “:8080” afterwards. Please enlighten me.
I also tried a different approach and got further. This approach will however not allow me to run Selenium. After step 4 above I instead:
5. navigated to http://localhost-proxy:8080/jscoverage.html and in the URL field entered http://localhost/LL/Study.php . Now the test page loaded inside the JSCover frame which I believe is good. Should I have accessed http://localhost-proxy/LL/Study.php instead? That seemed to give the same result though.
Please help me out here since my dream is to easily and regularly be able to run Selenium tests and then inspect the JavaScript Coverage to be able to determine if I have any dead code or missing test cases.
Is it necessary for me to start web-server.bat or would jscover-proxy.bat be enough?
I started examples\proxy\jscover-proxy.bat
There I only found the file /ws/js/base_single_icon.js and not my own JS-file
5. navigated to http://localhost-proxy:8080/jscoverage.html and in the URL field entered http://localhost/LL/Study.php . Now the test page loaded inside the JSCover frame...
I gave it another try with your tips but unfortunately still no success.
Just to make sure that there was not problem with my source code, I copied your example files script.js and index.html to the root of my web server. I had no problem accessing them at http://localhost-proxy/. When I however called http://localhost-proxy:8080/jscoverage.html the page hung when I pressed the Summary tab. When trying again and choosing the Store tab instead and hitting Store Report, the content in target\jscover-proxy\jscoverage.html turned out to be empty.
Since no one else seems to be having any troubles with this, I am starting to suspect that my problems could be caused by the fact that I have an old computer (5+ years). I will try to get hold of a new one and try it out again to see if that will improve the situation.