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

  Java problem - g queue

A queue is an ordered collection of items in which the removal of items is restricted to the FIFO ( rst in rst out) principle.

  Program that prompts the user to enter the year and display

Write a program that prompts the user to enter the the year and first day of the year and displays the calendar table for the year on the console. For example , if the user entered the year 2013, and 2 for tuesday, January 1, 2013, your program shoul..

  Distance traveled modification

Distance Traveled Modification

  Build a thread system

Identify all Nachos classes that you will modify and where you plan to do you modifications - Identify all classes that you plan to implement and give the API for each class,

  Can linear search algorithm be encoded using recursion

Determine the average amount of time people spend waiting for tables and provide examples from the "real world" of unsorted lists, sorted lists, indexed lists, lists that permit duplicate elements, and lists that do not permit duplicate elements

  Write a recursive program

Write a recursive program to compute the number of ways in which an integer k can be written as sum

  Write a java program that reads unspecified number

Write a java program that reads unspecified number of integers (the input 0 signifies the end of the input). Calculates and displays the sum and the average of the input value (not counting zero). The program also finds the maximum and minimum of ..

  Algorithm analysis with advanced data structures

Algorithm Analysis with Advanced Data Structures, Your good friend, a Rock Star, asked you to create a Time Manager app for him, The Rock Star performs gigs at certain dates, all around the country - at most one gig per day

  Design a class that you can use to track the books

Define a class PileOfBooks that implements the interface described in question one. use a resizeable array oin your implementation. then write unit test woth adequate test cases for your implementation of class PiloOfBooks.

  Build a very straightforward and fully functional machine

Build a very straightforward and fully functional machine learning classifier with the K-Nearest Neighbor (KNN) algorithm. The KNN model will read a set of data specified by the user, decide the appropriate class of the new instance, and finally o..

  Write a class array that encapsulates an array

Write a class Array that encapsulates an array and provides bounds-checked access. The private instance variables should be int index and inarray[10]. The public members should be a default constructor and methods (signatures shown below) to provide ..

  Write an application that uses string method region

Write an application that uses String method region - Matches to compare two strings input by the user. The application should input the number of characters to be compared and the starting index of the comparison.

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