Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Does anyone have any experience using code coverage tools for web applications?

I primarily work with Webdriver and JUnit, but I am not sure if we are covering all the possible cases.

This may overlap with test coverage.

Basically, how to ensure test coverage/code coverage for a website.

share|improve this question
    
Welcome to SQA, user3249785. What kind of research have you already done to figure this out? Adding that information to your question will help us with our answers. –  user246 Jan 30 at 18:50
    
Also, are you talking about code coverage for the server side code, javascript or both? There are very different solutions for each. –  Sam Woods Jan 31 at 0:27
    
I'm looking for general advice at this point. –  Ben Feb 4 at 14:20

2 Answers 2

All I could say is we cannot test code coverage completely and we would not know regarding that since we are QA / Testers and not developers. All we could do is we test the higher end functionality depending on the web application! And later all smaller chunks of the web application is being covered by the test cases you prepare. If you are knowing the code as per your question you are working mainly on webdriver and JUnit so this is an added advantage like you sit with the application and test end to end then later try to analyse if all the functionality are working perfectly. If you find any defect or any bug then "Code Coverage" isn't proper thats all! Bottom line is every button, tab, clicks etc should be covered in your test cases then its possible for complete coverage of the functionality ! If possible follow this link too as ans is written for the code coverage too : When to use White box Testing in a software or a website? Hopefully you got the answer for your questions. If so then please let me know. Thanks !

share|improve this answer
    
Why can't we test code coverage? Being a 'tester' doesn't mean you can't access the code - or ask for coverage of tests to be measured –  Phil Kirkham Jan 31 at 21:42
    
Hello Phil Kirkham, I never said that whether we could access the code or not. I just said that being a tester code coverage can be dependent on our test cases as well and it can be tested depending upon the Black or White box testing who are specialised with. –  Rekha Feb 3 at 11:47

For backend coverage (mostly java), we use Cobertura: http://cobertura.github.io/cobertura/

The developers tend to use Emma, in Eclipse: http://emma.sourceforge.net/

For frontend (JavaScript), I've heard good things about ScriptCover: http://googletesting.blogspot.com/2011/10/scriptcover-makes-javascript-coverage.html

Good luck!

share|improve this answer
    
Thank you. That is a good place to start. –  Ben Feb 4 at 14:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.