|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase com.metamatrix.script.junit.BshTestCase
public class BshTestCase
BshTestCase class along with BshTestSuite ties the JUnit and BeanShell toghether. Using the combination of these, user can write test scripts using the BeanShell scripting language, and integrate,run and report results using JUnit framework.
usage: For example if we have a BeanShell script called "JUnitTest.bsh", that can be executed by using as follows.
public MyTest extends TestCase{ public static Test suite() { BshTestSuite suite = new BshTestSuite(); suite.addTest("JUnitTest.bsh"); suite.addTest("Math.bsh"); return suite; } }Currently the path to the script must be relative to the working directory or fully qualified.
Constructor Summary | |
---|---|
BshTestCase(java.lang.String scriptName,
bsh.BshMethod method,
Interpreter interpreter)
|
Method Summary | |
---|---|
protected void |
runTest()
|
static junit.framework.Test |
suite()
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BshTestCase(java.lang.String scriptName, bsh.BshMethod method, Interpreter interpreter)
Method Detail |
---|
public static junit.framework.Test suite()
protected void runTest() throws java.lang.Throwable
runTest
in class junit.framework.TestCase
java.lang.Throwable
TestCase.runTest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |