Skip to content

Helper Actions

Helper Actions are auxiliar actions to help on script creation

Actions

helper.open_yaml_config

Load YAML file and returns it's values as variables to be used on automation process.

Parameters:

file_path - path to YAML file to be used as config

Returns:

yaml - returns the value of yaml config as JSON like result

Usage Example

If you have a yaml file with these configs:

config.yaml
user: Test-User
pass: My-Pass-1234
sendMail:
- [email protected]
- [email protected]

YAML config values could be accessed, like this:

script.mvn
helper.open_yaml_config("config.yaml")
prompt.alert('User: ' + ($yaml)['user'])
prompt.alert('Pass: ' + ($yaml)['pass'])

for send_to in ($yaml)['sendMail']:
    prompt.alert('Send To: ' + send_to)

helper.set_process_var

Creates or sets a value to a Marvin Var.

Parameters:

name - Name of the var to create or update.

value - Value to be setted on Marvin Var.

Returns:

name - var with the given value