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:

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

Not all these directories need to be created - for example, if you don’t have any reusable JavaScript files in your test suite, you don’t need the scripts directory. Inside each one of these dedicated directories, you can organize things is subdirectories, as required by your test automation project.

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

Directory

Description

custom

Stores test assets that don’t fit into any one particular category.

data

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

data-env

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

images

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

macros

Stores macro actions.

scripts

Stores reusable JavaScript files tha can be referenced in multiple tests using the include syntax.

tests

Stores test files.