Posts

Showing posts with the label TESTING

PI Mutation Tests

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. https://pitest.org/ Example Method: isPositive Actual implementation:   if (number >= 0) return true; Following test will pass:   assertEquals(true, xxx.isPositive(10)); But fail for following code mutation:   if (number > 0) return true; To kill the mutation, the unit test should test boundaries:   assertEquals(true, xxx.isPositive(10));   assertEquals(true, xxx.isPositive(0)); See:  https://www.mkyong.com/maven/maven-pitest-mutation-testing-example/

Unit testing Spring Boot applications

Check here a good overview of unit testing your spring boot application: 1- Unit Testing with Spring Boot 2- Testing Spring MVC Web Controllers with @WebMvcTest 3- Testing JPA Queries with @DataJpaTest 4- Integration Tests with @SpringBootTest Start with:  https://reflectoring.io/unit-testing-spring-boot/

Never forget about Right-BICEP

Right - Are the results right? B - are all the boundary conditions correct? I - can you check the inverse relationships? C - can you cross-check results using other means? E - can you force error conditions to happen? P - are performance characteristics within bounds?

Welcome to FitNesse!

The fully integrated standalone wiki, and acceptance testing framework http://fitnesse.org/FrontPage

Right-BICEPS

Right: Are the results RIGHT?    // format, range, cardinality ... B: Are all the BOUNDARY conditions correct?   // age 334?!!, month 14? I: Can you test the INVERSE relationship?  // C: Can you CROSS-CHECK using other methods/means?  //  calculate it in the tes method to crosscheck E: Can you force ERRORS? // io exception, no db or network connection etc. P: Are PERFORMANCE conditions within bounds? // loadtest S: Alwasy go for the whole SET See more:  http://testen.fontysvenlo.org/metiq/wk03/wk03_handout.pdf