pyresttest icon indicating copy to clipboard operation
pyresttest copied to clipboard

is there any way to use base url(which was passed from terminal) in middle of test set url

Open mravitej opened this issue 7 years ago • 1 comments

I need to use base_url passing from the terminal in the middle of below test set URLs.

$terminal: pyresttest company.com file_name.yaml

in the place of $base_url i need to use company.com which i was mentioned in the terminal. is there any solution for this or can we run tests without passing URL from the terminal? So, I can hard code the URL in test sets

  • test:
    • name: "Login"
    • url: {'template': "https://user-$base_url/api/person"}
  • test:
    • name: "devices"
    • url: {'template': "https://device-$base_url/api/device"}

mravitej avatar May 31 '17 10:05 mravitej

you can hard code it, like: pyresttest https://urlvaluefromterminal.com web/web_run_all.yaml test1: - url: {'template': "/security/api/token"} <----- here will be urlvaluefromterminal.com

test2: - url: {'template': "https://$urlvalue2.com/security/api/token"}

mvitiuk avatar May 31 '17 11:05 mvitiuk