thekevinmonster thekevinmonster - 1 month ago 10x
Java Question

How can I set the TestNG option "configfailurepolicy" via Maven in the POM?

TestNG has an option called -configfailurepolicy that you can specify on the command line, or you can specify it in the suite XML file (if you are using one.)

I would like to set that via Maven in the POM, but there is no documentation I can find anywhere that explains how to do that. Can I, and if so, what do I do?


There is a ticket from 2012 on this:

Supposedly, it was fixed. Based on pull request and release dates, it should be an available option in any release including or after 2.13. Looks like the maven default right now is 2.12.4, so you'll have to manually configure the surefire plugin to a working version.

Once you have the latest version, you should be able to pass in -Dconfigfailurepolicy=continue on the commandline, or configure it in the xml


I had the same issue and this fixed it for me.