Eclipse Plugin - Run as TestNG Test Suite not showing up

5,615 views
Skip to first unread message

Felipe Knorr Kuhn

unread,
Nov 10, 2010, 1:44:41 PM11/10/10
to testng...@googlegroups.com
Hi Cédric,

I'm using the latest TestNG eclipse plugin and sometimes when I right click on a xml file and go to the Run As menu, I only get the "Run as TestNG Test" option, not "Run as TestNG Suite".

Any ideas?

FK

Cédric Beust ♔

unread,
Nov 10, 2010, 2:05:00 PM11/10/10
to testng...@googlegroups.com
Hi Felipe,

Can you email me that XML file?

By the way, there is another bug which happens when you right click on the XML file: you get both "Run as a suite" and "Run as a test". The latter shouldn't be there, I'll fix it shortly.

Thanks.

-- 
Cédric



--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.



--
Cédric


Felipe Knorr Kuhn

unread,
Nov 10, 2010, 2:21:05 PM11/10/10
to testng...@googlegroups.com
Hi Cédric,

Turns out I wasn't using the latest version of the plugin, but the version before the latest.

I don't get the "Run as a test" only bug anymore, but I'm getting the one you just mentioned.

Do you still need the XML file?

Thanks,

FK

2010/11/10 Cédric Beust ♔ <ced...@beust.com>

Felipe Knorr Kuhn

unread,
Nov 10, 2010, 2:48:10 PM11/10/10
to testng...@googlegroups.com
I just noticed one more thing.

When running the file with Run as -> TestNG Suite, the plugin creates a temp dir with the file:

/tmp/testng-eclipse-1461843701/testng-customsuite.xml

which ruins my tests because I use context.getSuite().getXmlSuite().getFileName() and File.getParent()

java.io.FileNotFoundException: /tmp/testng-eclipse-1461843701/resources/locators.properties (No such file or directory)

perhaps I should use a better way to load my files...

FK

Cédric Beust ♔

unread,
Nov 10, 2010, 2:55:33 PM11/10/10
to testng...@googlegroups.com
Not necessarily, I agree that what the plug-in does here is not very nice (basically, it copies your XML file in a temp location and runs it there, instead of running your XML file directly).

Adding this to my TODO list (but in the meantime, yes, you should probably find a workaround).

-- 
Cédric

Cédric Beust ♔

unread,
Nov 10, 2010, 2:25:24 PM11/10/10
to testng...@googlegroups.com
On Wed, Nov 10, 2010 at 11:21 AM, Felipe Knorr Kuhn <fkn...@gmail.com> wrote:
Hi Cédric,

Turns out I wasn't using the latest version of the plugin, but the version before the latest.

I don't get the "Run as a test" only bug anymore, but I'm getting the one you just mentioned.

Do you still need the XML file?

No, I know what this bug is about, thanks.

--
Cédric


Cédric Beust ♔

unread,
Nov 17, 2010, 5:41:01 PM11/17/10
to testng...@googlegroups.com
Hi Felipe,

I just pushed a new version of the Eclipse plug-in that should fix this problem, could you please update and confirm?

Thanks.

-- 
Cédric

Felipe Knorr Kuhn

unread,
Nov 19, 2010, 4:45:55 PM11/19/10
to testng...@googlegroups.com
Cédric,

The problem has been fixed. Thanks!

System.out.println(ctx.getSuite().getXmlSuite().getFileName());

/home/knorr/workspace/SeleniumTestNGDemo/testng.xml

However, the Run as Suite+Run as Test bug is back.

FK

2010/11/17 Cédric Beust ♔ <ced...@beust.com>

Cédric Beust ♔

unread,
Nov 19, 2010, 5:33:34 PM11/19/10
to testng...@googlegroups.com
On Fri, Nov 19, 2010 at 1:45 PM, Felipe Knorr Kuhn <fkn...@gmail.com> wrote:
Cédric,

The problem has been fixed. Thanks!

System.out.println(ctx.getSuite().getXmlSuite().getFileName());

/home/knorr/workspace/SeleniumTestNGDemo/testng.xml

Great. I added a test to make sure this won't break again. It's the first test I write that would have passed when run from the shell but failed when run from Eclipse...
 
However, the Run as Suite+Run as Test bug is back.

It's not back, it hasn't been fixed yet :-)

--
Cédric


Reply all
Reply to author
Forward
0 new messages