Embedded agent test with API: Application won´t start [message #1849149] |
Wed, 05 January 2022 12:23  |
Eclipse User |
|
|
|
Hi all,
I have been using an external AUT agent and starting my application in this way (which works fine by the way):
@Override
public void setup() {
AUTAgent autAgent = MakeR.createAUTAgent(_host, _port);
autAgent.connect();
AUTConfiguration config = new SwingAUTConfiguration( //
_name, //
_autId, //
_command, //
_workingDir, //
null); //
AUTIdentifier identifier = autAgent.startAUT(config);
if (identifier != null) {
AUT aut = autAgent.getAUT(identifier, SwingComponents.getToolkitInformation());
aut.connect();
_jubulaResources = new JubulaResources(autAgent, aut, identifier);
}
}
For various resons I would like to use the embedded AUT agent instead. I have changed my code according to the exmples i have found and it looks like this.
@Override
public void setup() {
AUTAgent autAgent = Embedded.INSTANCE.agent();
autAgent.connect();
AUTConfiguration config = new SwingAUTConfiguration( //
_name, //
_autId, //
_command, //
_workingDir, //
null); //
AUTIdentifier identifier = autAgent.startAUT(config);
if (identifier != null) {
AUT aut = autAgent.getAUT(identifier, SwingComponents.getToolkitInformation());
aut.connect();
_jubulaResources = new JubulaResources(autAgent, aut, identifier);
}
}
As you can see the only difference between the two is the first line of each method.
When using the embedded variant the call AUTIdentifier identifier = autAgent.startAUT(config); returns null and my application won´t start.
Tracing the calls it seems as the variable genericStartResponse is set to 4 which equals to AutStartResponse.DATA. Code snippet below is from AUTAgentImpl.startAUT() method.
m_agent.send(startAUTMessage);
Object genericStartResponse = Synchronizer.instance()
.exchange(null);
if (genericStartResponse instanceof Integer) {
int startResponse = (Integer) genericStartResponse;
return handleResponse(startResponse);
What am I missing here? Anybody have any input?
Kind regards,
Martin J
Jubula 8.8.0.034
OpenJDK 17
[Updated on: Wed, 05 January 2022 12:27] by Moderator Report message to a moderator
|
|
|
|
Re: Embedded agent test with API: Application won´t start [message #1849238 is a reply to message #1849180] |
Mon, 10 January 2022 07:43   |
Eclipse User |
|
|
|
Hi Marvin,
I suppose you mean this link? https://help.eclipse.org/2020-12/topic/org.eclipse.jubula.client.ua.help/content/html/developerManual/clientAPI/ch02s08s01.html
I am using gradle and my build.gadle file looks like this:
apply plugin: 'java-library'
dependencies {
api ':javax.xml'
api ':ch.qos.logback.classic'
api ':ch.qos.logback.core'
api ':javax.xml.stream'
api ':org.slf4j.api'
api ':org.xmlpull'
api ':com.thoughtworks.xstream'
api ':org.apache.commons.beanutils'
api ':org.apache.commons.codec'
api ':org.apache.commons.exec'
api ':org.apache.commons.io'
api ':org.apache.commons.lang'
api ':org.apache.oro'
api ':org.eclipse.jubula.autagent.api'
api ':org.eclipse.jubula.autagent.common'
api ':org.eclipse.jubula.client.api.commands'
api ':org.eclipse.jubula.client.api'
api ':org.eclipse.jubula.communication'
api ':org.eclipse.jubula.rc.common.agent'
api ':org.eclipse.jubula.rc.common'
api ':org.eclipse.jubula.rc.swing'
api ':org.eclipse.jubula.toolkit.api'
api ':org.eclipse.jubula.toolkit.base.api'
api ':org.eclipse.jubula.toolkit.concrete.api'
api ':org.eclipse.jubula.toolkit.swing.api'
api ':org.eclipse.jubula.tools'
api ':org.eclipse.jubula.tools.exec'
api ':org.eclipse.osgi'
}
I have doublechecked and it seems as I have all the libraries that is listed in the supplied link. The jar-files have been copied from the jubula_8.8.0.034\development\api\JARs folder of the Jubula installation.
Kind regards,
Martin
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03871 seconds