Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Running AGR as an in-process strategy
Running AGR as an in-process strategy [message #104812] Fri, 13 July 2007 22:19 Go to next message
Eclipse UserFriend
Originally posted by: chalmers.wang.oracle.com

Hi everyone,

I'm trying to run a JUnit plug-in test that will call the AGR to run
in-process (by not specifying a file path in the AutomationClientAdapter
constructor). However, doing so results in the following exception:

java.lang.NullPointerException
at
org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.execute(AbstractTestExecutionService.java:507)
at
org.eclipse.hyades.automation.server.AbstractService.execute (AbstractService.java:43)
at
org.eclipse.hyades.automation.server.ServiceProxy$1.run(Serv iceProxy.java:141)
at
org.eclipse.hyades.automation.core.utils.ReusableThread.run( ReusableThread.java:131)
at java.lang.Thread.run(Unknown Source)

I am trying to run it in-process because running the JUnit plug-in test
will load the plug in I am trying to test. Specifying the Eclipse to use
will not load my plug-in. So, if I were to specify an Eclipse home, the
JUnit plug-in test will first open an eclipse with my plug-in loaded, and
from there, it will open another eclipse to run the AGR, even though the
second Eclipse opened will not have my plug-in.

Thanks,
Chalmers
Re: Running AGR as an in-process strategy [message #104862 is a reply to message #104812] Sun, 15 July 2007 01:25 Go to previous messageGo to next message
Joe Toomey is currently offline Joe ToomeyFriend
Messages: 79
Registered: July 2009
Member
Hi Chalmers,

I believe you are getting this error because you have not specified a
project when invoking the test execution service. In the current
shipping version of TPTP, you can specify either a single test to
execute, or a list of tests to execute, but in either case, you must
specify a project, and the test(s) that you specify must be relative to
that project.

There are several fixes queued up for the 4.4.1 release which will relax
this limitation and support executing tests from multiple projects in
the same service invocation (as well as supporting multiple launch
configurations in a single service invocation, and addressing some other
needs.) Feel free to add yourself on CC to the following defects to be
kept informed of the progress.

194503: ASF marshalling return value between service and client adapter
does not have support for failures / exceptions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194503

194212: ASF: Execution service does not work with configuration
parameter. Also does not handle multiple configurations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194212

195587: Need an ASF service to import projects into the workspace
https://bugs.eclipse.org/bugs/show_bug.cgi?id=195587

194505: ASF should use built in ant extension point to add ant-tptp
library to eclipse.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194505

Thanks,
--Joe



Chalmers Wang wrote:
> Hi everyone,
>
> I'm trying to run a JUnit plug-in test that will call the AGR to run
> in-process (by not specifying a file path in the AutomationClientAdapter
> constructor). However, doing so results in the following exception:
>
> java.lang.NullPointerException
> at
> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.execute(AbstractTestExecutionService.java:507)
>
> at
> org.eclipse.hyades.automation.server.AbstractService.execute (AbstractService.java:43)
>
> at
> org.eclipse.hyades.automation.server.ServiceProxy$1.run(Serv iceProxy.java:141)
>
> at
> org.eclipse.hyades.automation.core.utils.ReusableThread.run( ReusableThread.java:131)
>
> at java.lang.Thread.run(Unknown Source)
>
> I am trying to run it in-process because running the JUnit plug-in test
> will load the plug in I am trying to test. Specifying the Eclipse to use
> will not load my plug-in. So, if I were to specify an Eclipse home, the
> JUnit plug-in test will first open an eclipse with my plug-in loaded,
> and from there, it will open another eclipse to run the AGR, even though
> the second Eclipse opened will not have my plug-in.
>
> Thanks,
> Chalmers
>
Re: Running AGR as an in-process strategy [message #105091 is a reply to message #104862] Mon, 16 July 2007 18:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chalmers.wang.oracle.com

Hi Joe,

The exception occurred when I included the project and workspace
information. This was the code I used:

//AutomationClientAdapter automation = new AutomationClientAdapter
("c:\\wtpallinone\\eclipse");
AutomationClientAdapter automation = new AutomationClientAdapter();

// Create and configure a properties object
Properties properties = new Properties();
properties.setProperty("workspace", "C:\\workspace (CVS)");
properties.setProperty("project", "TestContainer");
properties.setProperty("suite",
"test-resources/AutomatedGUISuite.testsuite");
properties.setProperty("results", testname);

// Execute the service named below using the configured properties
automation.execute("org.eclipse.hyades.test.tools.core.execute ",
properties);

Note: When I pass the AutomationClientAdapter constructor a filepath such
as:
AutomationClientAdapter automation =new
AutomationClientAdapter("c:\\eclipse");
Everything works fine.

At first I thought it might be an issue with running it as a JUnit Plug-in
test. So, I tried running it simply as a Java application. That didn't
change anything. When I ran it as an in-process strategy from within a
regular Java app, it didn't throw any null pointer exception errors, but
it also didn't do anything. Are there any other properties that I need to
specify (besides the ones shown in the Help Contents example) for the in
process strategy to run?

Thanks,
Chalmers
Re: Running AGR as an in-process strategy [message #107353 is a reply to message #105091] Thu, 02 August 2007 14:22 Go to previous message
Joe Toomey is currently offline Joe ToomeyFriend
Messages: 79
Registered: July 2009
Member
Sorry for the late reply, Chalmers,

I think I see the problem. Note that when you use the
InProcessStrategy, a new eclipse workbench is not launched. I believe
from your post that this is what you want. In this case, since we're
using the existing eclipse instance, the workspace you specify is
ignored, and the existing workspace is used. The only way for us to
change workspaces is to restart eclipse, and this is what you are trying
to avoid by using the InProcessStrategy. When using the
InProcessStrategy, it is unnecessary to specify the workspace. I
realize that this may not be intuitive -- I suggest you file a bugzilla
defect stating that we should report an error when a service is called
suing the InProcessStrategy if the workspace is specified and if it is
not the same as the current workspace.

So, the reason the project is null in the AbstractTestExecutionService
is that we couldn't find the project in your workspace. Try running
this again with the test project in your current workspace.

Thanks,
--Joe

Chalmers Wang wrote:
> Hi Joe,
>
> The exception occurred when I included the project and workspace
> information. This was the code I used:
>
> //AutomationClientAdapter automation = new AutomationClientAdapter
> ("c:\\wtpallinone\\eclipse");
> AutomationClientAdapter automation = new AutomationClientAdapter();
> // Create and configure a properties object
> Properties properties = new Properties();
> properties.setProperty("workspace", "C:\\workspace (CVS)");
> properties.setProperty("project", "TestContainer");
> properties.setProperty("suite",
> "test-resources/AutomatedGUISuite.testsuite");
> properties.setProperty("results", testname);
>
> // Execute the service named below using the configured properties
> automation.execute("org.eclipse.hyades.test.tools.core.execute ",
> properties);
>
> Note: When I pass the AutomationClientAdapter constructor a filepath
> such as:
> AutomationClientAdapter automation =new
> AutomationClientAdapter("c:\\eclipse");
> Everything works fine.
>
> At first I thought it might be an issue with running it as a JUnit
> Plug-in test. So, I tried running it simply as a Java application. That
> didn't change anything. When I ran it as an in-process strategy from
> within a regular Java app, it didn't throw any null pointer exception
> errors, but it also didn't do anything. Are there any other properties
> that I need to specify (besides the ones shown in the Help Contents
> example) for the in process strategy to run?
>
> Thanks,
> Chalmers
>
>
Previous Topic:Major issues with Eclipse 3.3 and TPTP 4.4
Next Topic:Cannot profile a Java Application
Goto Forum:
  


Current Time: Fri Apr 26 21:58:01 GMT 2024

Powered by FUDForum. Page generated in 0.03385 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top