book
Article ID: KB0087524
calendar_today
Updated On:
Description
Resolution:
Description:
============
The purpose of this article is to explain how to unit test a custom module using provtest.
The attached example test a stream module (called simplemodule) that sorts Service Orders according to the value of their sortToken attribute. This module has two ports, 1 and 2 and it works as follows:
If sortToken value of the injected SO is:
- good, the Service Order goes to port 1/good.
- fail, the Service Order goes to port 2/fail.
Environment:
===========
TIBCO KPSA Mobile or Broadband 3.5+
Resolution:
===========
Three things are needed for the unit test environment :
1). A custom module implementig the logic.
2). A script file to automatically execute all required commands, clobber/start a new node, load the required components specified into a kds file and call provtest. A sample is attached here.
3). A provtest XML file to specify the flow to load and the different tests to run. In the demo, one test is for a good port, another one for a fail.
To run the demo:
1). Download provtest.tgz and untar it in your user directory.
2). Make sure KPSA is properly installed in SW_HOME (KPSA-3.5 was used here).
3). Execute the command : dmake runtest
Attachments:
===========
provtest.tgz
Issue/Introduction
KPSA Provtest Sample. How to test a simple stream module.