venom icon indicating copy to clipboard operation
venom copied to clipboard

(suggestion) replace "{{ }}" with "$( )", "${ }" or any yaml-friendly marker

Open cdevienne opened this issue 1 year ago • 0 comments

Using {{ and }} for variable substitution makes it cumbersome to generate venom scripts with yaml library, when we need to make data substitutions (as opposed to string substitutions).

The following script is a valid venom script but cannot be written or parsed by a standard yaml library:

vars:
  credentials:
    username: xxx
    password: yyy
testcases:
- name: login
  steps:
    - type: myexecutor
      credentials: {{ .credentials }}

In this particular case, the variable cannot be enclosed in " because the executor needs a map, not a string.

Using an alternative marker, in addition to {{}} (if not in replacement of) would make things a lots smoother for programs that manipulates venom scripts.

cdevienne avatar Feb 21 '24 13:02 cdevienne