Skip to content

Commit

Permalink
Merge pull request #22 from jaksonlin/fix-bug
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
jaksonlin authored Oct 12, 2024
2 parents e6ad6fa + 3a2cd06 commit 9723c9c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pitest-Gradle

<!-- Plugin description -->
This is a plugin for IntelliJ IDEA that allows you to run PIT mutation testing on your Gradle project.
This is a plugin for IntelliJ IDEA that allows you to run PITest (https://pitest.org/) mutation testing on your Gradle project.
<!-- Plugin description end -->

## Features
Expand All @@ -23,9 +23,40 @@ This is a plugin for IntelliJ IDEA that allows you to run PIT mutation testing o
3. Input the target mutation test class, for example `com.example.MyClass` or `MyClass`, and click `OK`
4. The mutation test will run and the results will be displayed in the `Mutation Tool Window`

## Screenshots


To run the plugin, right click on the test file and select `Run Mutation Test` in the `Unittest Helpers` menu.

![run pitest](./screenshots/1.png)


Input the target mutation test class, for example `com.example.MyClass` or `MyClass`, and click `OK`

![input target class](./screenshots/2.png)

It will prompt you with the collected classpath information, click `OK` (you can also click `Cancel` to stop the mutation test)

![classpath](./screenshots/3.png)

The mutation test will run; and upon finishing, it will popup a dialog with the verbose output of the mutation test, as well as a button to view the results in the browser

![mutation test results](./screenshots/4.png)

You can also navigate to the `MutationTestHistory` tool window to view the results;
double click on a row to will open the code editor to the class under test, and the editor will be decorated with the mutation test results

![mutation test history](./screenshots/5.png)

`MutationTestHistory` tool window also support searching, input the class name and press enter to locate the class; and a second enter will open the code editor to the class under test.

![search](./screenshots/6.png)




## Known Issues

- [ ] [!due to issue](https://stackoverflow.com/questions/70448459/gradle-error-in-ijresolvers-gradle-when-running-using-intellij-idea/70597547#70597547) you need to disable kotlin plugin if using old version of gradle like 4.4
- [ ] it cannot find the classpath if the project is not managed by Gradle, click on the Project structure and import the project as Gradle project
- [ ] it cannot find the resource directory if you don't mark the directory as resource root, right click on the directory and mark as resource root

Expand Down
Binary file added screenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9723c9c

Please sign in to comment.