Skip Headers
Oracle® Communications Design Studio Modeling Activation
Release 7.2.4
Go to Design Studio Help Home
Go to Table of Contents
Go to Feedback page

Go to previous page
Go to next page
Mobi · ePub

Understanding Unit Testing

Unit testing in Design Studio does not need to be implemented to complete a cartridge, although it is highly recommended for these reasons:

You can test the processor outside of the ASAP system because the interfaces and generative classes of the Java processor are all independent of the ASAP system and its classes (the generated InputBeans and output are not tied to ASAP). To run the processor, a TestCase is generated once (with a sample test based on information at the time of creation), after which the developer owns it and can extend it.

The unit test framework initiates all tests in test subfolder. Unit testing is implemented as a JUnit test. JUnit tests can optionally be run with the JDT Debugger.

Diagram is described in surrounding text.

The TestCase simulates the proxy for each individual test, and:

The TestCase is a JUnitTestCase. Each TestCase can contain many tests, and each test is defined by a no-parameter method beginning with "test".

The generated TestCase has a framework that provides a test. The test runs based on input files, which find the data and test criteria for a particular test. This framework enables developers to create simple files to define new tests. This works for any standard type of test where you pass in data and check the request to ensure it was sent as expected, and that the returned exit type is the one you expected. Also, this allows for a simple, standard response to be used inside the test.

Sample test classes are provided for simulating IExit and ILogger. A base output class provides the methods required for output classes.

Related Topics

Running Unit Test Cases

Running Unit Tests with the JDT Debugger

Understanding Unit Test Property Files

Configuring a Unit Test

Working with the Action Processor

Modeling Entities