Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Embedded agent test with API: Application won´t start
Embedded agent test with API: Application won´t start [message #1849149] Wed, 05 January 2022 12:23 Go to next message
Martin J is currently offline Martin JFriend
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

Re: Embedded agent test with API: Application won´t start [message #1849180 is a reply to message #1849149] Thu, 06 January 2022 12:28 Go to previous messageGo to next message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
Can you please check if you added all necessary plugins to your project [1]

best regards
Marvin
[1] https://help.eclipse.org/2020-12/topic/org.eclipse.jubula.client.ua.help/content/html/developerManual/clientAPI/ch02s08s03.html
Re: Embedded agent test with API: Application won´t start [message #1849238 is a reply to message #1849180] Mon, 10 January 2022 07:43 Go to previous messageGo to next message
Martin J is currently offline Martin JFriend
Messages: 12
Registered: November 2021
Junior Member
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
Re: Embedded agent test with API: Application won´t start [message #1849407 is a reply to message #1849238] Tue, 18 January 2022 08:47 Go to previous messageGo to next message
Martin J is currently offline Martin JFriend
Messages: 12
Registered: November 2021
Junior Member
Hi again Marvin,

Was there any particular plugin that you suspected were missing?

I could still need some help with this issue.

What does AutStartResponse.DATA mean?

Kind regards,
Martin
Re: Embedded agent test with API: Application won´t start [message #1851206 is a reply to message #1849407] Wed, 30 March 2022 13:55 Go to previous message
Martin J is currently offline Martin JFriend
Messages: 12
Registered: November 2021
Junior Member
I found a solution to my problem. It seems the instruction found here: https://help.eclipse.org/2020-12/topic/org.eclipse.jubula.client.ua.help/content/html/developerManual/clientAPI/ch02s08s01.html is faulty.

I reverted back to trying to get the SimpleAdder example working and found this: https://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/tree/org.eclipse.jubula.examples.api.swing/README.md. This instruction says "all development jars for the API({JUBULA}/development/api/JARs/) must be copied into the "libs" folder". When I did so I got the embedded autagent to work.

Martin
Previous Topic:Database error after install
Next Topic:Check clipboard value
Goto Forum:
  


Current Time: Fri Mar 01 21:27:07 GMT 2024

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

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

Back to the top