✍️API Test Report

Overview

This document aims to align the test case execution report with the corresponding API template used in scriptless automation. It will detail how each element of the API call template is reflected and validated in the execution report.

Structure of the API Template

The API template is a predefined CSV format that outlines the parameters and expected outcomes for an API call. Below is the template structure:

DEPENDANT_TEST_CASE,NONE,
END_POINT,https://api-generator.retool.com/7kbSLy/data,
METHOD,POST,
PARAMS:KEY,NONE,
PARAMS:VALUE,NONE,
AUTH:KEY,NONE,
AUTH:VALUE,NONE,
HEADERS:KEY,Content-Type,
HEADERS:VALUE,application/json,
BODY:KEY,JsonRepository,name
BODY:VALUE,test,Custom:CustomClass:body
RESPONSE:CODE,201,
RESPONSE:JSON_PATH,'Column 1',id
RESPONSE:EXPECTED_VALUE,PrecisionTestAutomation1,NONE
RESPONSE:STORE_VALUE,Name,ID

Alignment with the Execution Report

Each parameter in the API template corresponds to an entry in the test case execution report, which logs the process and outcomes as follows:

Info Entries

  • END_POINT: The report logs the API endpoint URL used for the POST request.

  • METHOD: The HTTP method (POST) is recorded.

  • HEADERS: The Content-Type header set to application/json is listed.

  • BODY: The source (JsonRepository) and the key for the dynamic body content are noted.

The PARAMS:KEY, PARAMS:VALUE, AUTH:KEY, and AUTH:VALUE are not used in this test case, so they are not logged in the report, aligning with the template where their values are set to NONE. If these parameters are used then they added in INFO entires

Validation Entries

  • RESPONSE:CODE: The report validates that the HTTP status code received (201) matches the expected status code.

  • RESPONSE:JSON_PATH and RESPONSE:EXPECTED_VALUE: The report verifies that the value for Column 1 matches the expected value PrecisionTestAutomation1.

The result of each validation is marked as 'Pass' if the actual outcome meets the expectation. Otherwise, it would be marked as 'Fail'.

Conclusion

The test case execution report serves as a direct reflection of the API call template, documenting each significant step and validating the outcomes against the expected values. This report provides a transparent and detailed account of the test execution, allowing users to verify the integrity of the API call and its compliance with the defined requirements. The alignment between the template and the report ensures a clear and concise representation of the test case, facilitating easy review and troubleshooting.

Last updated

Was this helpful?