YAML Test Management

Revyl allows you to export and modify your tests programmatically using YAML configuration files. While creating new tests from scratch using YAML is not yet supported (coming soon!), you can export existing tests, modify them, and update them through our API endpoints.

Authentication

All API requests require authentication using your Revyl API key.

VariableRequiredDescription
REVYL_API_KEYYesAPI key for authentication. Get this from your settings page

API Endpoints

Export Test Configuration

Export an existing test’s configuration as a YAML file.

curl -X GET "http://localhost:8000/api/tests/{testId}/export-yaml" \
  -H "Authorization: Bearer $REVYL_API_KEY" \
  --output test_config.yaml

Update Test Configuration

Update an existing test using a modified YAML configuration file.

curl -X POST "http://localhost:8000/api/tests/{testId}/update-yaml" \
  -H "Authorization: Bearer $REVYL_API_KEY" \
  -F "yaml_file=@test_config_updated.yaml"

Create Test From YAML

Create a new test from a provided YAML file. The input YAML should contain the test configuration without any id fields. This endpoint will generate UUID v4 for the test and for each task, insert the test into the database, and return the updated YAML content with generated id fields.

Example Input YAML:

name: Chris' Test Case
platform: Web
link: https://anamhira.ca/
tasks:
  - step_type: tap
    step: Click Me
  - step_type: tap
    step: Type here...

Example Output YAML:

id: 5910ce02-eace-40c8-8779-a8619681f2ac
name: Chris' Test Case
platform: Web
link: https://anamhira.ca/
tasks:
  - id: 991044be-5ecf-4d4d-aff9-645194f5e1b0
    step_type: tap
    step: Click Me
  - id: 9f57bc59-fcb3-466f-89a0-7713f4accdd5
    step_type: tap
    step: Type here...

API Request Example:

curl -X POST "http://localhost:8000/api/tests/from-yaml" \
  -H "Authorization: Bearer $REVYL_API_KEY" \
  -F "yaml_file=@new_test.yaml"

Note: Ensure that the input YAML does not include any id fields; otherwise, the request will be rejected.

Coming Soon

  • YAML templates and schemas

For running tests in CI/CD pipelines, please refer to our Github Actions documentation.