Before you can map test cases, you need to connect your TestRail account to Low Code Automation. This is a one-time setup.
To connect TestRail with Low Code Automation:
Go to the Integrations page, and click + Connect on TestRail card.
In the Connect TestRail using API Key/Password dialog, enter your TestRail host URL, email ID, and API key.
Click Continue to complete authentication.
Your TestRail account is now connected, and you can begin mapping tests to your TestRail cases.
To link TestRail with Low Code Automation:
Open Low Code Automation and record a test.
Click the Configurations tab in your test details view.
Click Map test case IDs under Test details.
In the Map test cases section, select TestRail from the Test management tool dropdown.
Click Connect TestRail.
Select your TestRail project from the dropdown.
Select the test cases you want to map. If required, you can also select the test suite.
Click Map test cases to link the selected cases to your test.
The mapped test cases appear in the configurations panel. Click Save changes.
Alternatively, you can also map test cases from the recorder and follow the same steps as above.
After the mapping, build reports are automatically uploaded to your TestRail account.
Points to remember
Constraints on Projects and Test Suites: For a test, you can only map test cases from a single project. If the project is in multi-suite mode, you need to select one test suite. In this case, you can only map test cases from a single test suite. If you change mandatory fields (projects/suites), existing mapping will be lost.
For migration: If you have mapped test cases in a comma-separated format earlier, you must provide the project IDs and suite IDs after migrating to the Pro plan. This ensures that build results continue to sync.
Results from re-run are not synced to TestRail.
Partial, incomplete, or stopped builds are not synced to TestRail.
To link TestRail with Low-Code Automation:
Open Low Code Automation and record a test.
Click the Map test case IDs button while saving the test.
In the Map test case IDs dialog, select TestRail from the Test management tool menu.
In the Test case IDs field, enter the test case IDs, separated by commas. Click Link test cases.
Alternatively, link the test cases while editing the test. Click the Configurations tab. Under the Map Test Case IDs section, click the Map Test Case IDs button, then repeat Steps 3 and 4.
Enter the name and click Save changes.
Export the test data in XML format
After test execution, go to the Builds section, select the desired build, and click Download.
You can also use the Reports API to download the XML, in addition to using the Download icon.
The XML file will be saved to your system in the following format:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="Sample Test Suite-1" tests="4" failures="2" time="395.5">
<!-- Test Suite Properties -->
<properties>
<property name="Type" value="desktop" />
<property name="Browsers" value="chrome" />
<property name="Local testing" value="On" />
<property name="Environment Host URL" value="https://www.google.com" />
<property name="IP Geolocation" value="Argentina" />
</properties>
<!-- Test Case 1 -->
<testcase name="Sample Test 1 - Apple | Add product to cart and checkout" time="124.6">
<!-- Test Case Properties -->
<properties>
<property name="Resolution" value="1920x1080" />
<property name="Browser" value="chrome" />
<property name="Browser version" value="127.0" />
<property name="Device name" value="" />
<property name="Real device" value="" />
<property name="Scenario name" value="" />
<property name="test_id" value="C52628" />
</properties>
<failure message="One or more steps failed in this test">
Click on "Get a demo" button: Could not find the element on the page. Please raise a bug or re-record the step.
Validate element text equals 'Hello world': Could not find the element on the page. Please raise a bug or re-record the step.
Validate screenshot of logo element: Captured screenshot does not match expected screenshot. Difference between screenshots is 25%, exceeding threshold value of 10%.
</failure>
</testcase>
<!-- Test Case 2 -->
<testcase name="Sample Test 2 - Flipkart | Add product to cart and checkout" time="183.6">
<properties>
<property name="Resolution" value="1366x768" />
<property name="Browser" value="chrome" />
<property name="Browser version" value="127.0" />
<property name="Device name" value="" />
<property name="Real device" value="" />
<property name="Scenario name" value="" />
<property name="test_id" value="C52624" />
</properties>
<failure message="One or more steps failed in this test">
Click on "Get a demo" button: Could not find the element on the page. Please raise a bug or re-record the step.
</failure>
</testcase>
<!-- Test Case 3 -->
<testcase name="Sample Test 3 - Myntra | Add product to cart and checkout" time="84.5">
<properties>
<property name="Resolution" value="1920x1080" />
<property name="Browser" value="chrome" />
<property name="Browser version" value="127.0" />
<property name="Device name" value="" />
<property name="Real device" value="" />
<property name="Scenario name" value="" />
<property name="test_id" value="C52623" />
</properties>
<skipped message="Skipped execution as the build was aborted">
TestSkipped: Build was aborted, hence test was skipped during execution
</skipped>
</testcase>
<!-- Test Case 4 -->
<testcase name="Sample Test 4 - Amazon | Add product to cart and checkout" time="104.9">
<properties>
<property name="Resolution" value="1440x900" />
<property name="Browser" value="chrome" />
<property name="Browser version" value="127.0" />
<property name="Device name" value="" />
<property name="Real device" value="" />
<property name="Scenario name" value="" />
<property name="test_id" value="C52328" />
</properties>
</testcase>
</testsuite>
```