Git Product home page Git Product logo

introduction-to-mutation-testing's Introduction

Please support this project by putting a star on it

Introduction to Mutation Testing

Most developers are familiar with the concept of unit testing, and how this is useful to ensure validity of your code, and guard against bugs creeping up in the future. Java developers will typically use JUnit to write their unit tests. Many projects use test coverage tools such as Jacoco to ensure that the code as written has tests to validate it. But how strong are the tests? Will they stand up against bugs introduced by future code changes?

Mutation testing help ensure that that tests themselves are of high quality by introducing random bugs, or mutations, and checking if any of unit tests can catch the bug. While this concept has been around for a while, it is just recently that good tools are becoming available for this purpose. One such tool is PIT.

This tutorial explores how mutation testing works. We will do test-driven development of a simple palindrome function, and follow it through code coverage with Jacoco and mutation testing with PIT. Start by reading the brief overview of mutation testing included in this tutorial. Read the README file for instructions at each step.

Expected time to complete tutorial: 30 minutes

Getting Started

Follow along this tutorial. You will need to have at least Java 8 installed, and Apache Maven on the PATH. Clone this repository, and fire up an IDE such as IntelliJ IDEA to follow along.

Move to Step 1

In order to move to Step 1, checkout git branch step1 by running git checkout step1.

introduction-to-mutation-testing's People

Contributors

sualeh avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.