Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Code Coverage Web Application

452 views

Published on

Code Coverage is a java/web application built using JACOCO library. Application provides web interface to generate code coverage reports. Use MySQL database.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Code Coverage Web Application

  1. 1. Code Coverage Copyright © 2016. All rights reserved. https://bitbucket.org/wishcoder/codecoverage
  2. 2. • Code Coverage is a java/web application built using JACOCO library. • Use MySQL database • Application provides web interface to generate code coverage reports. • Application supports three user categories: – Admin – Manager – User Copyright © 2016. All rights reserved.
  3. 3. • Admin – Create and manage ‘Manager’ accounts • Manager – Create and manage ‘User’ accounts – Create and manage Projects – Generate coverage reports using uploaded JACOCO coverage files (*.exec) • User – Upload JACOCO coverage files (*.exec) Copyright © 2016. All rights reserved.
  4. 4. • Install MySQL database – Create schema ‘codecoveragedb’ (See ‘Override default values’) – Create user ‘coverageadmin’ with password ‘coveragesecret’ – Assign database admin rights to this user for ‘codecoveragedb’ schema – DON’T create database tables. Code Coverage application will create tables and other required database objects when started first time • Override default database and web server values – Create property file CodeCoverage.properties in application root folder – Override following properties: • #Application • app.title=Code Coverage Server • #Database • database.name=codecoveragedb • database.port=3306 • database.user=coverageadmin [Used to access database and to access web interface as Admin] • database.user.pwd=coveragesecret [Used to access database and to access web interface as Admin] • #Web Server • web.server.port=8080 Copyright © 2016. All rights reserved.
  5. 5. • Launch Code Coverage Application – Developer mode: Execute run.bat in application root folder from command prompt – Installer mode: Run CodeCoverage.exe Copyright © 2016. All rights reserved.
  6. 6. • Start Code Coverage Web Server – Click on ‘Start’ button – Messages console will show application logs – After successful start ‘Admin Console…’ button will be enabled Copyright © 2016. All rights reserved.
  7. 7. • Open ‘Admin Console’ in web browser (Supported browsers: Firefox and Chrome) – Click on ‘Admin Console…’ button – Login as admin using user name and password used to create database user Copyright © 2016. All rights reserved.
  8. 8. • Create or update ‘Manager’ level accounts – Logout and log back using Manager account Copyright © 2016. All rights reserved.
  9. 9. • Create and update User accounts Copyright © 2016. All rights reserved.
  10. 10. • Create and update Projects – Select project from list to upload application jar file for code coverage Copyright © 2016. All rights reserved.
  11. 11. • Generate code coverage reports – Select JACOCO coverage files (*.exec) from list to generate project coverage report Copyright © 2016. All rights reserved.
  12. 12. • View code coverage reports – Click on ‘View’ link – Coverage report will open in browser window Copyright © 2016. All rights reserved.
  13. 13. • Generate JACOCO coverage files (*.exec) – Run java application with following JVM arguments: -javaagent:lib/jacocoagent.jar=destfile=C:coverageapp-code- coverage.exec,sessionid=app-code-coverage, output=file,includes=*, dumponexit=true, append=true – Coverage file will be generated after java application exit Copyright © 2016. All rights reserved.
  14. 14. • Upload JACOCO coverage files (*.exec) for project Copyright © 2016. All rights reserved.
  15. 15. • References Code Coverage may utilize certain third party software. Such third party software is copyrighted and licensed by their respective owners: • JACOCO • Java sample application used in Code Coverage example : Movies • Jetty embedded web server • Hibernate • Log4J • Java • Jquery • Jquery file upload plugin • Jquery themes plugin • Java MigLayout Copyright © 2016. All rights reserved. https://bitbucket.org/wishcoder/coveragewebapp/ https://bitbucket.org/wishcoder/coverageserverapp Ajay Singh [message4ajay@gmail.com]

×