https://github.com/pitest/pitclipse
Mutation testing for Java in Eclipse IDE. Based on PIT (Pitest).
https://github.com/pitest/pitclipse
eclipse eclipse-ide eclipse-plugin java mutation mutation-coverage mutation-testing pit pitest testing-tool
Last synced: 10 days ago
JSON representation
Mutation testing for Java in Eclipse IDE. Based on PIT (Pitest).
- Host: GitHub
- URL: https://github.com/pitest/pitclipse
- Owner: pitest
- License: apache-2.0
- Created: 2012-05-14T13:47:00.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T17:25:57.000Z (almost 2 years ago)
- Last Synced: 2024-04-02T22:47:30.960Z (almost 2 years ago)
- Topics: eclipse, eclipse-ide, eclipse-plugin, java, mutation, mutation-coverage, mutation-testing, pit, pitest, testing-tool
- Language: Java
- Homepage: https://pitest.org
- Size: 15.2 MB
- Stars: 56
- Watchers: 11
- Forks: 17
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Pitclipse
Test your tests right into your IDE!
[](https://github.com/pitest/pitclipse/actions/workflows/maven.yml) [](https://github.com/pitest/pitclipse/actions/workflows/windows-mac.yml)
[](https://sonarcloud.io/dashboard?id=org.pitest%3Aorg.pitest.pitclipse) [](https://sonarcloud.io/dashboard?id=org.pitest%3Aorg.pitest.pitclipse) [](https://sonarcloud.io/dashboard?id=org.pitest%3Aorg.pitest.pitclipse)
Provides mutation coverage for your Java programs within the Eclipse IDE. Built on [PIT (Pitest)](http://pitest.org) for reliability.
## What is mutation testing?
> 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.
>
> The quality of your tests can be gauged from the percentage of mutations killed.
>
> *Henry Coles, [pitest.org](https://pitest.org)*
## Main Features
- **Reliability**: relies on [PIT (Pitest)](http://pitest.org)
- **Customization**: provides numerous preferences to tailor analysis
- **JUnit support**: works with both JUnit 4 and JUnit 5 tests
## Usage
Once the plug-in is installed (see [Installation](#Installation) below), you can run Pitest:
- Right-click on a Java project defining unit tests
- `Run As` > `PIT Mutation Test`
Wait a few seconds, two views should open to show the results:
- **PIT Summary**: shows the percentage of mutation coverage
- **PIT Mutations**: shows the detected mutations and their location in code
It is also possible to run a single JUnit test class. Specific PIT options can be configured from the Launch Configuration window:
- `Run` > `Run Configurations...`
- Double-click on `PIT Mutation Test`
- Specify the options
- Press `Run`
Preferences also allow to change mutation settings (`Window > Preferences > Pitest`).
## Installation
The plug-in is available in the [Eclipse Marketplace](https://marketplace.eclipse.org/content/pitclipse).
Drag the following button to your running Eclipse workspace to start the installation:
Or show how to install it manually
1. Open Eclipse IDE
2. Go to *Help > Install New Software...*
3. Copy the update site’s URL in the *Work with* textbox (ATTENTION: the update site has changed on 5 May 2021, make sure you remove the previous one hosted on bintray):
- https://pitest.github.io/pitclipse-releases/
4. Hit *Enter* and wait for the list to load
5. Check everything
6. Click *Next* then *Finish*
## Contributing
Requirements
- [Maven 3.6.3 or higher](https://maven.apache.org/download.cgi)
- [Java 8 JDK](https://adoptopenjdk.net/upstream.html)
- [Eclipse IDE for RCP](https://www.eclipse.org/downloads/packages/) (latest release)
Import the projects in the IDE
1. *File > Import... > Team > Team Project Set*
2. Fill *URL* with "https://raw.githubusercontent.com/pitest/pitclipse/master/eclipse-project-set.psf"
3. Click on *Finish*
> Tip: use Working Sets for a better workspace organization:
> - Open *Project Explorer*'s menu > *Top Level Elements* > *Working Sets*
> - Open *Project Explorer*'s menu > *Select Working Sets* > Check "bundles", "features", "tests" and "releng"
Setup the environment
1. Open the `org.pitest.pitclipse.target/org.pitest.pitclipse.target.target` file
2. Click on *Set as Target Platform*
3. Wait for the dependencies to be loaded (may take a while)
Commit your changes
1. Make some changes
2. Make sure tests still pass: `mvn clean verify`
3. Submit a PR
See [CONTRIBUTING.md](CONTRIBUTING.md) for further details.
