Forum Discussion
Question is neither related ReadyAPI nor groovy.
Any ways, one could pass the arguments in the same way as it is called from the command line.
- doubtsreadyapi5 years agoContributor
Hi nmrao
Thanks for the info.. This is related to the ReadyAPi, from Ready APi i am able to run the python script, where as the python script contains some arguments, so for those arguments i have to pass the values from readyApi, So this can be achieved from Command line arguments?
So the below argument values can be passed through command line, Please suggest.
env =sys.argv[0] (Must pick the environment depending upon the environment we selected in readyAPi)
id = sys.argv[1]
json_path = sys.argv[2](Must pick the response of the previous request in readyapi)
save_file_path = sys.argv[3](Must pick the file path)- nmrao5 years agoChampion Level 3Please check this post
https://stackoverflow.com/questions/17544307/how-do-i-run-python-script-using-arguments-in-windows-command-line - nmrao5 years agoChampion Level 3I mean the same "the python script contains some arguments,"
You can google how you can pass arguments while calling a python script from command line.
Accordingly use same command from your groovy. - HimanshuTayal5 years agoCommunity Hero
doubtsreadyapi : What i would suggest is store the desired values in .txt file either in key-value pair or normal text and read that file in your python script.
Hope it will help.
- doubtsreadyapi5 years agoContributor
Thanks you. Where as the values are dynamic. like one of the argument is to pass the response of the previous request. and one more argument is environment depending upon the enviornment we run the argument must change.
Related Content
- 2 years ago
- 3 years ago
- 4 years ago
- 9 years ago
Recent Discussions
- 5 days ago