Who am I

Mutants vs Properties

  • How to verify quality of your tests?
  • Change our code and see what happens
  • A lot of data

What do we expect from tests?

Mutate

Run tests

Analyze

Mutation testing

 

Mutants

  • arithmetic operations
  • boolean literals
  • removal mutators
  • Linq mutations

Life of mutants

  • Killed
  • Survived
  • No coverage

Stryker .Net

Mutants, I don't hate them.

I just know what they can do.

How to do it?

Install Stryker from dotnet tools

run dotnet stryker

Profit $$

Running stryker

  • Easy to find uncovered cases
  • Different way to look at tests
  • Slow
  • Can't run it on solution
  • Not many mutators yet
  • A lot of noise, has to be configured

Property Based Testing

What is it?

A lot of unit tests at once

Shrinking

The thing that QuickCheck does

How to do it?

You have to write some code

Learn FsCheck syntax

  • Tests a lot of data points
  • Random values can find bugs
  • Tests a lot of data points
  • Random values can find bugs
  • Require different mindset
  • Unpopular
  • Async

Thank you!

Mutants vs Properties

By jciechowski

Mutants vs Properties

  • 111