Forum Discussion
nbathija
13 years agoOccasional Contributor
I am positive.The same test case works very well on Soapui 3.6.1 version.
I have pasted the shell script too which I am invoking from groovy script
Here is test case:
import java.io.ByteArrayOutputStream
def endpoint = "abc.eng.yousendit.com"
def ncCommand= "sudo sh memcachetest.sh " + endpoint
def process = ncCommand.execute()
ByteArrayOutputStream outStream = new ByteArrayOutputStream()
process.waitForProcessOutput(outStream, new ByteArrayOutputStream())
def output = outStream.toString().eachLine{line -> log.info line }
assert output != null, "Unable to connect to Memcache server -> [" + endpoint + " ]"
Shell script:
#!/bin/sh
sudo touch 'result.txt'
echo 'stats' | nc $1 11211 > result.txt
head -1 result.txt
sudo rm -rf result.txt
I have pasted the shell script too which I am invoking from groovy script
Here is test case:
import java.io.ByteArrayOutputStream
def endpoint = "abc.eng.yousendit.com"
def ncCommand= "sudo sh memcachetest.sh " + endpoint
def process = ncCommand.execute()
ByteArrayOutputStream outStream = new ByteArrayOutputStream()
process.waitForProcessOutput(outStream, new ByteArrayOutputStream())
def output = outStream.toString().eachLine{line -> log.info line }
assert output != null, "Unable to connect to Memcache server -> [" + endpoint + " ]"
Shell script:
#!/bin/sh
sudo touch 'result.txt'
echo 'stats' | nc $1 11211 > result.txt
head -1 result.txt
sudo rm -rf result.txt
Related Content
- 4 years agoivanko
- 5 years agoVijayManda