Digital Deception Digital Deception - 6 days ago 3x
Java Question

Maven surefire forkMode pertest deprecated. What is the new settings?

As of Surefire 2.14 the

configuration setting has been deprecated. They even helpfully provide a mapping from some of the old settings to new settings here (

The problem is we use
which does not have a mapping on that page, and my google-fu is failing to find the appropriate updated configuration for it.

What is the appropriate
and/or other configuration to replace the deprecated


That isn't mentioned in the documentation, but <forkMode>pertest</forkMode> is the same as always forking. This is the check in the code:

if ( "pertest".equalsIgnoreCase( forkMode ) )
    return FORK_ALWAYS;

This synonym was made during resolution of the JIRA issue SUREFIRE-96, where, quoting Brett Porter:

pertest and perTest still work, but I've changed it to "always" which seems consistent with "once", and also changed "none" to "never".

As such, you should migrate your current configuration of <forkMode>pertest</forkMode> to forkCount=1 and reuseForks=false, like mentioned in Migrating the Deprecated forkMode Parameter to forkCount and reuseForks.