This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Testing and the fly likes MARATHON GUI testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Testing
Bookmark "MARATHON GUI testing" Watch "MARATHON GUI testing" New topic
Author

MARATHON GUI testing

janleva m chandra
Greenhorn

Joined: Jul 22, 2003
Posts: 1
Hi
I truied to use marathon tool with swing example. but i am not able to configure for my application.
Could you pls help me to configure my application with MARATHON.
I have a simple java class file which have two button. I want to exicute this class and record for button click. when recording coplited then i want to re-play the same and it should be run for N number of times. if some one help me for this then it would be great help for me.
Thanx
-------------------------------------
Code:
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.beans.*; //Property change stuff
import javax.swing.*;
import javax.swing.border.Border;
public class Client extends JDialog implements ActionListener{
public static int okCounter=1;
public static int cancelCounter=1;

public Client() {
JButton okButton = new JButton("OK");
okButton.setActionCommand("OK");
okButton.addActionListener(this);
JButton cancelButton = new JButton("CANCEL");
cancelButton.setActionCommand("CANCEL");
cancelButton.addActionListener(this);
JPanel lowerPanel = new JPanel();
lowerPanel.add(okButton, BorderLayout.EAST);
lowerPanel.add(cancelButton, BorderLayout.WEST);
getContentPane().add(lowerPanel, BorderLayout.CENTER);
getContentPane().setVisible(true);
getContentPane().setSize(new Dimension(350,350));
}
public static void main(String[] args){
Client cp = new Client();
cp.setSize(new Dimension(350,350));
cp.setVisible(true);
}
public void actionPerformed(ActionEvent e){
if(e.getActionCommand().equals("OK")){
System.out.println("OK Button Click="+okCounter);
okCounter++;
}
if(e.getActionCommand().equals("CANCEL")){
System.out.println("Cancel Button Click="+cancelCounter);
cancelCounter++;
}
}

}
[ July 22, 2003: Message edited by: janleva m chandra ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
What problems do you face?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
wood burning stoves
 
subject: MARATHON GUI testing