This project demonstrates the concept of mutation testing, a software testing technique that deliberately introduces small changes (mutants) into source code to evaluate how well a test suite can detect faults. The goal is to assess and improve test quality by measuring how effectively tests “kill” the introduced mutants.
- Applies defined mutation operators to the
Polynomialclass - Generates mutant versions of code (e.g., modified coefficients, altered logic)
- Runs the test suite against each mutant
- Reports which mutations were detected (“killed”) and which survived
original/— OriginalPolynomialimplementationmutants/— Mutated versions of the original codetests/— Unit tests to check behavior against different mutationsREADME.md— This documentation
- Understanding of mutation testing as a technique in software quality assurance
- Python programming and test automation
- Designing mutation operators to simulate realistic faults
- Evaluating test suite effectiveness
- Clone the repo
git clone https://github.com/chazdj/MutationTesting.git
- Navigate into the directory
cd MutationTesting - Run the provided tests (e.g., using pytest)
pytest
- Mutation testing reveals weaknesses in tests that code coverage alone might miss.
- Designing meaningful mutation operators requires understanding of both code logic and test assumptions.
- Interpreting mutant survival vs. killing helps plan stronger test cases
-
Edge Case Testing: Implement tests for extreme values of polynomial coefficients, including very large/small integers, to catch edge logic faults.
-
Parameter Sensitivity Testing: Test changes to parameters like
epsilonacross a wide range of values to ensure fault detection. -
Increase Redundancy Detection: Introduce targeted test cases that check for side effects caused by redundant operations or logic missteps.
-
Expand Test Scenarios for Arithmetic Logic: Test additional combinations of operations and sequences in polynomial addition, subtraction, and multiplication.
-
Improve Input-Output Coverage: Enhance testing to explore all input combinations, particularly ones near boundary values or undefined inputs.
Created by Chastidy Joanem
GitHub: @chazdj