Home > Desarrollo, Librerías/Frameworks, Testing > PIT: check your tests really detect code failures

PIT: check your tests really detect code failures

PIT is an Open Source mutation testing system for Java that makes it possible to test the effectiveness of your unit tests.

You can thinkof mutation testing as either as an automated test of your tests, or as a much more in depth form of code coverage.

Unlike traditional line and branch coverage tools PIT does not just confirm that your tests execute your code, it confirms that your tests are actually able to detect faults in it.

Mutation testing is conceptually quite simple. Faults (or mutations) are automatically seeded into your code, then your tests are run. If your tests fail then the mutation is killed, if your tests pass then the mutation lived.

The quality of your tests can be gauged from the percentage of mutations killed.

Mutation testing is an computationally expensive process and has not been widely used outside of academia, but PIT aims to make it a practical technique for real codebases by concentrating on both performance and ease of use.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: