4

I have a tricky one here.

We have this huge Desktop-like WebStart application in our company and now we are trying to create automated tests for it. Since our applications GUI is not fully implemented using Swing or AWT we have trouble to test it using tools like JUnit, Jelly, UISpec4J and friends, because we can't interact with some objects like Tracks and Curves. We need to use something like Selenium, only for Swing.

The problem is that to start an automated test in Costello you need a JFrame class with a main method. But what we have is a WebStart app that starts like this:

 $ javaws app.jnlp

Is there a way to load this program into a JFrame programatically ?! Something like this.

public class JNLPWindowLoaded extends JFrame{


    public JNLPWindowLoaded(String jnlpPath){
        //start the app here and load it into this class
    }

    public static void main(String args[]){
        new JNLPWindowLoaded("/home/kirill/test.jnlp");
    }
}

Please give me some light over here!

de.la.ru
  • 2,994
  • 1
  • 27
  • 32
  • What dó these toolkits use underneath? – Thorbjørn Ravn Andersen Jul 05 '12 at 20:54
  • It seems that Abbot & Costello uses java.awt.Robot to make the interaction with an Swing interface. It works like this: 1- Create the launch step, indicating the classpath to your main class that will start the application. 2- Launch the application through Costello 3- Turn on the recording process on 4- Interact with your application 4- Turn the recording off 5- When you finish the recording process you can see that the steps you made are in Costello 6- Make some Assertions 7- Run the test – de.la.ru Jul 06 '12 at 10:56
  • Can your app be launched stand-alone? Makes things much easier. – Thorbjørn Ravn Andersen Jul 06 '12 at 11:51
  • There is a problem launching the app stand-alone, some functionalities doesn't seem to work. So it has to be launched via WebStart. – de.la.ru Jul 06 '12 at 12:03
  • 1
    Ask those who know how you debug this program. That might help you... – Thorbjørn Ravn Andersen Jul 06 '12 at 12:18

1 Answers1

0

What's your budget? If this is a big company project you might want to look at HP Unified Functional Testing (formerly x-runner/win-runner) http://www8.hp.com/us/en/software-solutions/software.html?compURI=1172957#tab=TAB1

Rick Mangi
  • 3,761
  • 1
  • 14
  • 17