Package eu.simuline.testhelpers
Classes needed for testing.
Essentially, these are one of the following:
-
Creating random double numbers (
DTestHelper
) -
Supporting additional assertions and white box tests
(
Accessor
andAssert
)) -
defining user interfaces for test-software:
A single class is run with a GUI using
Actions.runTestClass(String)
orActions.runFromMain()
. Both use a GUI implemented byGUIRunner
. More general,Actions
defines the actions of a user of the test software. To run a single test class or a package of testclasses (also all simuline-classeseu.simuline
) usingActions.runTestClass(String)
is implemented inJUnitSingleTester
. -
The other classes are auxiliary classes for the user interface:
to run single test classes or packages of testclasses.
ExtRunListener
and implementationsGUIRunListener
,SeqRunListener
andTextRunListener
react on test events Auxiliary classesTestCase
and thereinQuality
represent test cases in their suite and test runs with their their states. A special role playsTestCaseClassLoader
which enables test runners to to unload classes just by dropping the loader.
x
***** NOT YET COMPLETE.-
Interface Summary Interface Description GUIRunner.Selector Minimal interface for notifying about singular selection events. -
Class Summary Class Description Accessor<T> Provides access even to private fields, methods, constructors and inner classes, static or not, via reflection.AccessorTest Testclass for classAccessor
.AccessorTest.ForTests AccessorTest.ForTestsB AccessorTest.Static AccessorTest.Static.Static2 AccessorTest.TestAll Actions Represents the actions of the test GUI inspired by old junit GUI. **** Moreover provides a wrapper to access junit and the access point to run the gui started from the class to be tested. **** The fundamental methods areActions.runFromMain()
which runs the test class from its main method andActions.runTestClass(String)
which runs a testclass with the given name.Actions.ExitAction The action of exiting the tester application.Assert<E> Extends the framework of assertions provided byjunit.framework.Assert
.DTestHelper Creates double values for tests.ExtRunListener Extension ofRunListener
, version junit 4.12.GUIRunListener AnExtRunListener
which notifies the GUIGUIRunner
of the events occuring while running a testsuite and which comprises a textual run listener.GUIRunner The GUI of a JUnit test-runner.GUIRunner.HierarchyWrapper Represents the hierarchy of testsuites and testcases as a treeGUIRunner.HierarchyWrapper.hierarchyTree
possibly with a single selected node given byGUIRunner.HierarchyWrapper.singleSelectedNode
.GUIRunner.StackTraceLister Represents the stack trace of the throwable,GUIRunner.StackTraceLister.thrw
currently selected in the error list.GUIRunner.StatisticsTestState Represents the table displaying the number of runs, both, passed and to be performed altogether, the tests already ignored and those a failure or an error was found.GUIRunner.TabChangeListener A listener to the switching of a tab in the foreground; the other in the background.GUIRunner.TestCaseLister Represents the list of testcases already failed shown in one of the tabs and aGUIRunner.TestCaseLister.stackTraceLister
which represents the stack trace box below the tabbed pane.GUIRunner.TestListCellRenderer A special renderer object consisting of a label and a location within java code for an item in a failure list.GUIRunner.TestListCellRenderer.XLabel A special kind of label which fires only change in the text and which allows to set details: selection and focus.GUIRunner.TestProgressBar The progress bar indicating how much of the testcases already passed.GUIRunner.TestTreeCellRenderer To render a cell of the hierarchy tree.GUIRunner.TreePathIterator Represents a pathGUIRunner.TreePathIterator.currPath
in the tree of testsuites represented byGUIRunner.TreePathIterator.treeModel
.JUnitSingleTester Runs a bunch of tests usingActions.runTestClass(String)
.SeqRunListener Describe classSeqRunListener
here.TestCase Represents a test which may be a singular case or a suite during its lifetime from being scheduled to having runned successfully or not.TestCaseClassLoader A custom class loader which allows to reload classes for each test run.TextRunListener A simple RunListener which notifies of the events while running tests by text output. -
Enum Summary Enum Description Assert.CmpObj Represents an ordering relation.GUIRunner.TreePathIterator.TreePathUpdater Expands the tree along the current path, forGUIRunner.TreePathIterator.TreePathUpdater.Generic
after incrementing the current path.Quality Represents the phases in the life-cycle of aTestCase
from beingQuality.Scheduled
toQuality.Ignored
or viaQuality.Started
to finished which means eitherQuality.Invalidated
,Quality.Success
,Quality.Failure
or evenQuality.Error
.