Closed ahgittin closed 4 years ago
The issue seems to be:
https
URL instead of the http
URL used previouslyhttps
URL and so downloads itWorkarounds
Bumping TestNG in my project to 7.x does seem to resolve the problem. (It just needs some TLC to make the change apply in Eclipse, that observation in the initial report was wrong. However there are a lot of annoying assertEquals(double, double)
checks which now give errors about ambiguity with assertEquals(Object, Object)
-- so not a great workaround.
Using the v6.14.3 TestNG Eclipse Plugin works fine with Eclipse 2020-03. This is what I'll do for now.
I couldn't find any userland way to make the 7.x Eclipse plugin work with 6.x target offline. The doctype in the template is ignored.
Fix Suggestions
I couldn't easily tell whether the plugin is able to detect the remote TestNG version prior to creating the suite XML -- if so, then of course falling back to the http
DTD URL if the version is detected as <7 is the nicest solution.
If that's not straightforward then maybe a preference, or respect the DOCTYPE from the template (but Java/XML doesn't make that very nice to do).
This seems a good use case for publicId
in the DOCTYPE
, with a backport to 6.x which understands that.
Or leave it ... y'all do a good service by making TestNG, it's worth a lot more than I've paid for it :) and downgrading/upgrading is easy enough.
@ahgittin , pls install the latest release https://github.com/cbeust/testng-eclipse/releases/tag/7.1.1.202003100345
it fixes the DTD https url issue, but for existing test launch configuration, you may have to delete and re-create it if you still have the issue.
Hi! I use Testng eclipse plugin 7.2.0.202005051752 and I still face this problem.
if there's already launch configuration there, pls remove it and re-run again. if you use custom xml suite template, pls make sure use https DTD, and re-run
Hi! I deleted the eclipse launch configuration but the problem is still present. I do not explicitly use a custom xml suite template, it's a maven project imported into eclipse using m2e.
A recent update to plugin (last 6 months) has broken offline use.
Previously if I was offline, testng from Eclipse would run fine. Now it complains that it cannot reach
testng.org
. Full trace below. It works fine if I'm online.I'm guessing the problem is it is trying to download the DTD. But I think testng skips that for the default DTD which is what it looks like it should be using. I am not using any custom XML template (although I have tried, but it doesn't seem to help). The problem may have been introduced by https://github.com/cbeust/testng-eclipse/commit/3acbb6c764c14a0ca75b7e33be0fcd6c4341510e#diff-7b0172117db33babc8855d1187ec0607R41 -- or perhaps it is already fix but not released yet. (If so please accept apologies.)
Using version 7.1.1.202003100345 with maven on OSX. Remote testng tested with 6.10, 6.14.3, and 7.1.0.
Full trace: