Launching Executions

To execute a Client-side test script, you can take the following steps:

  1. Under Test Definitions, find the test script that supports client-side testing, select it, and click the Create Test Setup button:

    ../_images/peer-to-peer-select-testscript_a2.png
  2. Select your test system (client/initiator system) as the Origin. It’s marked in blue below. The target of the exchange will be the Destination server and is marked in red below:

    ../_images/peer_to_peer_testsetup_a3.png

    To get your server to appear in the Origin drop-down, you need to select the Client option as a supported profile in your test system’s configuration:

    ../_images/fhirclient_profile_a5.png
  3. Click on Execute button to launch the test execution:

    ../_images/peer_to_peer_testsetup_execute_a3.png
  4. You will land on the Test Execution screen. The Test Script will have sections that don’t need your intervention (e.g. Setup and operations where <origin> element is missing). The test script execution proceeds until it hits an operation where <origin> element is present and for which input is required by the client test system i.e. you. That operation execution along with its test script execution and test execution will assume the status of Waiting for Request at that point:

    ../_images/pp_testexecution_waiting_a3.png
  5. Click on the test script link above to get to the Test Script Execution screen:

    ../_images/pp_submit_request_a3.png

    In the panel highlighted above, you will find all the data you need to submit as a FHIR Client. It has the following information:

    • The HTTP method you need to use (GET, POST, PUT, etc.) and the URL you need to send your request to. This URL will be the Touchstone Proxy URL and will be unique to each test system. It will be different from the Base URL of the test system. The Proxy URL allows Touchstone to intercept the message and execute the assertions for that operation execution.

    • The Request payload (body) if the method is PUT or POST.

    • The USER_KEY that needs to be in the request header. This USER_KEY value will be unique to each user. It can be provided in the request header or request body and will be used by Touchstone to tie the intercepted message to your test execution.

    • Any other headers that are required (e.g. Accept, Content-Type, etc.).

    Warning

    It is important to match the request data being sent from your FHIR Client to the one indicated in the panel above.

  6. You might get the following error if you are in the initial stages of using your FHIR Client system in Touchstone:

    ../_images/pp_oper_failed_ipaddress_unknown_a3.png

    For added security, Touchstone verifies that the the actual IP address of the request matches the IP address of your test system in Touchstone. You get the error above if they don’t.

    You can do one of the following to get around this error:

    1. Add the IP address indicated in the message above (10.0.75.1 for the case above) to the list of IP addresses of your test system:

    ../_images/pp_add_ipaddress_a3.png

  1. Uncheck this box on your test system.

../_images/pp_uncheck_verify_on_testsystem_a4.png

It is recommended to do option (a). If you do option (b), then other users can configure their test setups with your test system playing Origin and submit requests from their FHIR Clients. This will give the impression to end-users that the request came from your test system when in fact it came from another FHIR Client. If you don’t have such a concern (because you have marked your client test system as accessible/executable only by ‘My Org’), then option (b) is more convenient as you don’t have to change the test system’s IP Address in Touchstone every time the IP address of your FHIR Client changes.


  1. You continue to initiate from your client test system as required by any remaining Waiting for Request operations until the test script execution completes successfully:

    ../_images/pp_testscript_exec_passed_a3.png