KPSA Provtest sample. How to unit test a file based client adapter.
book
Article ID: KB0088685
calendar_today
Updated On:
Products
Versions
TIBCO KPSA - Mobile
-
Not Applicable
-
Description
Resolution: Description: ============ The purpose is to demonstrate how TIBCO KPSA Provtest can interact with shell script calls to unit test complex stream modules (such as drivers).
Environment: =========== TIBCO KPSA Mobile or Broadband 3.5+
Assumption: =========== The driver being unit tested is the xlmscanner::XmlScanner : - scanFrequency set to 5s, looking for XML files in manual_input folder . - 5s after having injected a request, a Service Order is expected to leave the driver.
Resolution: =========== To do such a test, you need :
- A file that contains the order to inject in the test flow. It's format should be valid for the client adpater (order.xml here).
- A provtest file (XML) that contains the flow to test and test detail.
The flow should contain the following modules:
- Client adapter you want to test . - prov::FlowController (needed by the client adapter) - provtest::MessageValidator (to validate the expected Service Order)
In the test configuration you should : - Inject an order using a shell script call (using cp, copy request file into input directory). - Specify an expected value that should be contained in the processed SO (dataset parameter, Product Order).
To run the demo: 1). Download the attached file xmldriver.tgz and untar it in your user tree directory. 2). Make sure KPSA is properly installed in SW_HOME (KPSA-3.5 was used here). 3). Execute the command : ./start.ksh
Attachments: =========== xmldriver.tgz
Issue/Introduction
KPSA Provtest sample. How to unit test a file based client adapter.
Attachments
KPSA Provtest sample. How to unit test a file based client adapter.
get_app