Comparison

Testlum has a function of comparison.

This function implies comparing the expected result with the actual one after the step is completed.

To compare test results, the following files are used:

  • expected - expected test result
  • actual - actual test result

Having the structure expected_1.json, actual_1.json - the number is put, depending on the step of the test scenario.

  • Presence of expected file is a mandatory parameter for HTTP, SQL and noSQL requests.

The principle of operation on the example of postgres:

XML
Copy

Steps

  • Make a request specifying the expected file (with the scenario step number, in this case expected_11.json).
  • Create a file in the scenario folder with the name specified inside the postgres request (in this case, expected_11.json).
  • Leave generated expected_11.json empty.
  • Run test scenario.
  • After running the test scenario and executing this query, comparison will automatically generate an actual_file with the scenario step number, see an empty file expected_11.json and compare it with the query result received in actual_11.json. If the result of the request is satisfactory to the user, it will transfer all data from the actual file to the expected file, for further comparison and successful completion of the test scenario.
  • comparison - will generate the actual file only if the content between actual and expected does not match.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
On This Page
ComparisonSteps