maven-surefire-plugin is designed for running unit tests and if any of the tests fail then it will fail the build immediately.
maven-failsafe-plugin is designed for running integration tests, and decouples failing the build if there are test failures from actually running the tests.
Visit this link for your reference, | Attaching tests
Surefire does not support tests or any referenced libraries calling System.exit() at any time. If they do so, they are incompatible with Surefire and you should probably file an issue with the library/vendor. Alternatively the forked VM could also have crashed for a number of reasons. Look for the classical "hs_err*" files indicating VM crashes or examine the Maven log output when the tests execute. Some "extraordinary" output from crashing processes may be dumped to the console/log. If this happens on a CI environment and only after it runs for some time, there is a fair chance your test suite is leaking some kind of OS-level resource that makes things worse at every run. Regular OS-level monitoring tools may give you some indication.
Use the following configuration:
<useSystemClassLoader>true</useSystemClassLoader>
<useManifestOnlyJar>false</useManifestOnlyJar>
<forkCount>1</forkCount>
Try reuseForks=true and if it doesn't work, fall back to reuseForks=false
Maven does property replacement for
${...}
Using an alternate syntax for these properties,
@{...}