Skip to content

test specific variables #589

Description

@amlwwalker

I am aware I can set variables at the top of the yaml config file however is it possible to set a variable within a specific test that can then be used in that test?

For instance:

testcases:
  - name: testing against type1 of request
    steps:
      - type: exec
        script: ./script.sh -n test1 -d ./test1 -s "{{.SHARED_DIR}}" -c test1/upshot.yaml -o test1/out -r test1/requests.csv
        info:  ./script.sh -n test1 -d ./test1 -s "{{.SHARED_DIR}}" -c test1/upshot.yaml -o test1/out -r test1/requests.csv
        assertions:
          - result.systemout ShouldContainSubstring test1
          - result.systemout ShouldContainSubstring test1---pass

in this case - I would like to have testt1 as a variable so I can change its name in one location - however I want it scoped to this test. Is that possible?

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