The aim of this project is to measure different projects using different metrics and to co-relate them. Here we perform various different coverage tests for developing test cases so that entire code is covered and there are no parts of the code left uncovered. The coverage helps us to make better test suites that can detect the anomalies and code mutants injected in the main code. The various coverages used to for code coverage are:
- Statement Coverage: measurement procedure wherein the number of lines of code covered under certain circumstances is calculated based on the inputs from the users.
- Branch Coverage: Branch coverage is a measurement to calculate the number of branches executed per user input.
- Mutation Score: Mutation score is a testing practice wherein we check the accuracy or precision of the test cases.
- Cyclomatic Complexity: Cyclomatic Complexity is the measure number of linearly independent paths that can be executed in a program.
- Metrics based Software Maintenance Effort Model: A model for estimating adaptive software maintenance effort in person hours, the adaptive maintenance effort model (AMEffMo)
- Software Defect Density: Defect Density is the number of defects confirmed in software/module during a specific period of operation or development divided by the size of the software/module
- Apache Commons Math - project details , source-code
- Apache Commons Pool - project details , source-code
- Apache Commons FileUpload - project details , source-code
- Apache Commons IO - project details , source-code
- Apache Commons Collections4 - project details , source-code
.
├── Projects # Data Analysis and Data Collection for different metrics
├── DataAnalysisNoteBook # Scripts for finding Correlations
├── Project Source Code # latest version of project
├── Docs # Documentation files (alternatively `doc`)
└── README.md
- Prerequisites : EclEmma requires Eclipse 3.8 or higher and Java 1.5 or higher. It has no dependencies on a particular operating system. Of course your Eclipse installation needs to contain the Java development tools (JDT) which is included in the default SDK installation.
- Installation Steps:
Step 1. From your Eclipse menu select Help → Eclipse Marketplace.
Step 2. Search for "EclEmma" or "Jacoco".
Step 3. Hit Install for the entry "EclEmma Java Code Coverage".
Step 4. Follow the steps in the installation wizard.
- Verification : The installation was successful if you can see the coverage launcher in the toolbar of the Java perspective.
- PIT requires Java 5 or above and either JUnit or TestNG to be on the classpath.
- Add the plugin to build/plugins in your pom.xml
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>LATEST</version>
<configuration>
<threads>
24
</threads>
<targetClasses>
<param>your.package.name.*</param>
</targetClasses>
<targetTests>
<param>your.package.name.*</param>
</targetTests>
<timeoutFactor>
0.25
</timeoutFactor>
<timeoutConstant>
1000
</timeoutConstant>
<mutationUnitSize>
5
</mutationUnitSize>
<exportLineCoverage>
true
</exportLineCoverage>
<maxMutationsPerClass>
3
</maxMutationsPerClass>
<testPlugin>
junit
</testPlugin>
<withHistory>
true
</withHistory>
<outputFormats>
<outputFormat>CSV</outputFormat>
<outputFormat>HTML</outputFormat>
</outputFormats>
</configuration>
</plugin>
- Mutation Coverage : It can be run directly from the commandline
mvn org.pitest:pitest-maven:mutationCoverage
- To speed-up repeated analysis of the same codebase : It can be run directly from the commandline
mvn -DwithHistory org.pitest:pitest-maven:mutationCoverage
- Depending your operating system, one of these installation methods may work for you:
npm install -g cloc # https://www.npmjs.com/package/cloc
sudo apt-get install cloc # Debian, Ubuntu
sudo yum install cloc # Red Hat, Fedora
sudo pacman -S cloc # Arch
sudo pkg install cloc # FreeBSD
sudo port install cloc # Mac OS X with MacPorts
- To run cloc on Windows computers, one must first open up a command (aka DOS) window and invoke cloc.exe from the command line there.
prompt> cloc
Usage: cloc [options] <file(s)/dir(s)> | <set 1> <set 2> | <report files>
Input Options :
--diff <set1> <set2>
--csv : Write the results as comma separated values.
--out=<file> : Synonym for --report-file=<file>.
1. Harsh Mehta : harshmehta493@gmail.com
2. Yash Chandreshkumar Golwala : golwalayash@gmail.com
3. Raghav Dutta : raghav.dutta29@gmail.com
4. Navroop Virk : virknavroop@gmail.com
5. Manisha Jalota : manisha.jalota223@gmail.com