IntelliJ Error when running unit test: Could not find or load main class ${surefireArgLine}

I had the same problem and i think i found the solution on the vertx-issue tracker.

In short you have to configure your IntelliJ Maven (surefire plugin) integration to behave differently.

This works for me in IntelliJ 14.1.6 with mvn 3.3.9
Preferences -> Build,Execution,Deployment -> Build Tools -> Maven -> Running Tests

For IntelliJ 2019 and above
Settings-> Build,Execution,Deployment -> Build Tools -> Maven -> Running Tests

Uncheck argLine

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)