Forum Discussion

redbank199's avatar
redbank199
New Contributor
10 years ago

TestRunner throwFailureException ...

I got the following exception when I run TestRunner by right clicking on a test case->Launch TestRunner 

in SoapUI GUI.

 

---------------- Response --------------------------
Response Headers: Date : Thu, 12 Mar 2015 16:43:14 GMT
Transfer-Encoding : chunked
#status# : HTTP/1.1 200 OK
Content-Type : text/xml;charset=UTF-8
Server : Apache-Coyote/1.1


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>

//rest of response text deleted for privacy reasons ...
</soapenv:Body>
</soapenv:Envelope>

at com.eviware.soapui.tools.SoapUITestCaseRunner.throwFailureException(SoapUITestCaseRunner.java:535)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:437)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:93)
at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:119)

 

The TestRunner pop up window that showed the progress of running the test showed an errorCode of -1.

As a result, the JUnit-compatible XML file generated by TestRunner did not have any failed messages in it

and the JUnitReport HTML file I created from this XML file showed the test case as "Success".

 

TestRunner's RootFolder did have all the FAILED text files for failed test steps. So it appears that somehow

TestRunner had hard time collecting and parsing  all FAILED text files and generate the report XML file successfully. 

 

However, when the same test case was run via SoapUI's GUI, it run correctly and identified all the failed test steps.

 

I am using SoapUI 5.0.0 in Java 7 environment on Windows 7 Professional. Any help would be appreciated ...

 

  • nmrao's avatar
    nmrao
    Champion Level 3
    1. Can you please provide the details like what are the steps in the test case when you launch test runner?
    2. The stacktrace does not look complete. Can you check it and re-send it. If you do not find much information in it, can you also check soapui.log, soapui-error.log etc for the details?
    3. You might also aware that Smartbear team released new version, i.e., SoapUI Open Source 5.1.2, would you like to give a try and update the post?
    • redbank199's avatar
      redbank199
      New Contributor

      After switching to 5.1.2 version, I no longer see the exception from the same test case.

      However, I am now getting File Not Found exception when launching TestRunner from GUI.

      I tried to install 5.1.2 under C:\Program Files and C:\Program Files (x86) and got same exception. 

      Note that I have replaced project-specific info by XXX for privacy reasons. TestRunner did run to

      the end successfully, even with this exception. Can not write groovy log file ? 

       

      Running SoapUI TestRunner for [XXXTest]
      directory: C:\Program Files\SoapUI-5.1.2\bin\.
      command: cmd.exe /C testrunner.bat -s"XXX TestSuite" -c"Update XXX 2" -r -a -j -f"C:\Developer\Projects\XXX Branch\Test\XXX Test Suite\SoapUIReports" -I "C:\Developer\Projects\XXXBranch\Test\XXX Test Suite\XXX-soapui-project.xml"
      Configuring log4j from [C:\Program Files\SoapUI-5.1.2\bin\soapui-log4j.xml]
      log4j:ERROR setFile(null,true) call failed.
      java.io.FileNotFoundException: global-groovy.log (Access is denied)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(Unknown Source)
      at java.io.FileOutputStream.<init>(Unknown Source)
      at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
      at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
      at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
      at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)
      at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)
      at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)
      at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)
      at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:345)
      at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
      at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)
      at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:604)
      at org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:861)
      at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:88)
      at org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:57)
      at org.apache.log4j.xml.XMLWatchdog.<init>(DOMConfigurator.java:853)
      at org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurator.java:584)
      at com.eviware.soapui.DefaultSoapUICore.initLog(DefaultSoapUICore.java:471)
      at com.eviware.soapui.DefaultSoapUICore.init(DefaultSoapUICore.java:120)
      at com.eviware.soapui.DefaultSoapUICore.<init>(DefaultSoapUICore.java:110)
      at com.eviware.soapui.DefaultSoapUICore.createDefault(DefaultSoapUICore.java:89)
      at com.eviware.soapui.SoapUI.getSettings(SoapUI.java:1469)
      at com.eviware.soapui.analytics.AnalyticsHelper.analyticsDisabled(AnalyticsHelper.java:18)
      at com.eviware.soapui.analytics.AnalyticsHelper.InitializeAnalytics(AnalyticsHelper.java:42)
      at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:117)
      14:22:25,095 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\XXX\soapui-settings.xml]
      14:22:25,149 INFO [HttpClientSupport$Helper] Initializing KeyStore
      SoapUI 5.1.2 TestCase Runner
      14:22:29,852 INFO [WsdlProject] Loaded project from [file:/C:/Developer/Projects/XXXBranch/Test/XXXTest%20Suite/XXXTest-soapui-project.xml]

      • jrahman's avatar
        jrahman
        Contributor

        I have same problem.

         

        I am using SoapUI 5.2.1, test is being run by calling testrunner.bat using Groovy scripts.

         

        Here is my logs:

        log4j:ERROR setFile(null,true) call failed.
        java.io.FileNotFoundException: global-groovy.log (Access is denied)
        	at java.io.FileOutputStream.open(Native Method)
        	at java.io.FileOutputStream.<init>(Unknown Source)
        	at java.io.FileOutputStream.<init>(Unknown Source)
        	at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
        	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
        	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
        	at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)
        	at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)
        	at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)
        	at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)
        	at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:345)
        	at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
        	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)
        	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:604)
        	at org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:861)
        	at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:88)
        	at org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:57)
        	at org.apache.log4j.xml.XMLWatchdog.<init>(DOMConfigurator.java:853)
        	at org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurator.java:584)
        	at com.eviware.soapui.DefaultSoapUICore.initLog(DefaultSoapUICore.java:480)
        	at com.eviware.soapui.DefaultSoapUICore.init(DefaultSoapUICore.java:124)
        	at com.eviware.soapui.DefaultSoapUICore.<init>(DefaultSoapUICore.java:114)
        	at com.eviware.soapui.DefaultSoapUICore.createDefault(DefaultSoapUICore.java:93)
        	at com.eviware.soapui.SoapUI.getSettings(SoapUI.java:1566)
        	at com.eviware.soapui.analytics.AnalyticsHelper.analyticsDisabled(AnalyticsHelper.java:18)
        	at com.eviware.soapui.analytics.AnalyticsHelper.InitializeAnalytics(AnalyticsHelper.java:42)
        	at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:118)