Showing posts with label Testing using Ant script. Show all posts
Showing posts with label Testing using Ant script. Show all posts

(WID/WPS) Testing components using Ant Script

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

(WID/WPS) Integrated Test Client

This post is kind of must read post for all WID/WPS developers, because what we develop today, we test that sooner or later with unit or integration testing.


Highlights of the post are:
  • Component Testing.
  • Module Testing.
  • Testing modules from external application (Attaching to a module)
  • Emulation (Manual/Programmatic)
  • Creating reusable Test Cases.
  • Data pool (Reusing values)
  • Testing using Ant script 


Few very very useful links:


Getting the most out of the WebSphere Integration Developer integration test client
http://www.ibm.com/developerworks/websphere/techjournal/0712_gregory/0712_gregory.html


Taking component testing to the next level in WebSphere Integration Developer
http://www.ibm.com/developerworks/websphere/library/techarticles/0806_gregory/0806_gregory.html


Testing SOA applications with WebSphere Integration Developer and Ant scripts
http://www.ibm.com/developerworks/websphere/library/techarticles/0903_bist/0903_bist.html


A doc on test client
http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/topic/com.ibm.iea.wid_v7/wid/7.0/Testing/WBPMv7_WID_TestClientLab.pdf