An emulator definition step for an inline human task enables
you to emulate an inline human task for a specific test case and use
the test data table to specify the expected input data and output
response data. It also enables to you to claim and complete the human
task automatically.
About this task
If your test is invoking a one-way operation, the test will
return a result of Passed, but the emulation will not actually run
unless you have followed the instructions in the topic "Emulating
components and references when invoking one-way operations". To
add and run an emulator definition step for an inline human task:
Procedure
- Add an emulator definition step for an inline human task
by completing the following steps:
- In the Business Integration view, expand your component
test project and expand the Test Suites folder.
- Right-click your test suite and select Open.
The test suite opens in the test suite editor.
- Click the Test Cases tab. The
Test Cases page opens.
- In the upper left corner of the Test Cases area, click
the down arrow beside the Add Test Case icon
.
- From the menu list, select Emulator Definition
Step > Inline Human Task. The Add Inline Human Task Emulator
Definition wizard opens.
- In the list box, expand the module and business process
and then select the inline human task for which you want to emulate
the response data and automatically claim the task.
- If you want to have variables automatically created
for the new emulator definition step, ensure that the Create
variables for the new emulator definitions check box is
selected. One variable will be automatically created in the test data
table for each operation parameter. (If the check box is not selected,
you will need to manually create the variables yourself in the test
suite editor.)
- Click Finish. A new Define
human task emulator step is displayed under the associated
invocation in the Test Cases area.
- Specify properties for the new emulator definition step
by completing the following steps:
- In the Test Cases area, ensure that the new Define
human task emulator step is selected.
- Move the emulator definition step to a position over
the invocation step by clicking the Move Up icon
. (Emulator definition steps
must be placed in a position that precedes the associated invocation
step.)
- In the Detailed Properties area,
ensure that the fields display the correct module, business process,
and inline human task for the selected emulator definition step. (If
you need additional information about these properties or any other
properties, position your cursor in a property and press F1 to
open the context-sensitive help information.)
- Click the Output tab and then
select either Return response or Throw
exception, depending on the parameter type that you want
to return. If you choose Return response, select
a variable for the output parameter and then click the link on the
parameter name to open the test data table and specify a variable
value in the Set column. If you choose Throw
exception, select the exception that you want to throw
and then create a variable for it.
- If you want to specify a variable value for the input
parameter, click the Input tab, then select
a variable for the input parameter and click the link on the parameter
name to open the test data table and specify a variable value in the Expected column.
The emulator rule will only apply if the actual input data values
match the values specified in the expected inputs of the emulator
definition. By default, the expected inputs are not set, which means
that the emulator rule is always applied.
- In the test suite editor, press Ctrl-S to
save your changes.
- Use the new emulator definition step to run a test by completing
the following steps:
- In the Business Integration view, right-click the test
suite and select Run Test. The test client
opens.
- In the test client, click the Continue icon
to invoke the operation and run the test.
(If the Deployment Location wizard opens, select the server where
you want to deploy the test artifacts and then click Finish.)
A Define Human Task Emulator event is displayed
in the Events area.
- In the Events area, select the Claim event
and view the test results in the Detailed Properties area. (If you
need additional information about a property, position your cursor
in the property and press F1 to open the context-sensitive
help information.)
- Close the test client without saving the test trace.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15