Your first test case
If you ran the Quick start, you probably noticed that a Lila test is just a YAML file with human readable steps.
The test is defined using steps. Each step has an action and one or more verifications.
For example:
# The action is to go to a page, with just one verification
- goto: https://google.com
verify: there is a main search bar
# The action is to click on a button, with multiple verifications
- click: the login button
verify:
- there is a login form to enter username and password
- social logins are available
Step types
Each step can be:
goto
: to navigate to a pageclick
: to click on an elementinput
: to type text in an input fieldpick
: to select an option from a dropdown
info
More steps will be added in the future.
tip
For more details about the step instructions, read the Instructions section
Writing the test
Just define the steps in a YAML file. Additionally, you can add tags to group tests.
my-test.yaml
tags:
- foo
- bar
steps:
- goto: https://google.com
verify: there is a main search bar
- input: in the search bar 'Lila'
...
Run your test
Use the Lila CLI to run the test. If you haven't installed it yet, follow the Installation guide.
LILA_API_KEY=<api-key> lila run my-test.yaml
Lila will run the test and provide a report.