This post shows how to test component developed in WID using a script.
In scenarios where we do regression testing with predefined set of test data, its very tedious to do manual testing. Ideally we should create a test project for the module with test cases under a Test suite.
Below diagram show a snapshot of Test suite testing:
Script:
<project name="Automated OP Test Case Run" basedir="." default="run">
<property name="test" value="ScriptTest"/>
<property name="module" value="Script"/>
<!-- Running the component test project to test the application end to end -->
<target name="test">
<get dest="C:/OPTest.xml" src="http://localhost:9081/${test}Web/TestServlet"/>
</target>
In above script "Script" is the name of the module & ScriptTest is Test project.
It also exports test result in specified location which is C:/OPTest.xml in above example.
We can also run all the test cases of a test suite using this url
http://localhost:9081/ScriptTestWeb/TestServlet
TestServlet is a servlet (com.ibm.wbit.comptest.ct.servlet.TestServlet)
PI
In scenarios where we do regression testing with predefined set of test data, its very tedious to do manual testing. Ideally we should create a test project for the module with test cases under a Test suite.
Below diagram show a snapshot of Test suite testing:
Script:
<project name="Automated OP Test Case Run" basedir="." default="run">
<property name="test" value="ScriptTest"/>
<property name="module" value="Script"/>
<!-- Running the component test project to test the application end to end -->
<target name="test">
<get dest="C:/OPTest.xml" src="http://localhost:9081/${test}Web/TestServlet"/>
</target>
In above script "Script" is the name of the module & ScriptTest is Test project.
It also exports test result in specified location which is C:/OPTest.xml in above example.
We can also run all the test cases of a test suite using this url
http://localhost:9081/ScriptTestWeb/TestServlet
TestServlet is a servlet (com.ibm.wbit.comptest.ct.servlet.TestServlet)
PI