Forum Discussion
JKowalczyk
13 years agoOccasional Contributor
OK, I found a really nasty way of overcoming this issue till its get solved. You can use the "Groovy Script" test step to invoke a foolproof cURL
I found that script here: http://www.linuxquestions.org/questions/programming-9/running-bash-commands-in-groovy-or-beanshell-scripts-721162/
//A string can be executed in the standard java way:
// Create the String
def command = """curl -ki -XPOST https://hostname/blablabla/2012-08-01T12%3A45%3A03%2B0100"""
def proc = command.execute() // Call *execute* on the string
proc.waitFor() // Wait for the command to finish
// Obtain status and output
log.info "return code: ${ proc.exitValue()}"
log.info "stderr: ${proc.err.text}"
log.info "stdout: ${proc.in.text}" // *out* from the external program is *in* for groovy
I found that script here: http://www.linuxquestions.org/questions/programming-9/running-bash-commands-in-groovy-or-beanshell-scripts-721162/
Related Content
- 8 years ago
- 10 years ago
- 2 years ago
- 11 years ago