About Testlum
Getting Started
UI Testing
Api Testing
Database Testing
Services Testing
Additional Materials
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Comparison
Copy Markdown
Open in ChatGPT
Open in Claude
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 resultactual- 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
expectedfile is a mandatory parameter for HTTP, SQL and noSQL requests.
The principle of operation on the example of postgres:
XML
<postgres comment="Check successfully adding Product to shopping cart" alias="Shop" file="expected_11.json"> <query> SELECT shp_cart_id, customer_id, shp_cart_code FROM shopping_cart WHERE merchant_id = 1 </query></postgres>Steps
- Make a request specifying the
expectedfile (with the scenario step number, in this case expected_11.json).- Create a file in the scenario folder with the name specified inside the
postgresrequest (in this case, expected_11.json).- Leave generated expected_11.json empty.
- Run test scenario.
- After running the test scenario and executing this query,
comparisonwill automatically generate anactual_filewith the scenario step number, see an empty fileexpected_11.jsonand 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 theactualfile to theexpectedfile, for further comparison and successful completion of the test scenario.
comparison- will generate the actual file only if the content betweenactualandexpecteddoes not match.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Next to read:
Regular ExpressionsCopyright © Knubisoft
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message