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

  That uses a library database of books

Write a Java program that uses a library database of books and patron data, as described in Exercise R22.2. Patrons should be able to check out and return books

  Define a class called counter

Define a class called Counter. An object of this class is used to count things, so it records a count that is a non negative whole number. Include methods to set the counter to 0, to increase the count by

  Program 2 classes one called student one called grades

program 2 classes one called student one called grades functional requirements ask for how many students u need to

  Packer logo method

Being a super Packer fan's wife, this assignment involves the use of the Green Bay Packer logo. Any die-hard Minnesota fans are welcome to use the Viking's logo instead.

  Determine java application on web and structure functions

Determine the Java application on Web and explain how program structure functions. Explain the application in as much detail as possible.

  Create an array of integers at random

create an array of integers at random with a range of 0 through 1000 in Java... any hints?

  Question a jsp expression can contain any java expression

question a jsp expression can contain any java expression that evaluates to aa string objectb java objectc primitive

  Use either an array or a linked list

Use either an Array or a Linked List as an underlying data structure. Of course you need to create class Array or class LinedList in order to implement the methods like mergeSort(), merge(), etc

  Java program use breadth-first search closest broadcast

Write the java program which will use breadth-first search (which you implement as part of your program) to determine the closest broadcast vertex for each vertex in graph.

  Drags html list items to and from a javascript array

1.Write a program which drags html list items to and from a javascript array.2. if an identical list item is already in the array, prevent the list item from dropping in the array. Give an error saying that the list item already exists in the array

  The letters of the alphabet a through z

The letters of the alphabet A through Z can be represented in Morse code. Each letter is represented by a combination of up to four dots and/or dashes, as shown below. Use Java to write and run a console-window program that can convert an English ..

  Client server chat system

Threading and GUI design using Java's network library, threading system, and swing user interlace libraries to implement a basic chat client and saver system. Thc system will allow multiple. remote users to send and receive messages across the net..

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