BPEL unit (B-unit) testing is a framework that tests BPEL processes in the Process Server engine. B-unit testing validates process execution of invokes, receives, and replies. You can use B-unit testing to perform automated regression tests on processes.
When a B-unit test runs, the following steps occur:
The SendMessage command sends XML data to process. You provide this data as part of editing or generating a B-unit test.
The response comes back from the process
An assert expression determines what the response must have
The result is compared to the assert
An effective test is to compare entire chunks of XML to see the parts that don't match.
You can create individual B-unit test cases manually, but it is recommended that you save each simulation path you run as a B-unit test file. You can then rerun files as needed as you refactor your process. Readily available B-unit tests make it easy for you to check whether a component of your process is still working properly.
You can design unit tests to produce test cases that cover all paths through a process so you can test various scenarios. You can save a group of files into a suite, or suite of suites, to rerun. You can run B-unit tests outside of Process Developer, as part of your automated build procedures.