Embedded agent test with API: Application won´t start [message #1849149] |
Wed, 05 January 2022 12:23 |
Martin J Messages: 12 Registered: November 2021 |
Junior Member |
|
|
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] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03239 seconds