TestNG by default disables loading DTD from unsecure Urls
Yes, that's the default behavior of TestNG and I had introduced it through that pull request to fix the bug https://github.com/cbeust/testng/issues/2022
To set the JVM arguments in intelliJ, choose Run > Edit Configurations
, and add this JVM argument in the VM options section after -ea
(which would be there by default.
For more information on editing configurations, please refer to the official documentation here
Added screenshot for easy to find in Intellij
Argument value
-ea -Dtestng.dtd.http=true
If the above does not work do at template level, this will fix it, which is
Run--> Edit configuration --> template --> testng
- Right Click on the class, select Run--> Run configuration
- By default one testNg class will be generated with same class name under testng option
- Select that class and go to Arguments tab
- In the VM arguments provide -Dtestng.dtd.http=true
Thats it.
Just change all yours
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"
on https:
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd"