New TestNG Eclipse plug-in

375 views
Skip to first unread message

Cédric Beust ♔

unread,
May 18, 2013, 1:25:49 AM5/18/13
to testng...@googlegroups.com
Hi,

I have just updated the TestNG Eclipse plug-in to include the fixes that went into TestNG 6.8.5.

This new plug-in also features real time updates of your tests, thanks to a contribution from JNRouvignac (thanks JN!).

Let me know if you encounter any problems.

-- 
Cédric

hop...@gmail.com

unread,
May 23, 2013, 4:05:07 AM5/23/13
to testng...@googlegroups.com, ced...@beust.com
Hello, Cédric,
 
I tried to update Eclipse plugin, but it fails with message:
 
An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Artifact not found: osgi.bundle,org.testng.eclipse,6.8.5.20130517_2211.
http://beust.com/eclipse/plugins/org.testng.eclipse_6.8.5.20130517_2211.jar
Artifact not found: org.eclipse.update.feature,org.testng.eclipse,6.8.5.20130517_2211.
http://beust.com/eclipse/features/org.testng.eclipse_6.8.5.20130517_2211.jar
 
I use http://beust.com/eclipse as update site. I see multiple versions of plugin during update, but only the latest 6.8.6 can is installed. But it doesn't work either (testNG is not started). I tried to install 6.8.5 but it fails with the message provided above. I downloaded the latest Eclipse but it fails with the same message. I run Eclpse as Administrator (Win 7) but it didn't help. Also, I deleted the previous plugin (6.8.1) and tried to install the new one, but now I can't install even 6.8.1 (artifact not found error).
 
Could you please check the availability of the plugins.
 
Thank you.

Cédric Beust ♔

unread,
May 23, 2013, 12:27:16 PM5/23/13
to hop...@gmail.com, testng...@googlegroups.com
Anyone else having this problem?

-- 
Cédric

Robert Krüger

unread,
May 24, 2013, 2:44:50 AM5/24/13
to testng...@googlegroups.com
The real-time updates are a huge improvement for our tests because
they run for quite some time! Thanks so much!
> --
> You received this message because you are subscribed to the Google Groups
> "testng-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to testng-users...@googlegroups.com.
> To post to this group, send email to testng...@googlegroups.com.
> Visit this group at http://groups.google.com/group/testng-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Cédric Beust ♔

unread,
May 24, 2013, 3:18:05 AM5/24/13
to testng...@googlegroups.com
Glad you like it, but you should thank JnRouvignac, who contributed this code!

-- 
Cédric


-- 
Cédric

Robert Krüger

unread,
May 28, 2013, 10:43:45 AM5/28/13
to testng...@googlegroups.com
After my first enthusiasm I am running into pretty serious problems.
It seems that everything that has to do with rerunning individual
tests (either bei rerun failed tests or rerunning a selected test by
context menu, which I both use) is broken since the update.

Anyone else experiencing this?

Robert Krüger

unread,
May 29, 2013, 5:04:32 AM5/29/13
to Jean-Noël Rouvignac, testng...@googlegroups.com
sure.

I am running a Test NG run configuration that runs a suite that
contains 48 tests and one fails.

First observation: The "run failed tests" button is inactive

There is no Stacktrace in the log file at <workspace>/.metadata/.log
nor the console I used to start eclipse.

The I try to run the failed test by right-clicking the treenode and
selecting "Run" in the context menu.

Result: A new run configuration is created on the fly which has the
fully qualified name of the chosen test method and output of the run
is :

[TestNG] Running:

/private/var/folders/24/w7knqljn22d94pcj2jn0kb9m0000gn/T/testng-eclipse--1508730758/testng-customsuite.xml


===============================================

Default test

Tests run: 0, Failures: 0, Skips: 0

===============================================
+ timing info.

i.e. no test is run and in the console I started eclipse from I see
the following stack trace:

org.eclipse.core.runtime.CoreException: No selected resource
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getResource(GitVariableResolver.java:127)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getGitWorkTree(GitVariableResolver.java:90)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.resolveValue(GitVariableResolver.java:56)
at org.eclipse.core.internal.variables.DynamicVariable.getValue(DynamicVariable.java:55)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.resolve(StringSubstitutionEngine.java:270)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.substitute(StringSubstitutionEngine.java:195)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.performStringSubstitution(StringSubstitutionEngine.java:87)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:574)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:350)
at org.testng.eclipse.ui.util.ConfigurationHelper.getJvmArgs(ConfigurationHelper.java:156)
at org.testng.eclipse.ui.QuickRunAction.run(QuickRunAction.java:78)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3982)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
org.eclipse.core.runtime.CoreException: No selected resource
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getResource(GitVariableResolver.java:127)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getGitWorkTree(GitVariableResolver.java:90)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.resolveValue(GitVariableResolver.java:56)
at org.eclipse.core.internal.variables.DynamicVariable.getValue(DynamicVariable.java:55)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.resolve(StringSubstitutionEngine.java:270)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.substitute(StringSubstitutionEngine.java:195)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.performStringSubstitution(StringSubstitutionEngine.java:87)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:574)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:350)
at org.testng.eclipse.ui.util.ConfigurationHelper.getJvmArgs(ConfigurationHelper.java:156)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launchTypes(TestNGLaunchConfigurationDelegate.java:128)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launch(TestNGLaunchConfigurationDelegate.java:63)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
org.eclipse.core.runtime.CoreException: No selected resource
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getResource(GitVariableResolver.java:127)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getGitWorkTree(GitVariableResolver.java:90)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.resolveValue(GitVariableResolver.java:56)
at org.eclipse.core.internal.variables.DynamicVariable.getValue(DynamicVariable.java:55)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.resolve(StringSubstitutionEngine.java:270)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.substitute(StringSubstitutionEngine.java:195)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.performStringSubstitution(StringSubstitutionEngine.java:87)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:574)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:350)
at org.testng.eclipse.ui.util.ConfigurationHelper.getJvmArgs(ConfigurationHelper.java:156)
at org.testng.eclipse.util.LaunchUtil.useStringProtocol(LaunchUtil.java:423)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.createVMRunner(TestNGLaunchConfigurationDelegate.java:199)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launchTypes(TestNGLaunchConfigurationDelegate.java:136)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launch(TestNGLaunchConfigurationDelegate.java:63)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
org.eclipse.core.runtime.CoreException: No selected resource
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getResource(GitVariableResolver.java:127)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.getGitWorkTree(GitVariableResolver.java:90)
at org.eclipse.egit.ui.internal.variables.GitVariableResolver.resolveValue(GitVariableResolver.java:56)
at org.eclipse.core.internal.variables.DynamicVariable.getValue(DynamicVariable.java:55)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.resolve(StringSubstitutionEngine.java:270)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.substitute(StringSubstitutionEngine.java:195)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.performStringSubstitution(StringSubstitutionEngine.java:87)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:574)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:350)
at org.testng.eclipse.ui.util.ConfigurationHelper.getJvmArgs(ConfigurationHelper.java:156)
at org.testng.eclipse.util.LaunchUtil.useStringProtocol(LaunchUtil.java:423)
at org.testng.eclipse.ui.TestRunnerViewPart.startTestRunListening(TestRunnerViewPart.java:366)
at org.testng.eclipse.TestNGPlugin.connectTestRunner(TestNGPlugin.java:215)
at org.testng.eclipse.TestNGPlugin$2.run(TestNGPlugin.java:203)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3946)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3623)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Which is interesting as it seems to be related to resolving a variable
I use in the run configuration, i.e. "${git_work_tree}".

Do you have any Idea if a change in the code you committed could have
anything to do with that? It does not seem to have problems resolving
it when it runs the original run configuration. It may not even be
related to your code change as I cannot exclude the possibility that I
have not used the rerun feature since the last git plugin update. Let
me know if you have any idea. I'll check if there's anything wrong
with the way I am using this variable but this has not changed in my
run configurations for a very long time.

Btw after that has happened I have to restart eclipse to get the
original run configuration to run again because the plugin state seems
to be messed up but I have experienced this kind of behaviour many
times before your contribution, so it might not be related.

Thanks for your help,

Robert

On Wed, May 29, 2013 at 10:27 AM, Jean-Noël Rouvignac
<jn.rou...@gmail.com> wrote:
> Hello Robert,
>
>
> Could you please give some more details about what went wrong?
> What did you do, what did you observe, what did you expect?
> Using the Given / When / Then agile practice can help you phrase the problem
> and how it happened.
>
> Also is there a stacktrace appearing in the Eclipse console view?
> Ultimately, can you take a look at the Eclipse logs (under
> ~/your_workspace/.log or ~/your_workspace/.bak_x.log) to find out such
> stacktraces.
> If you find any stacktrace please report them.
>
>
> I already noticed in my workspace the following one:
> Caused by: java.lang.NullPointerException
> at
> org.testng.eclipse.ui.TestRunnerViewPart.getLastLaunch(TestRunnerViewPart.java:887)
> at org.testng.eclipse.TestNGPlugin$1.run(TestNGPlugin.java:147)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> ... 23 more
>
> Now I need to figure how it was triggered.
> Thanks for reporting how this problem and how it happened, your help could
> be very important to solve it.
>
> Jean-Noël
>
>
>
>
>>> ---------- Forwarded message ----------
>>> From: Robert Krüger <kru...@lesspain.de>
>>> Date: Tue, May 28, 2013 at 7:43 AM
>>> Subject: Re: [testng-users] New TestNG Eclipse plug-in
>>> To: testng...@googlegroups.com
>>>
>>>
>>> After my first enthusiasm I am running into pretty serious problems.
>>> It seems that everything that has to do with rerunning individual
>>> tests (either bei rerun failed tests or rerunning a selected test by
>>> context menu, which I both use) is broken since the update.
>>>
>>> Anyone else experiencing this?
>>>
>>>
>>> On Fri, May 24, 2013 at 9:18 AM, Cédric Beust ♔ <ced...@beust.com> wrote:
>>> > Glad you like it, but you should thank JnRouvignac, who contributed
>>> > this
>>> > code!
>>> >
>>> > --
>>> > Cédric
>>> >
>>> >

Robert Krüger

unread,
May 29, 2013, 5:37:31 AM5/29/13
to Jean-Noël Rouvignac, testng...@googlegroups.com
For diagnostic purposes I have replaced the git variables in the run
configuration by environment variables. now the exception is gone but
behaviour is still the same.

Regards,

Robert

Robert Krüger

unread,
Jun 7, 2013, 12:51:02 PM6/7/13
to Jean-Noël Rouvignac, Cedric Beust, testng...@googlegroups.com
Hi Jean-Noël,

thanks for looking into this! Maybe I will check out the code and try
to debug it if I find some time.

Cheers,

Robert

On Fri, Jun 7, 2013 at 3:03 PM, Jean-Noël Rouvignac
<jn.rou...@gmail.com> wrote:
> Hi Robert,
>
> I don't think what you are experiencing is related to my commit(s).
> I have done some testing here with the latest TestNG eclipse plugin and it
> works fine for me.
>
> The one thing I noticed being a problem is this:
>
> First observation: The "run failed tests" button is inactive
> I am not sure whether this problem is due to my commit or whether it existed
> before, but I have fixed it there:
> https://github.com/cbeust/testng-eclipse/pull/86
> I am just waiting for Cedric to integrate these changes.
>
>
> For your other (bigger) problem, it could be due to some plugins you are
> using.
> It happened to me that I could not access the test run history due to a bug
> in another plugin I was using. I did a bug report here:
> https://github.com/rowlo/mousefeed/issues/2
> I also uninstalled this plugin because it was no longer useful to me.
>
>
> I won't investigate any further this issue.
>
> Thanks for the report,
> Jean-Noël
>
>
>
>
>
>
>
> 2013/5/29 Robert Krüger <kru...@lesspain.de>

Cédric Beust ♔

unread,
Jun 8, 2013, 1:10:46 AM6/8/13
to Jean-Noël Rouvignac, Robert Krüger, testng...@googlegroups.com
I just pushed a new version of the Eclipse plug-in, which includes Jean-Noël's latest changes.


-- 
Cédric



On Fri, Jun 7, 2013 at 6:03 AM, Jean-Noël Rouvignac <jn.rou...@gmail.com> wrote:
Hi Robert,

I don't think what you are experiencing is related to my commit(s).
I have done some testing here with the latest TestNG eclipse plugin and it works fine for me.

The one thing I noticed being a problem is this:
First observation: The "run failed tests" button is inactive
I am not sure whether this problem is due to my commit or whether it existed before, but I have fixed it there: https://github.com/cbeust/testng-eclipse/pull/86
I am just waiting for Cedric to integrate these changes.


For your other (bigger) problem, it could be due to some plugins you are using.
It happened to me that I could not access the test run history due to a bug in another plugin I was using. I did a bug report here: https://github.com/rowlo/mousefeed/issues/2
I also uninstalled this plugin because it was no longer useful to me.


I won't investigate any further this issue.

Thanks for the report,
Jean-Noël







2013/5/29 Robert Krüger <kru...@lesspain.de>
For diagnostic purposes I have replaced the git variables in the run

Robert Krüger

unread,
Jun 8, 2013, 9:22:10 AM6/8/13
to Cédric Beust ♔, Jean-Noël Rouvignac, testng...@googlegroups.com
Great, thank both of you! I can confirm that "Rerun failed tests" now
works again as it used to for the examples I tested.
Reply all
Reply to author
Forward
0 new messages