Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Pre Test Run Hook Data Format
    Hooks defined in the section "Pre Test Run Hooks" receives a variable $tr. Format of this variable is as follows:

    Code Block
    languagejs
    linenumberstrue
    {
    	"details": {
    		"name": "<String>", //Name of the test run
    		"testCasesCount": "<Number>", //Total number of test cases
    		"executor": {
    			"name": "<String>", //Test Run Executor name
    			"email": "<String>" //Test Run executor email
    		}
    	}
    }
  2. Post Test Run Hook Data Format
    Hooks defined in the section "Pre Test Run Hooks" receives the updated variable $tr. Format of this variable is as follows:

    Code Block
    languagejs
    linenumberstrue
    {
    	"details": {
    		"id": "<String>", //Test Run Id
    		"name": "<String>", //Test Run name
    		"testCasesCount": "<Number>", //Total number of test cases
    		"executor": {
    			"name": "<String>", //Test Run Executor name
    			"email": "<String>" //Test Run executor email
    		}
    	},
    	"result": {
    		"totalCount": "<Number>", //Total number of test cases
    		"failedCount": "<Number>", //Count of failed test cases
    		"passedCount": "<Number>", //Count of passed test cases
    		"notExecutedCount": "<Number>", //Count of not executed test cases
    		"notRunnableCount": "<Number>", //Count of not runnable test cases
    		"remarks": "<String>", //Remarks if any
    		"resultLink": "<String>" //Link to view the results of test cases in the test run
    	}
    }
  3. Pre Test Case Hook Data Format
    Hooks defined in the section "Pre Test Run Hooks" receives a variable $tc. Format of this variable is as follows:

    Code Block
    languagejs
    linenumberstrue
    {
    	"details": {
    		"id": "<String>", //Test Case Id
    		"summary": "<String>", //Test Case summary
    	},
    	"request": { //Test Case request definition as specified by user
    		"method": "<String>", //Test Case request method, value can be one of GET, POST, PUT, PATCH, DELETE, OPTIONS.
    		"url": "<String>", //Test Case URL
    		"params": [
    			{
    				"id": "<String>", //Parameter Id
    					"name": "<String>", //Parameter name
    				"method": "String", //Parameter type, value can be one of query, body, path.
    				"value": "<String>", //Parameter value
    				"description": "<String>", //Parameter description
    				"paramType": "String" //Parameter data type, value can be one of string, number, boolean, object.
    			},
    			...
    		],
    		"headers": [
    			{
    				"id": "<String>", //Header Id
    				"name": "<String>", //Header name
    				"value": "<String>" //Header value
    			},
    			...
    		],
    		"rawBody": "<String>" //Raw body if specified, in string format
    	}
    }

    Note: This hook also receives the variable $tr (Format is same as Pre Test Run hook Data Format).
     

  4. Post Test Case Hook Data Format
    Hooks defined in the section "Pre Test Run Hooks" receives the updated variable $tc. Format of this variable is as follows:

    Code Block
    languagejs
    linenumberstrue
    {
    	"details": {
    		"id": "<String>", //Test Case Id
    		"summary": "<String>", //Test Case summary
    	},
    	"request": { //Test Case request definition as specified by user
    		"method": "<String>", //Test Case request method, value can be one of GET, POST, PUT, PATCH, DELETE, OPTIONS.
    		"url": "<String>", //Test Case URL
    		"params": [
    			{
    				"id": "<String>", //Parameter Id
    				"name": "<String>", //Parameter name
    				"method": "String", //Parameter type, value can be one of query, body, path.
    				"value": "<String>", //Parameter value
    				"description": "<String>", //Parameter description
    				"paramType": "String" //Parameter data type, value can be one of string, number, boolean, object.
    			},
    			...
    		],
    		"headers": [
    			{
    				"id": "<String>", //Header Id
    				"name": "<String>", //Header name
    				"value": "<String>" //Header value
    			},
    			...
    		],
    		"rawBody": "<String>" //Raw body if specified, in string format
    	},
    	"execution": {
    		"request": {
    			"url": "<String>", //Test Case execution URL with query params
    			"method": "<String>", //Test Case request method, value can be one of GET, POST, PUT, PATCH, DELETE, OPTIONS.
    			"headers": "<String>", //JSON String containing request header names as keys and header values as values of those keys.
    			"body": "<String>" //Request body in string form
    		},
    		"response": {
    			"statusCode": "<Number>", //Response Status Code
    			"headers": "<String>", //JSON String containing response header names as keys and header values as values of those keys.
    			"body": "<String>" //Response body in string form
    		}
    	},
    	"result": {
    		"isExecuted": "<Boolean>", //Flag whether the test case is executed or not in the current test run.
    		"isPassed": "<Boolean>", //Flag whether the test case is passed or not in the current test run.
    		"isRunnable": "<Boolean>", //Flag whether the test case is runnable or not in the current test run.
    		"resultLink": "<String>" //Link to view the result of this test case in the current test run.
    	}
    }

    Note: This hook also receives the variable $tr (Format is same as Pre Test Run hook Data Format).

...