Forum Discussion

PramodYadav's avatar
PramodYadav
Contributor
6 years ago

Script containing logMonitor.getLogArea( "script log" ) fails when SoapUI is run from Jenkins or Cmd

Background: To capture test results in a data driven SoapUI groovy script based framework, we are storing the log.info steps in each script using " def logArea = com.eviware.soapui.SoapUI.logMonitor.getLogArea( "script log" );  " . This way we could store all scripts run results (taken from log.info steps). All this works perfectly fine for us and we are using this from more than a year, so no problems there.

Problem statement : Recently after reaching a stable state in project, we thought of scheduling daily health check runs using Jenkins. For this, when we integrated SoapUI with Jenkins, I found that all the steps that involve getlogArea were failing. And thus, although, I can run all scripts, which doesnt involve this step but every step that involves taking the results into a log file fails. I did some homework and searched internet to see if I can find a solution for this but couldn't find one where it solves this issue. Note that, also running soapUI direclty from command line, also have same issues.

Any pointers, solutions, workarounds are most welcome.

Thanking you in anticipation. 

6 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    I am not sure if it is really require to dependent on the logs. Why can't the test result / status be used instead?
    • PramodYadav's avatar
      PramodYadav
      Contributor

      Hello nmrao , Thanks for your reply. I am using the script and test status also and it works perfectly well to show what failed. But since we have a framework where the inputs from one script decide what flow will be taken in other scripts, often its the log.infos from scripts that helps us debug and troubleshoot. Also these log.infos act as test proofs of all the things we have tested (in case if we have issues in production and want to narrow down the root cause of issue). Hence the requirement. Are you aware of anything that I can use here to get these log.infos (we are writing them into text files and thats where the scripts ar failing when run from jenkins). Thanks again for taking out your time to help others. I appreciate it :).

      • nmrao's avatar
        nmrao
        Champion Level 3

        If I were you, I would depend on the assertions rather than the logs.

         

        Of course, the logs are useful if you want to know what happened at certain point post the execution of tests. But, can't use the logs at run time to make decisions.

         

        In case of Data Driven tests, assuming that the data in a file, even if  data of particular row / record is failed, the retest has to be happened for entire data set, and hope you agree on this.