Forum Discussion

MartyBurns's avatar
MartyBurns
Occasional Contributor
10 years ago

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" );
}


3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    What out you are expecting? You mean to print the console output remote server in the log?
  • MartyBurns's avatar
    MartyBurns
    Occasional Contributor
    I expected that anything put to the "Log Output" pane in the script editor/runner would appear in overall "script log". This is normally the case but it seems not only. I want all content that I write using log.info to appear in "script log".

    Any ideas?
  • nmrao's avatar
    nmrao
    Champion Level 3
    What I know is loggin is done in soapui.log, soapui-error.log. Yes, though not sure when does logging happen in script.log, but have seen.
    May you may also check soapui-log4j.xml file if you want to change if any.