code coverage web application

15
Code Coverage Copyright © 2016. All rights reserved. https:// bitbucket.org/wishcoder/codecoverage

Upload: ajay-singh

Post on 16-Apr-2017

198 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Code Coverage Web Application

Copyright © 2016. All rights reserved.

Code Coverage

https://bitbucket.org/wishcoder/codecoverage

Page 2: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE

• 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

Page 3: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE - USERS

• 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)

Page 4: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE - INSTALLATION• 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

Page 5: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE - USAGE• Launch Code Coverage Application

– Developer mode: Execute run.bat in application root folder from command prompt

– Installer mode: Run CodeCoverage.exe

Page 6: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE - USAGE

• Start Code Coverage Web Server– Click on ‘Start’ button– Messages console will show application logs– After successful start ‘Admin Console…’ button will be enabled

Page 7: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE - USAGE

• 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

Page 8: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE – USAGE - ADMIN

• Create or update ‘Manager’ level accounts– Logout and log back using Manager account

Page 9: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE – USAGE - MANAGER

• Create and update User accounts

Page 10: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE – USAGE - MANAGER

• Create and update Projects– Select project from list to upload application jar file for code coverage

Page 11: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE – USAGE - MANAGER

• Generate code coverage reports– Select JACOCO coverage files (*.exec) from list to generate project

coverage report

Page 12: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE – USAGE - MANAGER

• View code coverage reports– Click on ‘View’ link– Coverage report will open in browser window

Page 13: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE – USAGE - USER

• Generate JACOCO coverage files (*.exec)– Run java application with following JVM arguments:

-javaagent:lib/jacocoagent.jar=destfile=C:\coverage\app-code-coverage.exec,sessionid=app-code-coverage,

output=file,includes=*,dumponexit=true, append=true

– Coverage file will be generated after java application exit

Page 14: Code Coverage Web Application

Copyright © 2016. All rights reserved.

CODE COVERAGE – USAGE - USER

• Upload JACOCO coverage files (*.exec) for project

Page 15: Code Coverage Web Application

CODE COVERAGE

• ReferencesCode 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 [[email protected]]