Automated code coverage and cyclomatic complexity analyses

Assignment Help JAVA Programming
Reference no: EM13696981

Automated code coverage and cyclomatic complexity analyses

Part A: Installing Java SE Development Kit (JDK)

1. If you don't have any Java version installed on your computer, install Java SE Development Kit (JDK).

4. Note: if you have one or multiple java versions on your machine already, it may be advisable to install a new operating system virtual machine. Then install the new version of JDK on the OS virtual machine.

Part B: Obtaining C and C++ code counter

Part C: Generating software metrics and cyclomatic complexity

Find your assigned test application in Table 1 at the end of this document.

Change directory to the "src" folder that contains the java source files of your assigned java test application. note: for java2d, the java source files are in .\java2d\src\java2d folder.

First display date by typing command "date" in the command line.

Then display time by typing command "time" in the command line.

To generate software metrics of your assigned java test application, use the command "c:\{your cccc directory}\cccc.exe *.java".

A .cccc folder in {your assigned java test application directory}\src is created that contains the test results. View the report in the primary html output such as .cccc\cccc.html.

Part D: Obtaining EMMA

There is also an emma plug-in for Eclipse, if you are familiar with Eclipse. or do the following.

a. From your Eclipse menu select Help → Eclipse Marketplace. Search for eclEmma. Click install for "EclEmma Java Code Coverage". Follow the steps in the installation wizard.

b. Or From your Eclipse menu select Help → Install New Software... In the Install dialog enter https://update.eclemma.org/ at the Work with field. Check the latest EclEmma version and click Next. Follow the steps in the installation wizard.

Part E: Homework - Generating a code coverage report.

1. Find your assigned test application in Table 1 at the end of this document.

2. If you have Emma plug-in installed with Eclipse, try to generate coverage report

3. Otherwise, create a "test" folder under c:\ dirve such as c:\test.

4. Copy the folder containing jar file and src folder of your assigned test application to c:\test folder. note: use java.exe and test jar file from the same jdk package.

5. To run EMMA in a command window, first open a DOS command window.

6. Then display date by typing command "date" in the command line.

7. Then display time by typing command "time" in the command line.

8. Then set classpath by typing "set classpath=%CLASSPATH%;{your emma.jar directory}/emma.jar".

Note1: you need to make sure "java" command works first. Classpath should point to ".;javahome\jdk\bin" Note2: you may also do a "echo %classpath%" command to see if it contains ".;javahome\jdk\bin;{your emma.jar directory}/emma.jar"

9. Change directory to the folder that contains your assigned java test application. Note: use command "cd" to change directory, e.g., cd c:\test.

10. Use the command "java emmarun -r html -jar YourTestApp.jar" to generate a code coverage report.

11. Try to do or test a few things with the test application. Then exit application.

12. View code coverage report in html format by opening {your assigned java test application directory}\coverage\index.html. The percentage of code coverage depends on how much you do with the application.

13. Take screenshots of your work that contains DOS command window that shows classpath and execution log as well as the coverage report.

14. Check to see if the extent of testing in step 10 correlates with the percentage of code coverage in the report.

Reference no: EM13696981

Questions Cloud

How far does he jump in the horizontal direction : A long jumper leaves the ground at an angle of 23.5o above the horizontal and at a speed of 11.0 m/s. How far does he jump in the horizontal direction
What is their distance of closest approach : An alpha particle is a nucleus of Helium. It has twice the charge and four times the mass of the proton (mp = 1.67 x 10-27 kg, c = 1.60 x 10-19 C). What is their distance of closest approach
What is the concentration of the feso4 solution : Problem- A 18.42 mL sample of a 0.1894 M KMnO4 solution is needed to oxidize 15.34 mL of a FeSO4 solution in an acidic medium. What is the concentration of the FeSO4 solution
Estimate what is the magnitude of the electric field : An equilateral triangle is formed from three rods, each of length 10 cm. What is the magnitude of the electric field at the center of the triangle
Automated code coverage and cyclomatic complexity analyses : Automated code coverage and cyclomatic complexity analyses -
Determine the total velocity vector at any time : A particle moves on the xy-plane, starting from the origin at t = 0 with an initial velocity having an x component of 18 m/s and a y component of -11 m/s. Determine the total velocity vector at any time
Give the formula of coordination compound : Problem- Give the formula of each coordination compound. Include square brackets around the coordination complex. Do not include the oxidation state on the metal. Use parentheses only around polyatomic ligands. For ethylenediamine, use (en) in the..
Determine the final pressure of the container : A rigid container contains saturated water at a pressure of 2 bar and a quality of 0.42. Determine the final pressure of the container
What is average density of the sphere : Suppose that one-half the mass of the sphere has a density of 2.70 x 103 kg/m3, What is average density of the sphere

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd