DevOps / Maven Surefire Plugin Interview Questions
What is forkCount and how does it differ from reuseForks?
forkCount controls how many separate JVM processes Surefire spawns to execute tests — for example 2 or 2C (twice the number of CPU cores). reuseForks is a boolean deciding whether one forked JVM is reused across multiple test classes or a fresh JVM is started for each class.
Disabling reuseForks gives stronger isolation between tests at the cost of noticeably slower runs, since JVM startup happens repeatedly.
More Related questions...