suite: name: "name_of_suite_of_tests" files:
Start a New Test Suite
Starting a new test suite for testing API endpoints involves only a few steps to create and populate with initial lines a file named
bat.yaml. This file explains the structure of your test suite to the BAT CLI.
Create a directory in your computer’s filesystem.
Change to the new directory.
Create a file named
Open the file for editing.
Add these five lines to specify the name of the test suite:
Specify the name that you want to give the suite of tests that you plan to write.
Save the file.
Create a folder in your directory in which to create tests.
You can give the folder any name.
Optional: Create a folder named
In this folder, you create configuration files to use for your tests. Configuration files contain variables that are injected to tests at runtime. You can refer to those variables in tests by using the
For example, to refer to a variable named
urlin a configuration file, you use this reference: '$(config.url)'. When you run the
batcommand to execute a test, you specify the configuration file to use by including the
file.dwlis the path and name of the configuration file in the folder for your test suite.