pitest icon indicating copy to clipboard operation
pitest copied to clipboard

HeadlessException when running tests that open frames

Open jzy3d opened this issue 2 years ago • 1 comments

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

jzy3d avatar Jun 16 '22 09:06 jzy3d

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"

hcoles avatar Jul 14 '22 11:07 hcoles