Skip to main content

A CLI for lila.dev

Project description

PyPI version Documentation Status CI Twitter Discord GitHub Repo stars

Lila is the best testing framework for fast moving teams developing webapps.

Lila CLI is a powerful tool for running end-to-end tests written in human-readable plain text using YAML files. It simplifies the testing process by allowing anyone in the team to write tests in a natural, easy-to-understand format.

No coding required.

How does it work?

Lila runs your app in a local browser with Playwright and uses an LLM-powered engine to guide the CLI run the high level instructions.

Why Lila?

  • No coding required.
  • Self healing tests, does not rely on low level implementation.
  • Anyone in the team can implement tests.
  • Integrates natively with Playwright storage states.
  • Runs browser locally, making it ideal for localdev or staging environments.

Test example

steps:
  - goto: https://www.google.com/maps

  - input: Empire State on the main search bar
    verify: a dropdown with suggestions appears

  - click: on the first suggestion from the dropdown
    verify: the map shows the Empire State Building in NY

For more information on how to build tests, checkout the guides

For test examples, Lila runs daily a suite of tests over public URLs. Check them out here

Getting started

Create a free account

You will need a free account to try Lila. Create your free account at https://lila.dev

Installation

Lila CLI requires Python 3.11 or higher. Install it using pip:

pip install lilacli

Install Chromium web drivers for Playwright

playwright install chromium

Quick Start

Initialize a new Lila test project:

lila init

This command creates a template structure with example tests to help you get started.

Running Tests

Fetch your LILA_API_KEY from the app and run your tests using the run command:

LILA_API_KEY=<your-api-key> lila run <folder/file>

Command Line Options

  • --browser-state: Initialize the browser with a Playwright JSON storage session
  • --tags: Filter tests by specified comma-separated tags
  • --exclude-tags: Filter out tests by specified comma-separated tags
  • --output-dir: Specify the output directory for the browser states
  • --config: Point to the lila.toml config file if not using the root location
  • --headless: If present, does not open browser
  • --debug: Displays debug logs

Example runs

lila run tests/
lila run tests/one-specific-test.yaml
lila run tests/ --tags foo,bar
lila run tests/subtests --exclude-tags baz
lila run tests/user-login.yaml
lila run tests/user.yaml --browser-state tests/user-login.json

Configuring Lila

Configuration can be set in lila.toml file. For the full spec, checkout the documentation

Configuration example

[browser]
type = "chromium"
width = 1536
height = 1152

[runtime]
fail_fast = true
output_dir = "lila-output"
concurrent_workers = 4
server_url = 'https://app.lila.dev'

Documentation

For comprehensive documentation, visit docs.lila.dev.

Examples

Find a variety of test examples in our examples repository, showcasing different testing scenarios and best practices.

Contact

Reach out at info@lila.dev

Join our Discord server

Follow us at Twitter - X

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lilacli-0.1.10.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lilacli-0.1.10-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file lilacli-0.1.10.tar.gz.

File metadata

  • Download URL: lilacli-0.1.10.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for lilacli-0.1.10.tar.gz
Algorithm Hash digest
SHA256 a04488f276fef6eb6ac7383ede063b1fae59720ea7e08734959c80c9811a4b83
MD5 d964d494ad37f4b25f36b686a3b911d7
BLAKE2b-256 46aae84367adb9c76bcd5f506aa175992dabe1f3f1b6546cc61bedeb261c7eee

See more details on using hashes here.

File details

Details for the file lilacli-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: lilacli-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for lilacli-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2b5f855ec0c28681fe0456170d05f939c6773b03f5f73fae889d1becb64eb50f
MD5 0cef2eb78f773980661a0085d340834c
BLAKE2b-256 163803183aef1e7eb1f04b0592c6850102dc986b4254be1d3d76ddb1a1e3dc4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page