// automatically run the same test cases in the Validation Test Plan import java.awt.*; import java.applet.*; public class GUITest { // called by GUI when Test button is pushed // must have access to applet to set fields and textarea to print public GUITest(GUI gui, TextArea ta, TextField idField) { ta.append("----------------------\n"); ta.append("BEGIN: AUTOMATED TEST \n"); ta.append("----------------------\n"); ta.append("----------------------\n"); ta.append("TEST: 1 | ID: XXX \n"); ta.append(" | push Create \n"); // set the fields in the GUI , call doAction just like a button push // let GUI do the usual calls to Domain Logic idField.setText("XXX"); gui.doAction("Create"); ta.append("----------------------\n"); ta.append("TEST: 2 | push List \n"); ta.append("----------------------\n"); gui.doAction("List"); ta.append("----------------------\n"); ta.append("END: AUTOMATED TEST \n"); ta.append("----------------------\n"); } }