aspose file tools*
The moose likes Testing and the fly likes Java GUI Testing Framework/Integration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Java GUI Testing Framework/Integration" Watch "Java GUI Testing Framework/Integration" New topic
Author

Java GUI Testing Framework/Integration

Ivan Ho
Greenhorn

Joined: Apr 22, 2010
Posts: 4
Hello all,

I've been tasked with looking at a possible solution for integrating an application with and external java GUI application.

The problem is that this external GUI java application, does not have any API, web services, and of course we have no access to source code - which would facilitate integration.

Is there any clever way to "drive" this GUI based on triggers from our other application? Any API's outther that offer this functionality?

Previously, there was a very adhoc solution. Very inefficient and error prone. Previous developers were using the GUI testing framework Marathon to record different scenarios and create "test scripts" - which they would later call and pass parameters to and the external GUI app would look as if it was "integrated" some how.

My recommendation was that doing the same thing was not a good approach. Is there anything out there that would help me do what I am trying to achieve?

Thank you very much.

S.G.

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19693
    
  20

I'll move this to our Testing forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30511
    
150

GUI means what? Swing? Web app?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ivan Ho
Greenhorn

Joined: Apr 22, 2010
Posts: 4
GUI as in swing/awt - not web.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30511
    
150

Ivan,
Abbot is a framework for writing Swing tests. JFC Unit also sounds like it fits that area, but I've never tried it.
Ivan Ho
Greenhorn

Joined: Apr 22, 2010
Posts: 4
Jeanne,

Thank you very much. I am currently looking at Abbot, but will take a look at JFC Unit. Now, given that this frameworks were developed specifically for testing - which assumes you wrote the GUI and know its structure - do you think it would be a good solution to use them to drive the java GUI from another app?

Previously, a solution was implemented using Marathon. But its a poor solution because every time they change a label, button, window name, etc. the "integration" breaks, and the testing scripts have to be changed to accommodate the new change.

I'm trying to convince my supervisor that this is not the way to go - but I still want to look further into it. May be there is a better approach.

Do you have any advice/? Thoughts?

Thank you.

Ivan
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2499
    
    8

"Ivan Ho", please check your private messages for a JavaRanch administrative matter.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30511
    
150

Ivan,
Do you have the code for this other app? Do you expect it to change? If you don't have the code, I think it would be harder to test. If it changes frequently, I recommend working with the developers that do own it. Or get them to test it!
Ivan Ho
Greenhorn

Joined: Apr 22, 2010
Posts: 4
Jeanne,

No, I do not have the code for this app and it does change - they update it every few months.

Having said that - my task is not to test the application. The application by itself works very well, I am sure the developers have done a good job of testing.

What I am being tasked with is to find a way to interact with it programmatically from our other app. Since its a GUI and we will not be provided either with an API or another means of interaction such as web services, the previous developer's solution was to use Marathon - a very adhoc, error prone solution. Though very imaginative and it was working well until a new design of the app came out and the solution broke for good.

Basically we would create different "test scripts" (Jython) based on the different scenarios the users would need to run. We would then make the parameters to the test scripts so that they could be dynamically read from and XML file.

Our app would then write this XML parameter file and initiate Marathon - thus giving the user the illusion that the java app was being driven by the inputs he was giving our app.

That is why I need some advice from a more advanced java user. I've never done anything like this in my years developing Java and I see a lot of cons to this solution. May be there is some framework out there designed to do this? If not I can always recommend this is not a good solution.

Any thoughts?

Thanks Jeanne

Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30511
    
150

Ivan,
In that case, no tool is going to solve the problem. If the team changes the interface every few months, any code you write to access it will also break periodically.

I think the best thing is to ask them for an API you can call. They are internal to your organization, yes? If so, it is a better investment of resources to have something stable. Even if you have to spend some time working with them ONCE to get it done.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java GUI Testing Framework/Integration