Forum Discussion

Dchen's avatar
Dchen
Occasional Contributor
2 years ago

I would like to get results back from a powershell script with a Groovy teststep in readyApi

In readyapi groovy test step:

def runPowerShell = "powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command \"C:\\temp\\test.ps1".execute()
runPowerShell.waitFor()

 

In the powershell script test.ps1:

$SASToken = "test"

return $SASToken 

echo $SASToken 

 

Test step Result in Readyapi:

result = 1

I would like to get the value "test"

No RepliesBe the first to reply