Testing a connector in Eclipse (optional)

To test a connector outside a container such as IBM® Integration Bus, create a JUnit test case and run that test case in Eclipse.

Before you begin

About this task

When you create a connector, you can test it by creating a JUnit test case. You can run the test case in Eclipse, without the need to install a container, such as IBM Integration Bus.

Procedure

To test a connector in Eclipse, complete the following steps:

  1. Create some mock classes for your connector.
  2. Create a JUnit test case to test the methods of your classes.
  3. To run the test, right-click the Java™ test case in the Package Explorer or Application Development view and click Run as > JUnit Test.

Results

The output from the test in the console window shows a number of interactions with the endpoint.