pitest
pitest copied to clipboard
HeadlessException when running tests that open frames
Due to https://github.com/hcoles/pitest/pull/601, PIT starts child process in headless mode. This prevent from running unit tests that use Swing/AWT, which I do a lot for building integration tests in a 2D/3D charting framework for Java.
The flag to allow opening UIs is
mvn test-compile org.pitest:pitest-maven:mutationCoverage -DjvmArgs=-Djava.awt.headless=false
This will work differently in pitest 1.9.3. once #1054 is merged.
Auto adding of the jvm arg can be disabled with -Dfeatures="-macos_focus"