Testlum Scenario - TestlumFramework/Testlum GitHub Wiki
To move forward, make sure you familiarize yourself with the Testlum Structure.
Every
scenario.xml
has based initial structure.<scenario> <overview> <description>My first Testlum Test</description> <name>Initial Test</name> <developer>Testlum User</developer> <jira>TESTLUM_1</jira> <link>https://testlum.com/</link> </overview> <settings onlyThis="false" active="true" showInRecorder="true" truncateStorages="true"> <variations>test.csv</variations> <tags>testlum</tags> </settings> </scenario>And after
settings
section you can add needed commands.
Element | Type | Required | Default | Description |
---|---|---|---|---|
description |
String | true | - | A short text describing the purpose or idea of the scenario |
name |
String | true | - | A custom internal name for the scenario |
developer |
String | false | - | Name of the developer or author who created the scenario |
jira |
String | false | - | Link to a related JIRA ticket for tracking the scenario's requirement or bug |
link |
String | false | - | External link (for example, a documentation or feature spec link) |
Element | Type | Required | Default | Description |
---|---|---|---|---|
variations |
String | false | - | Check Variations page for detailed explanation |
tags |
String | true | - | Check Scenario Tags page for detailed explanation |
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
onlyThis |
Boolean | false | false |
If true , only this scenario (or multiple scenarios with onlyThis ) will run |
active |
Boolean | false | true |
Indicates whether the scenario should be collected and executed |
showInRecorder |
Boolean | false | false |
Controls whether the scenario is visible in the Recorder tool |
truncateStorages |
Boolean | false | false |
If true , clears all storage before running the scenario |
If the
run scenarios by tag config
isenabled
, scenarios will be run according to tag groups in alphabetical order of tags, and if multiple tests are related to the same tag, they will also be run in alphabetical order. If there are several tags on one scenario, the first one will be used as a basis.If the
run scenarios by tag config
isdisabled
, all necessary scenarios will be launched alphabetically, as they are in folders.
Before checking scenarios for statuses, Testlum performs a global initialization of all test scenarios for validity.
- Basic Validity Checks
- Check for correct syntax in all files in a directory
- Correct structure of each tag
- Validity of locators and their correct transfer to the scenario
- Validity of variations and their correct transfer to the scenario
- Matching the paths and names of transferred files
- Check for required files and folders to run test scenarios
All of the above steps are processed and initialized before each test scenario run. If an error is detected, the scenarios will not be launched, with the output of the corresponding error and indication of: directory, path, file name, and the nature of the error.
Pros:
- The user is always aware of the validity of their test scenarios and test data.
- Elimination of bugs on early stages.
- Tests’ stability.