Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Unable to map objects(Jubula not mapping objects on JavaFX project)
Unable to map objects [message #1702600] Thu, 23 July 2015 13:21 Go to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Hi all,

I've attempted to find an issue to this problem, but my google-fu is failing me. I've followed the cheat sheet and managed to get Jubula to map the components correctly in the adder, the green boxes came up and the system worked.

So, I've moved onto my own project and followed the steps as before, there are minor differences as I've got a server to start first and then a client. I've created a separate AUT for the server and one for the client. I start them both up, click on the down arrow next to the object mapper mode and select my client. I've highlighted my text box, buttons and none of them come up with the green highlight, no matter how much I press the ctrl+shift and Q button.

I've also tried this with just the client AUT running and have tried the observer mode to see if that picked anything up. I also saw someone said to try the "remote" AUT agent instead of the embedded one, but that hasn't worked either.

I saw some people mention the AUT log files, but haven't found a window with that information in. Does anyone have an idea what it causing this? I'm guessing it's something to do with how my application was developed, but what it is, I don't know.

Other useful information:
The project is a JavaFx project
The project is being made with the java 1.8.0_51 library
Jubula version is 8.1.0
Eclipse is 4.5.0
I'm working on Windows 8.1

If people want to see the project or something else, please ask. Hope you can help!

[Edit] I've attached the XML file from the export of Jubula

[Updated on: Thu, 23 July 2015 13:52]

Report message to a moderator

Re: Unable to map objects [message #1702612 is a reply to message #1702600] Thu, 23 July 2015 14:01 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Spotted some of the logs and have attached them as files
[edit] Removed the quotes and changed them to be attached files
  • Attachment: rc_javafx.log
    (Size: 69.00KB, Downloaded 213 times)
  • Attachment: aut_agent.log
    (Size: 2.71KB, Downloaded 180 times)
  • Attachment: client.log
    (Size: 117.77KB, Downloaded 204 times)

[Updated on: Thu, 23 July 2015 14:15]

Report message to a moderator

Re: Unable to map objects [message #1702617 is a reply to message #1702612] Thu, 23 July 2015 14:20 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Thomas,

First of all, thank you for the extremely detailed entry Smile

You don't need a separate AUT for the client and the server: just the UI (client) you'll be testing (if the server needs to be started, then that's simply a prerequisite later for e.g. Hudson to do).

I'm assuming that the client AUT is listed in the running AUTs view when you start it? (Should be the case, since you can start the object mapping, but I like to check!).

I don't know what the problem could be right now (but I will forward this on to gather other ideas / suggestions). For the moment, could you see if it works with version 8.1.4 (a sprint increment beta release which is also downloadable via the portal). Maybe we've updated some things in the past few sprints that fix the problem Wink

If you can provide an example application, then that would help a great deal as well!

Best regards,
Alex

Re: Unable to map objects [message #1702619 is a reply to message #1702617] Thu, 23 July 2015 14:31 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Hi Alex,

Yes it is started, I've attached a screenshot and a Zip file with the application and batch file I'm using to run it. You can run it without the server, it will just error saying it can't reach it and show the login screen. I'm attempting to map the textfield, passwordfield and the button on the login pane shown. I'm downloading the sprint increment now and will be able to test that shortly.

Thanks for the help!
Re: Unable to map objects [message #1702626 is a reply to message #1702619] Thu, 23 July 2015 15:05 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Hi Alex,

I've tried the latest sprint version of 8.1.4.013 and still I can't get the object mapper working on my application. It works fine on the example adder, but my application and Jubula doesn't allow objects to be mapped.
Best regards,
Tom
Re: Unable to map objects [message #1702768 is a reply to message #1702626] Fri, 24 July 2015 13:51 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Thanks Tom, I'll see what I can find ot next week.

In the meantime, can you think of anything that is "special" about your AUT? A different UI framework / window handling mechanism?

I also wonder whether it could be to do with the Java version. Does it work with one of the 40 range versions?

Re: Unable to map objects [message #1702959 is a reply to message #1702768] Mon, 27 July 2015 14:57 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Thomas,

I spoke to the team about the problem today. Are you using JavaFX 2.1 as the UI toolkit version? They think that the "toolkit not initialized" error in the log could be caused by that. If you are using JavaFX 2.1, then this will be the problem: we support JavaFX from JavaFX 8 (the next version after 2.1: they changed the versioning to be compatible with Java).

Let me know!
Alex
Re: Unable to map objects [message #1703023 is a reply to message #1702959] Tue, 28 July 2015 06:06 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Hi Alex,

I'm using the Java version of 1.8.0_51, so would assume the JavaFX version should be from the 1.8 edition. Checking my Javafx.properties file I also have:
javafx.runtime.version=8.0.51
javafx.runtime.build=b16

I've also added the line of System.out.println(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion()); to my code and got the following back:
8.0.51-b16

So, unless I'm working with JavaFX wrong, it should be the latest version, but I'm not 100% sure on that.
Hope that information is of some help!
Tom
Re: Unable to map objects [message #1703025 is a reply to message #1703023] Tue, 28 July 2015 06:28 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Thanks for clarifying that Tom! Did you have a chance to mull on my questions from above?

-can you think of anything that is "special" about your AUT? A different UI framework / window handling mechanism?
-I also wonder whether it could be to do with the Java version. Does it work with one of the 40 range versions?

Re: Unable to map objects [message #1703026 is a reply to message #1703023] Tue, 28 July 2015 06:48 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
As for the something special about our AUT, not that I'm aware of. Though this is my first time doing proper GUI development work, so there is a possibility that I've broken conventions on doing certain things, but I couldn't tell you. For the UI, it was built using scenebuilder and is being started with the following code:
public class MainICrashGUI extends Application {

/**
* The main method.
*
* @param args the arguments
*/
public static void main(String[] args) {
Application.launch(MainICrashGUI.class, (java.lang.String[])null);
}

/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
public void start(Stage primaryStage){
try {
FXMLLoader loader = new FXMLLoader(getClass().getResource("ICrashGUI.fxml"));
Parent root = (Parent)loader.load();
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.setTitle("iCrash Control Simulation Panel");
primaryStage.show();
((ICrashGUIController)loader.getController()).initForm();
Log4JUtils.getInstance().getLogger().info("Java version: " + com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
} catch(Exception e) {
e.printStackTrace();
}
}
}

The initForm method deals with building of tableviews and adding some custom listeners to tab changes, but nothing unusual. Apart from that, I'm not sure what else to say
Tom
Re: Unable to map objects [message #1703028 is a reply to message #1703025] Tue, 28 July 2015 06:49 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
I'll have a look at a 40 version now, just going to download it
Re: Unable to map objects [message #1703038 is a reply to message #1703028] Tue, 28 July 2015 07:55 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Using the Java 8 update 45 didn't work either, I still get the same problem of not being able to map any of my controls in Jubula.
Tom
Re: Unable to map objects [message #1703052 is a reply to message #1703038] Tue, 28 July 2015 10:44 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Thanks for the update Tom.
Re: Unable to map objects [message #1703071 is a reply to message #1703052] Tue, 28 July 2015 12:36 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
So, I have some more information and maybe some more questions Smile

From looking at the snippet you posted, it seems that you're using fxml - is that true?

We have this ticket describing a problem with FXML (that the reaction times are slower).

I tried out an FXML example (attached) that did, however, work. I could map objects. It did take a while for the mapping to start (ensure that the red "stop object mapping mode" button is activated before trying to map, and activate the AUT by clicking in it before performing mapping.

[Note to myself for later: I used our current build for now]

Can you see if the example fxml file I've attached works for you? Also, could you send an example of an fxml file that is not working for you? (I know you've sent the application already, but it'll be an easier setup for now to use the fxml file Wink ).

Thanks so much for your help in getting to the bottom of this!
Alex
Re: Unable to map objects [message #1703111 is a reply to message #1703071] Tue, 28 July 2015 15:09 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Hi Alex,

This is going to be an odd one. I don't know what I've done specifically, but I uninstalled all the Java versions, uninstalled Jubula and then installed the latest Java and the latest sprint version of Jubula. I also changed some project properties and the system started working. I'm going to do a little testing and see what has caused it to start working. Thanks for the help so far, I'm now going to try and get to the bottom of it.
Tom
Re: Unable to map objects [message #1703112 is a reply to message #1703111] Tue, 28 July 2015 15:18 Go to previous messageGo to next message
Thomas Mortimer is currently offline Thomas MortimerFriend
Messages: 18
Registered: July 2015
Junior Member
Hi Alex,
I've found the issue, it's this:

When exporting a runnable Jar file from Eclipse, there are some options, called library handling, that list the following:


    1. Extract required libraries into generated JAR
    2. Package required libraries into generated JAR
    3. Copy required libraries into sub-folder next to generated JAR


I had originally selected the 2nd one due to some testing I was doing earlier, trying to fix another issue I had. I had fixed the issue another way and left it as that option and found no issues whilst running the jar file.

Jubula however doesn't like that setup and that was causing my issue, upon changing the option to the 1st one in the list and doing the extraction again, the file suddenly started working with the object mapper.

I don't fully understand how the library handling works, but changing it to the default option has now fixed my issue and hasn't caused any other problems. So you can consider it fixed from my point of view.

To answer your other question, yes it was an FXML file, but I hadn't noticed the slow load times.

Again, thank you for your help and I hope this topic helps someone else. Please let me know if you would like more information.
Tom

[Updated on: Tue, 28 July 2015 15:23]

Report message to a moderator

Re: Unable to map objects [message #1703181 is a reply to message #1703112] Wed, 29 July 2015 07:25 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Wow Tom, thanks so much for your comments and help! I'm very pleased that it's working now.
I'll ask the team to see if we knew about the aspects you found out and / or if it's a problem we need to look into.

I'm pretty sure this thread will definitely help others too.

I'll get back to you if we have any more questions!
Alex
Re: Unable to map objects [message #1760797 is a reply to message #1703181] Wed, 03 May 2017 06:49 Go to previous messageGo to next message
Martin Turner is currently offline Martin TurnerFriend
Messages: 5
Registered: May 2017
Junior Member
Hi,
I know this is quite an old post but I am having the same problem.

Not with my own project (yet)! but with the sample adder .

I just cannot get the objects to map.

I see the components in the unassigned component names, I start the AUT etc as the cheat sheet states but when pressing ctrl+shift+q nothing happens.

What am I doing wrong?

I must be missing something.

Thanks in advance.
Re: Unable to map objects [message #1760887 is a reply to message #1760797] Thu, 04 May 2017 06:41 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Martin,

You may need to click into the simple adder to activate it to be able to map. Which adder are you using (swing or fx?)

Best regards,
Alex
Re: Unable to map objects [message #1760889 is a reply to message #1760887] Thu, 04 May 2017 06:46 Go to previous messageGo to next message
Martin Turner is currently offline Martin TurnerFriend
Messages: 5
Registered: May 2017
Junior Member
I have tried clicking into the simpleadder but still nothing.

I am using the swing adder.

Regards
Martin.
Re: Unable to map objects [message #1760892 is a reply to message #1760887] Thu, 04 May 2017 07:10 Go to previous messageGo to next message
Martin Turner is currently offline Martin TurnerFriend
Messages: 5
Registered: May 2017
Junior Member
Adding to my earlier comment, the manual states the AUT should have a green border. I do not see any green border.

Could this be an issue?


Regards
Martin.
Re: Unable to map objects [message #1760893 is a reply to message #1760892] Thu, 04 May 2017 07:32 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Have you started the object mapping mode via the toolbar?
Re: Unable to map objects [message #1760905 is a reply to message #1760893] Thu, 04 May 2017 08:42 Go to previous messageGo to next message
Martin Turner is currently offline Martin TurnerFriend
Messages: 5
Registered: May 2017
Junior Member
Hi Alexandra,

That's great, it worked!

Is it always the case that you must open the object mapper from the toolbar?

Thanks again for the solution!


Regards
Martin.
Re: Unable to map objects [message #1760913 is a reply to message #1760893] Thu, 04 May 2017 09:45 Go to previous messageGo to next message
Martin Turner is currently offline Martin TurnerFriend
Messages: 5
Registered: May 2017
Junior Member
Hi Alexandra,

Slightly different query...

I had an issue where I wanted to rerun the example test but it would not stop after starting execution.

I quit out of jubula and then when I restarted I cannot reopen my previous project.

I select Test > Open but it just opens the sample projects not my saved project.

Any ideas?

Regards
Martin.
Re: Unable to map objects [message #1761461 is a reply to message #1760913] Thu, 11 May 2017 10:07 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
You might have accidentally checked to auto loading of a Project. You can disable this again by unchecking the checkbox in the Preferences. Its located in Window -> Preferences -> Test on the right side there should be a checkbox with the description "Perform auto load of project from Database".

kind regards
Marvin Mueller
Previous Topic:Jubula extension component !
Next Topic:Run testxec.exe to remote machine
Goto Forum:
  


Current Time: Thu Mar 28 15:21:30 GMT 2024

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

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

Back to the top