seer-lab / MutationScorePredictor

A project that will predict the mutation score of methods and classes using a support vector machine and source code metrics

Home Page:http://www.sqrlab.ca

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Information

Author: Kevin Jalbert (kevin.j.jalbert@gmail.com)

Copyright: Copyright (c) 2011 Kevin Jalbert

License: MIT License

Introduction

The mutation score predictor is a technique that allows one to predict the mutation score of methods and classes within a Java project. The benefit of predicting the mutation score is that one does not need to actually execute the mutation testing process. Mutation testing is a costly procedure as it requires multiple executions of the test suite. By predicting with a reasonable level of accuracy the mutation score of methods and classes mutation scores can be acquire with relatively low resource consumption.

Background

Some quick background material on mutation testing, support vector machines and software metrics are supplied in the following sections.

Mutation Testing

Mutation testing is a technique that evaluates the coverage achieved by a unit test suite for a project. The objective of mutation testing is to identify weak areas in the unit test suite, this is accomplished by seeding faults into the project. A mutant is a copy of the project except for a newly introduce fault, as a result of a single change. If a mutant is detected by the test suite then is was killed, otherwise it was undetected. A mutation score is given at the ending of the mutation testing process that quantifies the test suites ability to kill mutants (given as a percent of killed mutants).

The selected mutation testing tool is Javalanche.

Support Vector Machine

Support vector machine is a machine learning technique that falls under the category of supervised learning algorithms. This technique is capable of learning on a set of features dictate the category of a data item, essentially it is a classifier. Supervised learning algorithms will first be trained on known data (features and categories are known), and then are used on the test data (only features known). The classifier will attempt to correctly classify the unknown data given a model that was created during the training phase.

The selected support vector machine tool is LIBSVM.

Software Metrics

Software metrics are measurements of software artifact attributes. These attributes commonly characterize structural properties such as size and complexity. Our approach uses source code and test suite metrics as these two software artifacts are components of the mutation testing process. We gather a set of source code metrics for both the system under test and the test suite. We further collect the test suite's coverage over the system under test.

The selected source code metric tool is the Eclipse Metrics Plugin.

The selected test suite coverage metric tool is EMMA.

Instructions

This project requires multiple languages and tools to function as intended. The list of requirements are displayed below, as well as the method to execute this project as intended. To aid the user in executing the method, a Rakefile exists with the project to automate some of the steps.

Requirements

The following list enumerates the requirements for this project. The project was developed on Linux and uses some Linux-only features.

  1. Linux/Bash/Git
  2. Ruby
  3. Python
  4. Java
  5. Eclipse
  6. Eclipse Metric Plugin
  7. Ant
  8. Maven (Optional, only if working with a project that uses Maven)

Method

  1. Import project into Eclipse (consider looking at Selecting a Project)
  2. Enable the metrics reporting (within the project's properties in Eclipse)
  3. Run the rake task 'install' to install the necessary components
  4. Run the rake task 'setup_svm' to build up the support vector machine
  5. Run the rake task 'cross_validation' to test the cross validation accuracy

Usage

See the Usage page in the Wiki for detailed explaination of the the various commands provided in the mutation_score_predictor.

About

A project that will predict the mutation score of methods and classes using a support vector machine and source code metrics

http://www.sqrlab.ca

License:MIT License


Languages

Language:Ruby 99.8%Language:Java 0.2%