The test repository

The test repository is a regular directory with a well-known structure, under source control, that stores all the test assets for a test automation project (tests, data files, scripts files, macros, etc.). Each type of test asset is stored in a separate directory, as follows:

├── custom
│   └── ...
├── data
│   └── ...
├── data-env
│   ├── environment1
│   │   └── ...
│   ├── environment2
│   │    └── ...
│   └── ...
├── images
│   └── ...
├── macros
│   └── ...
├── scripts
│   └── ...
└── tests
    └── ...

Not all these directories need to exist in the repo. For example, if you don’t have any reusable JavaScript files in your test suite, you don’t need the scripts directory. The only one that is a must-have is the tests directory. Inside each one of these dedicated directories, you can organize things in subdirectories, as required by your test automation project.

Here’s a summary description of each one of the specialized directories:




Stores test files, written in the YAML syntax. Test files define the workflow and logic of a test.


Stores data files, in YAML or CSV format. Data files can store any type of test data or configuration data and can be referenced from test files using the $data syntax.


Stores data files that are specific to an execution environment. Each subdirectory represents an individual environment.


Stores image files. Images are typically used for visual verification of elements in web pages and mobile apps.


Stores macro actions.


Stores reusable JavaScript files that can be referenced (included) in test files using the include syntax.


Stores test assets that don’t fit into any one particular category (e.g. an XML file you might need for validating an API response).