Nice to see someone at IBM has finally taken a look at how you might test their wonderful SCA modules.
Turns out you have to go through many steps in Websphere Integration Developer (WID) and it appears to rely on Cactus which tends to be a real pain. Getting the whole thing setup involves several XML configuration files and plenty of clickety-click development. And they aren’t really coming from the perspective of test first, since you always lay out the process first using their visual modeler. I personally despise this whole style of development, but being able to actually force it into something of a test harness does make it a bit more palatable.
Getting to a green bar with an SCA module:
- To import these modules into your workspace using WebSphere Integration Developer, select File => Import.
- In the Import dialogue, select Project Interchange, and then Next.
- Select the Arguments pane. Under VM arguments enter the following code(Figure 12):
Note that this specifies the localhost and port 9080; if your server or port for HTTP requests are different, you will need to adjust this string to match your choices.</li>
- Select Run to initiate the test.</ul>
Getting to a green bar testing a POJO:
- 4 steps.
- Write a failing test.
- Implement a class and method to fix compiler errors.
- Implement just enough code to pass the test.
- Run the test for a green bar.