JET

edu.utep.cs.et.gui.tester
Class ExperimentTester

java.lang.Object
  extended by edu.utep.cs.et.gui.tester.DefaultTester
      extended by edu.utep.cs.et.gui.tester.ExperimentTester
All Implemented Interfaces:
Constants, Tester

public class ExperimentTester
extends DefaultTester

A test class that also collects and prints test statistics. This class is used to experiment and measure the performance of different testing strategies and methods.

Author:
Yoonsik Cheon

Field Summary
private  int meaningfull
          Number of meaningless test cases.
private  int meaningless
          Number of meaningfull test cases.
private  int redundant
          Number of meaningfull test cases.
private  int total
          Total number of test generation attempts.
 
Fields inherited from interface edu.utep.cs.et.gui.Constants
CLASS_EXTENSION, COLOR_EXPLORER, COLOR_OUTPUT, COPYRIGHT, DEBUG, EDIT_MENU_NAME, EXPLORER_DIR, EXPLORER_ROOT, FILE_MENU_NAME, HELP_MENU_NAME, ICON_ABOUT, ICON_ABSTRACT_CLASS, ICON_BROWSER, ICON_CLASS, ICON_CLASS_DISABLED, ICON_DELETE, ICON_ERROR, ICON_FILE, ICON_FOLDER, ICON_GEN_APP, ICON_HOME, ICON_INFORM, ICON_INTERFACE, ICON_JAVA_FILE, ICON_JML_LOGO, ICON_METHOD, ICON_METHOD_GREEN, ICON_METHOD_ORANGE, ICON_METHOD_RED, ICON_MINER, ICON_NEW, ICON_NEWTESTSUITE, ICON_NOTE, ICON_OPEN, ICON_OUTPUT, ICON_PREFERENCES, ICON_QUESTION, ICON_REDO, ICON_SAVE_AS, ICON_TEST_FILE, ICON_UNDO, ICON_UNKOWN, ICON_WARN, JAVA, JAVA_EXTENSION, JAVAC, JUNIT_SWINGGUI_TESTRUNNER, NEWLINE, OPTION_MENU_NAME, TEST_MENU_NAME, TITLE, TOOL_MENU_NAME, VERSION, WEB_PAGE_LOCATION, WEB_PAGE_NAME, WINDOW_HEIGHT, WINDOW_MIN_HEIGHT, WINDOW_MIN_WIDTH, WINDOW_WIDTH
 
Constructor Summary
ExperimentTester()
          Creates a new instance.
 
Method Summary
protected  TestCaseGenerationListener createTestCaseGenerationListener(EtMethod emeth)
          Creates a test case generation listener for testing the given method.
protected  void doTest(Collection meths)
          Tests all the methods contained in the given collecton.
protected  boolean enableStatDialog()
          Overridden here to disable the test statistics dialog.
private  void experiment(AbstractAction action, ActionEvent e)
          Performs the given test action with the given action event while collecting test statistics.
protected  AbstractAction getPopTest()
          Overridden here to collect test statistics.
protected  AbstractAction getPopTestAll()
          Overridden here to collect test statistics.
protected  AbstractAction getPopTestDeclared()
          Overridden here to collect test statistics.
protected  AbstractAction getPopTestInherited()
          Overridden here to collect test statistics.
private  void reset()
          Resets variables that collect test statistics.
 
Methods inherited from class edu.utep.cs.et.gui.tester.DefaultTester
addClassFileChangeListener, classBeingOpened, doTest, getExplorerView, getOptionPanel, getView, loadFile, methodSelected, setCloseViewAction, setDropTarget, setSourceCodeViewer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

total

private int total
Total number of test generation attempts.


meaningfull

private int meaningfull
Number of meaningless test cases.


meaningless

private int meaningless
Number of meaningfull test cases.


redundant

private int redundant
Number of meaningfull test cases.

Constructor Detail

ExperimentTester

public ExperimentTester()
Creates a new instance.

Method Detail

createTestCaseGenerationListener

protected TestCaseGenerationListener createTestCaseGenerationListener(EtMethod emeth)
Creates a test case generation listener for testing the given method. This is overridden here to generate experimental statistics.

Overrides:
createTestCaseGenerationListener in class DefaultTester

enableStatDialog

protected boolean enableStatDialog()
Overridden here to disable the test statistics dialog.

Overrides:
enableStatDialog in class DefaultTester

getPopTestAll

protected AbstractAction getPopTestAll()
Overridden here to collect test statistics.

Overrides:
getPopTestAll in class DefaultTester

getPopTest

protected AbstractAction getPopTest()
Overridden here to collect test statistics.

Overrides:
getPopTest in class DefaultTester

getPopTestInherited

protected AbstractAction getPopTestInherited()
Overridden here to collect test statistics.

Overrides:
getPopTestInherited in class DefaultTester

getPopTestDeclared

protected AbstractAction getPopTestDeclared()
Overridden here to collect test statistics.

Overrides:
getPopTestDeclared in class DefaultTester

doTest

protected void doTest(Collection meths)
Tests all the methods contained in the given collecton. This method is overridden here to perform synchronous testing.

Overrides:
doTest in class DefaultTester

experiment

private void experiment(AbstractAction action,
                        ActionEvent e)
Performs the given test action with the given action event while collecting test statistics.


reset

private void reset()
Resets variables that collect test statistics.


JET

JET is Copyright (C) 2005-2007 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.