mutation testing - voxxed days bucharest 10.03.2017
TRANSCRIPT
public class Calculator { public int sum(int a, int b) { return a + b; }}@Testpublic void force100PercentCoverage() { calculator.sum(0, 0);}
> MathMutator>> Generated 1 Killed 0 (0%)> KILLED 0 SURVIVED 1 > TIMED_OUT 0 NON_VIABLE 0 > MEMORY_ERROR 0 NOT_STARTED 0 > STARTED 0 RUN_ERROR 0 > NO_COVERAGE 0
@Test public void Should_ReturnSum_When_SummingTwoValues() { // given int a = 1; int b = 2; // when int result = calculator.sum(a, b); // then assertThat(result).isEqualTo(3);}
> MathMutator>> Generated 1 Killed 1 (100%)> KILLED 1 SURVIVED 0 > TIMED_OUT 0 NON_VIABLE 0 > MEMORY_ERROR 0 NOT_STARTED 0 > STARTED 0 RUN_ERROR 0 > NO_COVERAGE 0