Contact Free trial Login

Get Started Writing Tests

A test suite is composed of the following elements:

  • A directory that contains a main file named bat.yaml that describes the structure of your test suite

  • A config folder that contains files in which you specify variables

  • One or more folders in which you write tests

Tests are written in the BDD Test-Writing syntax and use the .dwl file extension.

The best way to learn how to write tests in this syntax is to use the BAT Playground, a web application that runs modifiable tests on the Deck of Cards API by default. There are nine different tests that are presented in ascending order of complexity. Each test includes comments to show you what the code does.

You start the BAT Playground by going to the following URL: https://anypoint.mulesoft.com/apitesting/playground/.

After you learn the basics of writing tests from the examples in the BAT Playground, you can refer to the BDD Test-Writing Syntax Reference, which can help you go beyond the basics.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub