Testlum Structure - TestlumFramework/Testlum GitHub Wiki

Testlum Structure

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

πŸ“Œ Important Recommendations

  • 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 for javascript 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 the csv 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
⚠️ **GitHub.com Fallback** ⚠️