MartyBurns
10 years agoOccasional Contributor
Log Output from script not appearing in script log
I have a groovy script that produces content in the Log Output pane of the script but it doesnt appear in the script log below. Sounds like a simple error I am making. Any help?
def project = testRunner.testCase.testSuite.project
def tc= testRunner.testCase.testSuite.project.testSuites['Library'].testCases['RunCommand'];
def sslhost = project.getPropertyValue( "authorizationServer" );
def opensslCmd = project.getPropertyValue("opensslCmd");
sslport="443";
tc.setPropertyValue("path",".");
tc.setPropertyValue("timeout","2");
tc.setPropertyValue("cmd", "echo Q | " + opensslCmd + " " + "s_client -connect " + sslhost + ":" + sslport);
tc.run(new com.eviware.soapui.support.types.StringToObjectMap(), false);
String strResult = tc.getPropertyValue("stdout");
//log.info tc.getPropertyValue("cmd");
//log.info strResult;
//strResult.eachLine {
// line -> log.info(line);
//};
if(strResult.contains("Protocol : TLSv1.2")){
log.info("TLS 1.2 implemented");
assert true;
} else {
testRunner.fail( "TLS 1.2 not implemented" );
}