Forum Discussion

jd_oa_ons700's avatar
jd_oa_ons700
New Member
3 years ago

SoapUI Script assertion log not showing anything

added log.info in a script assertion but no logs appearing

 

7 Replies

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

    Hi, in that window, you have to click the 'go' button to run that step in isolation.

     

    When you run the test as a whole, the message should appear in the logs of the main window.

     

    If it still doesn't appear, then revisit the script.  There might be an issue with the preceding lines.  I'd suggest commenting out the other lines and then trying.  Sometime's SoapUI/ReadyAPI doesn't throw an error that would usually think, "ah, script issue".

    • dahliaholman's avatar
      dahliaholman
      New Member

      ChrisAdams wrote: Wordle

      Hi, in that window, you have to click the 'go' button to run that step in isolation.

       

      When you run the test as a whole, the message should appear in the logs of the main window.

       

      If it still doesn't appear, then revisit the script.  There might be an issue with the preceding lines.  I'd suggest commenting out the other lines and then trying.  Sometime's SoapUI/ReadyAPI doesn't throw an error that would usually think, "ah, script issue".


      I understand. Thank you for your answer.

    • gayathri0302's avatar
      gayathri0302
      Occasional Visitor

      Hi ChrisAdams, 

       

      I am trying with log.info "test" statement alone. Still log not displaying in Script assertion log view section. Any other option I need to enable? 

       

      I am facing this issue after 5.7.0 upgrade 

       

       

      • TNeuschwanger's avatar
        TNeuschwanger
        Champion Level 2

        Hello gayathri0302 and/or jd_oa_ons700 

         

        Just to confirm...

        If you right-click anywhere in the log display area, the "Enable" item is ticked -- yes?

         

        When not enabled (not ticked), the log information will not be displayed within the log output area.

         

        Regards,

        Todd

         

         

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

    Hi,

    I'm not sure what the cause of your issue is here, maybe an email to SmartBear themselves would help.

    I'm using 5.6.0.  Below is a script assertion for a basic get call to bbc.co.uk.

    I first wondered whether your issue is because you don't have parentheses around the message or a semi-colon, so I added three statements.

     

    If I click the Green Go button to test, I get....

     

    If I enable the Script Log window for SoapUI (see tabbed edges at bottom of screen) and run the test, I get the log messages...

     

    EDIT - For completeness, I've just installed 5.7.0 and my test with logging still works...

     

     

  • I get the same problem in 5.7.0

    When I'm in the script editor and test run my script assertion the log outputs do not work. It did output 4 times in one script and then it just stopped and in a new script it doesn't work at all. Did the same test as gayathri0302 with just the log output and nothing happens and I have "Enable" checked in the log output window.

    If run the test with that assertion I don't get anything in the Script log in the bottom of my window either.

     

    • TNeuschwanger's avatar
      TNeuschwanger
      Champion Level 2

      Hello BeatriceK 

       

      After installing latest version (5.7.0), I cannot see the log output in the "Script Assertion" window (black circled in pic), but I do see log output in SoapUI's application "Script log" tab at the bottom of the screen (red circled in pic).  So, for me that is no big deal since I can see log output somewhere.  A fraction of an inconvenience traded for the usage of a free enterprise product is something I can tolerate every day.  I am just going to guess, SoapUI developers probably have bigger issues to attend to than missing logging in a window.

       

      Whenever something seems to not work, I try to find a work around...  My workaround for this issue would be to abandon the "Script Assertion" usage and just go to a groovy script test step to make an assertion.  You are already "scripting" so to speak, so you could use a feature that does not have an issue with logging in the user interface.