TestNG by default disables loading DTD from unsecure Urls

While executing TestNG sometime we hit below error:

  1. Very first and ideal way is to use https URL in TestNG.xml file. <!DOCTYPE suite SYSTEM “https://testng.org/testng-1.0.dtd”>
    instead of <!DOCTYPE suite SYSTEM “http://testng.org/testng-1.0.dtd”>
  2. Second way is to update Run Configuration and add VM argument -ea -Dtestng.dtd.http=true:
VM Argument

3. Third way is to update the eclipse TestNG Preferences

Leave a Reply

Your email address will not be published. Required fields are marked *