Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Unable to start AUT agent(I am unable to start AUT agent with code written below )
Unable to start AUT agent [message #1708983] Wed, 23 September 2015 06:51 Go to next message
Mamta TIWARI is currently offline Mamta TIWARIFriend
Messages: 27
Registered: September 2015
Junior Member
Please help me , i am unable start AUT agent with below code.

package org.eclipse.jubula.rc.rcp;
import java.util.Locale;
import org.eclipse.jubula.client.AUT;
import org.eclipse.jubula.client.AUTAgent;
import org.eclipse.jubula.client.MakeR;
import org.eclipse.jubula.client.launch.AUTConfiguration;
import org.eclipse.jubula.toolkit.swt.SwtComponents;
import org.eclipse.jubula.toolkit.base.config.RCPAUTConfiguration;
import org.eclipse.jubula.tools.AUTIdentifier;
import org.junit.Before;
import org.junit.After;
import org.junit.Test;
public class Activator {

public static final String AGENT_HOST = "localhost";
public static final int AGENT_PORT = 60000;

/** the value1
private static TextInputComponent value1;
/** the value2
private static TextInputComponent value2;
/** the button
private static GraphicsComponent button;
/** the result
private static TextComponent result;
/** the AUT-Agent */
private AUTAgent m_agent;
/** the AUT */
private AUT m_aut;

@Before
public void setUp() throws Exception {

m_agent = MakeR.createAUTAgent(AGENT_HOST, AGENT_PORT);
m_agent.connect();


final String autID = "FIX_Client";
//AUTConfiguration config = new RCPAUTConfiguration("api.aut.conf.simple.adder.rcp", autID, "C:\\Software\\eclipse\\Fix_implementation\\Fix_Implementation.bat", "", null, Locale.getDefault(), null);
AUTConfiguration config = new RCPAUTConfiguration("Fix_client", autID, "C:\\Software\\eclipse\\Fix_implementation\\Fix_Implementation.bat", "C:\\Software\\eclipse\\Workspace\\Jubula", null, Locale.getDefault(), null);

AUTIdentifier id = m_agent.startAUT(config);
if(id!= null){
m_aut = m_agent.getAUT(id, SwtComponents.getToolKitInformation());
m_aut.connect();

}

}

@Test
public void printing() throws Exception {
System.out.println("hey I am inside jubula code");
}

@After
public void tearDown() throws Exception {
m_aut.disconnect();
m_agent.stopAUT(m_aut.getIdentifier());
m_agent.disconnect();
}



}


Getting exception


org.eclipse.jubula.client.exceptions.CommunicationException: java.net.ConnectException: Could not connect to AUT-Agent: localhost:60000
at org.eclipse.jubula.client.internal.impl.AUTAgentImpl.connect(AUTAgentImpl.java:142)
at org.eclipse.jubula.rc.rcp.Activator.setUp(Activator.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.net.ConnectException: Could not connect to AUT-Agent: localhost:60000
at org.eclipse.jubula.client.internal.impl.AUTAgentImpl.connect(AUTAgentImpl.java:143)
... 25 more

java.lang.NullPointerException
at org.eclipse.jubula.rc.rcp.Activator.tearDown(Activator.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Re: Unable to start AUT agent [message #1709007 is a reply to message #1708983] Wed, 23 September 2015 09:38 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi there,


It looks like you haven't started the AUT Agent. The steps for doing this are described in this FAQ:
http://testing.bredex.de/faqs/jubula-api-setup.html

Best regards,
Alex
Re: Unable to start AUT agent [message #1709108 is a reply to message #1709007] Thu, 24 September 2015 06:56 Go to previous messageGo to next message
Mamta TIWARI is currently offline Mamta TIWARIFriend
Messages: 27
Registered: September 2015
Junior Member
Hello Alex,

Thanks for quick reply
Do i need to start AUT agent manually every time?
can not handle it code itself? please help
Re: Unable to start AUT agent [message #1709119 is a reply to message #1709108] Thu, 24 September 2015 08:10 Go to previous messageGo to next message
Mamta TIWARI is currently offline Mamta TIWARIFriend
Messages: 27
Registered: September 2015
Junior Member
Hello Alex,

I am also getting below error while connecting to AUT.

[INFO] firing connectionGained
[WARNING] Option has already been configured: toolkitID
[INFO] sent to localhost/127.0.0.1:60000 message with header: <org.eclipse.jubul
a.communication.internal.message.MessageHeader>
<m__version>1</m__version>
<m__messageType>2</m__messageType>
<m__messageClassName>org.eclipse.jubula.communication.internal.message.StartAU
TServerMessage</m__messageClassName>
<m__messageLength>1663</m__messageLength>
</org.eclipse.jubula.communication.internal.message.MessageHeader>
[INFO] read header: <org.eclipse.jubula.communication.internal.message.MessageHe
ader>
<m__version>1</m__version>
<m__messageType>2</m__messageType>
<m__messageClassName>org.eclipse.jubula.communication.internal.message.StartAU
TServerStateMessage</m__messageClassName>
<m__messageLength>510</m__messageLength>
</org.eclipse.jubula.communication.internal.message.MessageHeader>
[ERROR] caught exception from 'org.eclipse.jubula.client.internal.commands.Start
AUTServerStateCommand.execute()'

java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
at org.eclipse.jubula.client.core.ClientTest.instance(ClientTest.java:33)

at org.eclipse.jubula.client.internal.commands.StartAUTServerStateCommand.execu
te(StartAUTServerStateCommand.java:58)
at org.eclipse.jubula.communication.internal.Communicator$ConnectionListener.re
ceived(Communicator.java:841)
at org.eclipse.jubula.communication.internal.connection.Connection.fireMessageR
eceived(Connection.java:402)
at org.eclipse.jubula.communication.internal.connection.Connection.access$2(Con
nection.java:391)
at org.eclipse.jubula.communication.internal.connection.Connection$ReaderThread
.run(Connection.java:454)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IProgressM
onitor
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more



Could you please also tell me how to resolve it?, thanks in advance.
Re: Unable to start AUT agent [message #1709159 is a reply to message #1709119] Thu, 24 September 2015 13:49 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hello,

The AUT Agent must be running for the AUT to be started. There isn't an embedded AUT AGent supported for the Client API at the moment. You can, however, start the AUT Agent via the command line / as a part of the startup of your machine so that it is automatically started.

For the AUT start error:
- have you followed the steps described here for setting up your rcp AUT for testing?
- what happens when you try to start the AUT manually - does that work?

If you have followed the steps described in the FAQ and the AUT does start manually, please add well-formatted code example for us to take a look at.

Best regards,
Alex
Re: Unable to start AUT agent [message #1709224 is a reply to message #1709159] Fri, 25 September 2015 06:04 Go to previous message
Mamta TIWARI is currently offline Mamta TIWARIFriend
Messages: 27
Registered: September 2015
Junior Member
Hello Alex,

I could able to start AUT after starting AUT agent manually.
Here i m facing two issues
1. i tried to follow steps given for setting up AUT for testing and added org.eclipse.jubula.rc.rcp@start to the end of the osgi.bundles paramete, but this entry get vanish with every restart of eclipse, could you suggest me some solution for this?
2. I am getting exception in eclipse while starting AUT

[INFO] firing connectionGained
[WARNING] Option has already been configured: toolkitID
[INFO] sent to localhost/127.0.0.1:60000 message with header: <org.eclipse.jubul
a.communication.internal.message.MessageHeader>
<m__version>1</m__version>
<m__messageType>2</m__messageType>
<m__messageClassName>org.eclipse.jubula.communication.internal.message.StartAU
TServerMessage</m__messageClassName>
<m__messageLength>1663</m__messageLength>
</org.eclipse.jubula.communication.internal.message.MessageHeader>
[INFO] read header: <org.eclipse.jubula.communication.internal.message.MessageHe
ader>
<m__version>1</m__version>
<m__messageType>2</m__messageType>
<m__messageClassName>org.eclipse.jubula.communication.internal.message.StartAU
TServerStateMessage</m__messageClassName>
<m__messageLength>510</m__messageLength>
</org.eclipse.jubula.communication.internal.message.MessageHeader>
[ERROR] caught exception from 'org.eclipse.jubula.client.internal.commands.Start
AUTServerStateCommand.execute()'
java.lang.SecurityException: class "org.eclipse.core.runtime.InvalidRegistryObje
ctException"'s signer information does not match signer information of other cla
sses in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jubula.client.core.ClientTestImpl.<init>(ClientTestImpl.java:210
)
at org.eclipse.jubula.client.core.ClientTest.instance(ClientTest.java:33)
at org.eclipse.jubula.client.internal.commands.StartAUTServerStateCommand.execu
te(StartAUTServerStateCommand.java:58)
at org.eclipse.jubula.communication.internal.Communicator$ConnectionListener.re
ceived(Communicator.java:841)
at org.eclipse.jubula.communication.internal.connection.Connection.fireMessageR
eceived(Connection.java:402)
at org.eclipse.jubula.communication.internal.connection.Connection.access$2(Con
nection.java:391)
at org.eclipse.jubula.communication.internal.connection.Connection$ReaderThread
.run(Connection.java:454)


could you please suggest me any solution for this.

thanks for your support.

Regards
Mamta
Previous Topic:No Authentication credentials
Next Topic:Testing Sirius based editor
Goto Forum:
  


Current Time: Tue Feb 27 05:09:32 GMT 2024

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

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

Back to the top