Skip to content

Ability to write variables in test file #748

@ashishpatel1992

Description

@ashishpatel1992

Looking forward for something like
where users are able to declare their own variables inside tavern file. I know there is a way to use !include and declare but I want it to be specific to this test case file.

test_name: Sample Test Name
variables:
  common_url: "https://sample.com/{group_endpoint}"

stages:
  - name: List specific group with id
    request:
        url: "{common_url}/id/abc1"
        method: GET
    response:
        status_code: 200

  - name: List specific group with id2
    request:
        url: "{common_url}/id/abc2"
        method: GET
    response:
        status_code: 200

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions