How to use (Ref ID) of a test case in Execution Callback

Introduction 

If you have a test case which you tracked on JIRA, you can link your test case to that JIRA ticket using the Ref ID field. This Ref ID can also be used in execution callbacks to pass any message you want to a REST endpoint using the Ref ID you specified in your test case after execution. This way, the Ref ID in Subject7 will match the ticket number on your REST endpoint thus passing your message to that endpoint. To add a Ref ID and use it in execution callbacks, follow the steps below.

 

Note

*In order to connect your JIRA account with Subject7, go to (Administration > Ticketing System). You will need to enter your JIRA username, URL and API token (as a password) to be able to authenticate successfully.

 

Steps:

1- Add a Ref ID to your test case by opening it and adding it in your test case parameters.

2- Create your Execution Set and select the test case you would like to run.

3- In Execution Callback section, select the condition where you would like the callback to use your Ref ID in (Any, Success, Failure, Timeout).

4- Create a REST connection by clicking on Add/View or by going to Artifacts > REST Connections. Enter a name for your REST connection and enter the URL followed by the dynamic variable that can be used to pass the Ref ID from your test case to the REST endpoint which is:

@test_case_execution_defect_tracking_id

5- Select POST as a method and enter a payload to pass to your REST endpoint after execution. For example:

{

   "message":"This is a sample message"

}

6- Save your REST connection.

7- On your REST endpoint, make sure that the Path includes the ticket number so that it can store the data for each execution in the right location.

8- Cloud run your execution set or schedule it to run at a time of your choosing.

9- Once the execution has completed, the execution callback request would have been sent to your REST endpoint using the Ref ID of your test case and has directed it to the correct Path on your endpoint. You can check your endpoint to see the result and display the passed message.

* The video below goes over the steps above:

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.