A sample Calculator.idl file for the following exercise is included in the <INSTALL>/eclipse/plugins/com.parasoft.ptest.libs.web_<VERSION>/root/build/examples/CORBA directory. In order to use IDLJ, make sure you have J2SDK installed and set the PATH variable so you can access the J2SDK’s executables from any directory.
Open a command prompt and navigate to the <INSTALL>/eclipse/plugins/com.parasoft.ptest.libs.web_<VERSION>/root/build/examples/CORBA directory that contains the Calculator.idl file.
Run the following command to automatically generate packages with correct paths (Windows example):
Code Block language text
idlj –pkgTranslate Persistent examples.CORBA –fall Calculator.idl
Run the following command to compile the java files:
- Create an external tool by right clicking on the test suite and select Add Test> Standard Test> New Tool> External Tool.
- Select the External tool node and change its name to CORBA Client.
- Click on the Browse button and select the path to the CORBA client executable.
- If CORBA client takes in parameters, add each argument buy by clicking on the ADD button. A new line will get generated, allowing users to input a flag and argument associated with the executable.
- Double-click on the line generated to enter flag and argument. A new dialog box will pop up; change the name and argument accordingly.
- If you wish to use a parameterized value, select Parameterized in the Value drop-down menu and select variable name in the Variable drop-down menu then click OK.
- In the right GUI panel select the Keep output check box to keep the returned values after each test run.
- Right-click the External tool node and select Add Return Value Output> Existing Output> Edit to show the returned values after execution of the test.
- Run the test, if the test succeeds return values should appear in the right GUI panel.
- If the test failed, returning a Null Pointer exception on the edit screen; check the CORBA server and make sure the server is listening on the designated port and that the service is up and running.