Code Coverage Copyright © 2016. All rights reserved. https://bitbucket.org/wishcoder/codecoverage
• 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.
• 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.
• 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.
• 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.
• 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.
• 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.
• Create or update ‘Manager’ level accounts – Logout and log back using Manager account Copyright © 2016. All rights reserved.
• Create and update User accounts Copyright © 2016. All rights reserved.
• Create and update Projects – Select project from list to upload application jar file for code coverage Copyright © 2016. All rights reserved.
• Generate code coverage reports – Select JACOCO coverage files (*.exec) from list to generate project coverage report Copyright © 2016. All rights reserved.
• View code coverage reports – Click on ‘View’ link – Coverage report will open in browser window Copyright © 2016. All rights reserved.
• 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.
• Upload JACOCO coverage files (*.exec) for project Copyright © 2016. All rights reserved.
• 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]

Code Coverage Web Application

  • 1.
    Code Coverage Copyright ©2016. All rights reserved. https://bitbucket.org/wishcoder/codecoverage
  • 2.
    • Code Coverageis 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.
    • Admin – Createand 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.
    • Install MySQLdatabase – 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.
    • Launch CodeCoverage Application – Developer mode: Execute run.bat in application root folder from command prompt – Installer mode: Run CodeCoverage.exe Copyright © 2016. All rights reserved.
  • 6.
    • Start CodeCoverage 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.
    • Open ‘AdminConsole’ 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.
    • Create orupdate ‘Manager’ level accounts – Logout and log back using Manager account Copyright © 2016. All rights reserved.
  • 9.
    • Create andupdate User accounts Copyright © 2016. All rights reserved.
  • 10.
    • Create andupdate Projects – Select project from list to upload application jar file for code coverage Copyright © 2016. All rights reserved.
  • 11.
    • Generate codecoverage reports – Select JACOCO coverage files (*.exec) from list to generate project coverage report Copyright © 2016. All rights reserved.
  • 12.
    • View codecoverage reports – Click on ‘View’ link – Coverage report will open in browser window Copyright © 2016. All rights reserved.
  • 13.
    • Generate JACOCOcoverage 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.
    • Upload JACOCOcoverage files (*.exec) for project Copyright © 2016. All rights reserved.
  • 15.
    • References Code Coveragemay 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]