Testlum Structure - TestlumFramework/Testlum GitHub Wiki
To start working with Testlum, you need to create a directory with your project's resources which will contain the main folders of your directory and global-config.xml
file with global configuration settings for your project.
As Testlum requires the presence of mandatory folders that must be in the structure of your resources, these folders will contain the data for testing, and the test scenarios themselves.
scenarios
config
data
locators
report
Scenarios
Testlum uses a simple and powerful approach:
β
Each test scenario is stored as a separate scenario.xml
file.
This structure ensures better organization, easy maintenance, and scalability of your test cases.
scenarios
- Folder for creating and storing test scenarios.main-test-resources-folder/ βββscenarios/ βββββ registration/ β βββ scenario.xml βββββ login/ β βββ scenario.xml
One test scenario = one
scenario.xml
file
> Each logical test case should have its own XML file.Use clear and descriptive folder names
> Organize scenarios based on business modules or features (e.g.,registration
,login
,checkout
).Avoid mixing unrelated scenarios in the same folder
> Keep your folders clean and modular to make scaling your test suite easier.Consistent naming
> Use lowercase, hyphens or underscores for folder names if possible (e.g.,user-management
,payment-processing
).
Following this structure ensures that your test framework remains:
- Easy to navigate β
- Easy to extend β
- Easy for new team members to understand β
Stay structured and your automation will scale with no pain! π
Config
The
config
folder contains environment-specific settings. Each environment (like dev or prod) has its own integration.xml and ui.xml files for flexible configuration.main-test-resources-folder/ βββconfig/ βββββ dev/ β βββ integration.xml β βββ ui.xml βββββ prod/ β βββ integration.xml β βββ ui.xml
Data
The
data
is root folder for test data (used to store datasets and files for migration, in various formats).
main-test-resources-folder/ βββdata/ βββββ variations/ β βββ test.csv βββββ patches/ β βββ initial-db-patch.sql βββββ javascript/ β βββ initiate-alert.js βββββ credentials/ β βββ admin-credentials.json
Inside this, you also have the option to separate your test files into separate folders for a readable structure and ease of use.
When you first start Testlum, inside the "data" folder, we left the default folder "variations" for storing test data, which you can change in the future.
You can create folders inside data:
- credentials
- javascript
- patches
- variations
credentials
- folder for storing system user data for authorization within the test scenario.{ "password": "Qwerty12@", "username": "[email protected]" }
javascript
- folder to store JS files forjavascript
command that uses these files.const link = document.querySelector('a[href="/tables"]'); link.click();
patches
- folder to store datasets for testing (sql
,csv
,javascript
,xlsx
,partiql
,bson
,shell
and others).INSERT INTO t_role (id, name, description, enabled) VALUES (1, 'ADMIN', 'Owner company', true), (2, 'USER', 'Admin company', true), (3, 'SUPERUSER', 'Lawyer company', true);
variations
- folder in which a data set is created and stored for interacting with the commands in test scenarios (in thecsv
format).firstName,lastName John,Jarlet John,Doe Marcelo,Encasa
Locators
locators
- folder, where element locators are stored (for interaction with WEB).main-test-resources-folder/ βββlocators/ βββββ component/ β βββ header.xml β βββ footer.xml βββββ pages/ β βββ profile.xml β βββ registration.xml
Inside of locators folder should be such folders as:
component
- a folder for storing locators that refers to the footer and header elements of the pages. (It is recommended to separate these locators for structuredness and ease of use).pages
- a folder in which the locators of a particular page are stored.
Report
report
- folder in which the test report will be generated and divided by the date where the test pass report will be generated.main-test-resources-folder/ βββreport/ βββββ 26-04-2025/ β βββ testlum-26-04-2025T10.00.00.html