Forum Discussion
- nmraoChampion Level 3Please show how the python script is run or the script which is being used.
- doubtsreadyapiContributor
Below is the groovy script i am using to execute the python script from ReadyApi
def table_count = ["python" , "C:/Pythonscripts/test.py", host,db_password,db_id]
def process = new ProcessBuilder(table_count).redirectErrorStream(true).start()
process.inputStream.eachLine {
log.warn(it)
}
process.waitFor()
return process.exitValue()In the groovy response i got
Thu Jun 18 03:20:19 EDT 2020: WARN: 44
So i must put an assertion that 0 or null should not come in the response.
Thanks
- nmraoChampion Level 3what is the value of "process.exitValue()"?
Using that you can have the assertion.
Related Content
- 9 years ago
- 8 years ago
- 5 years ago
Recent Discussions
- 19 days ago