pyresttest
                                
                                
                                
                                    pyresttest copied to clipboard
                            
                            
                            
                        Getting variable binds from a file
Is it possible to get variable_binds from a file?
There seems to be a command line argument for this (--vars) but there is no documentation on how the binding works in the test configurations, or what exact format is expected in the YAML for variables passed to --vars. Is this ready for use, or still in progress? This is exactly what is needed for having one set of test configurations that can be used easily across multiple deployment stages (dev, staging, production).
It's apparently supposed to be a YAML dictionary, but nothing I've tried is accepted. It would be nice with an example using this.
I need to pass some dynamic variables to the YAML file through cli. I do not understand how to do it.
Looking at the source it seems to use yaml.safe_load() and so you'd pass it a string, not a file?
I'm using something like this, where $adminpassword is set as an environment variable.
--vars="{\"adminpassword\": \"$adminpassword\"}"