Skip to content

To know the testing technique mutation tests, It necessary check diff between fake-coverage and true-coverage

Notifications You must be signed in to change notification settings

pedringcoding/java-gradle-pitest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mutation Testing Awesome

📋 Introduction

Most developers are familiar with the concept of unit testing, and how this is useful to ensure the 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 helps ensure that that tests themselves are of high quality by introducing random bugs, or mutations, and checking if any of the 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.

☁️ Getting Started

Follow along this notes. You only will need to have at least Docker installed. All requirements mut be encapsule in docker image and containers using docker-compose.

Clone this repository, and fire up a command-line tool.

To know the testing technique mutation tests, It necessary check diff between fake-coverage and true-coverage

💻 Commands to execute

Must be enabled unit test OperationMutationTest to compare results and execute:

docker-compose -f docker/docker-compose.yml --env-file=.env up -d

Wait for sonarqube to complete startup... You can check accessing to sonarqube

docker exec -it desktop /bin/bash
gradle sonarqube

Note: If request credentials in sonarqube access, you can use admin:admin

To clean up the deployed context:

docker-compose -f docker/docker-compose.yml down -v --rmi all

:octocat: Can you support me?

I will continue to do things and expose notes, but existing many ways to support what I do:

  • Pull requests are welcome a 💫
  • Don't forget to give this Repository a 🌟
  • Buy me a ☕

About

To know the testing technique mutation tests, It necessary check diff between fake-coverage and true-coverage

Topics

Resources

Stars

Watchers

Forks