Forum Discussion

Optical_Image_T's avatar
Optical_Image_T
Occasional Contributor
10 years ago

Failure when trying to automate running of tests

Trying to automate the running of our test suites on a Linux box... I'm at the point where the tests are copied to the correct folder and I'm ready to call out to run the test runner via a shell script with the command:

/root/ReadyAPI-1.1.0/bin/testrunner.sh -f"./SOAPUI_REPORTS/REST-Testing" -R"TestCase Report" -j -r -F PDF "./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml"


The ConfiguringRepositories project is a composite project, created with SoapUIPro 5.1.

The soapui.log file shows:


2015-01-23 10:42:25,713 INFO [SoapUI] Adding [/root/ReadyAPI-1.1.0/bin/ext/sqljdbc41.jar] to extensions classpath
2015-01-23 10:42:26,094 INFO [DefaultSoapUICore] initialized soapui-settings from [/root/soapui-settings.xml]
2015-01-23 10:42:26,339 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [/root/SOAPUI/bin/scripts]
2015-01-23 10:42:26,341 INFO [DefaultSoapUICore] Adding listeners from [/root/ReadyAPI-1.1.0/bin/listeners/demo-listeners.xml]
2015-01-23 10:42:27,549 INFO [PluginLoader] 0 plugins loaded in 0 ms
2015-01-23 10:42:27,549 INFO [DefaultSoapUICore] All plugins loaded
2015-01-23 10:42:28,542 ERROR [SoapUI] An error occurred [Failed to load project from file [file:/root/v10panda/qa_automation/NightlyAutomatedSoapUiTesting/./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]], see error log for details
2015-01-23 10:42:28,543 ERROR [errorlog] com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/root/v10panda/qa_automation/NightlyAutomatedSoapUiTesting/./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/root/v10panda/qa_automation/NightlyAutomatedSoapUiTesting/./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(WsdlProjectPro.java:329)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:236)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.<init>(WsdlProjectPro.java:168)
at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(WsdlProjectProFactory.java:28)
at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(WsdlProjectProFactory.java:1)
at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:331)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:90)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:215)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:138)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:72)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:67)
Caused by: org.apache.xmlbeans.XmlException: Element testCase@http://eviware.com/soapui/config is not a valid soapui-project@http://eviware.com/soapui/config document or a valid substitution.
at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:328)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1279)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(Unknown Source)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(WsdlProjectPro.java:201)
... 10 more
2015-01-23 10:42:28,647 ERROR [SoapUIProTestCaseRunner] java.lang.Exception: Failed to load project file [./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
2015-01-23 10:42:28,647 ERROR [SoapUI] An error occurred [Failed to load project file [./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]], see error log for details
2015-01-23 10:42:28,647 ERROR [errorlog] java.lang.Exception: Failed to load project file [./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
java.lang.Exception: Failed to load project file [./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:335)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:90)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:215)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:138)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:72)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:67)




and the soapui-errors.log file shows:


2015-01-23 10:42:28,543 ERROR [errorlog] com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/root/v10panda/qa_automation/NightlyAutomatedSoapUiTesting/./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/root/v10panda/qa_automation/NightlyAutomatedSoapUiTesting/./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(WsdlProjectPro.java:329)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:236)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.<init>(WsdlProjectPro.java:168)
at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(WsdlProjectProFactory.java:28)
at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(WsdlProjectProFactory.java:1)
at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:331)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:90)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:215)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:138)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:72)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:67)
Caused by: org.apache.xmlbeans.XmlException: Element testCase@http://eviware.com/soapui/config is not a valid soapui-project@http://eviware.com/soapui/config document or a valid substitution.
at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:328)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1279)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(Unknown Source)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(WsdlProjectPro.java:201)
... 10 more
2015-01-23 10:42:28,647 ERROR [errorlog] java.lang.Exception: Failed to load project file [./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
java.lang.Exception: Failed to load project file [./projects/REST-API/Repositories-TestSuite-4f19b136-5740-44ac-be10-a0427b18a846/ConfiguringRepositories-4fe4bfd9-7beb-4574-990e-e994fff7d426.xml]
at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:335)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:90)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:215)
at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:138)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:72)
at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:67)




I have no idea what to look for now? The other issue --- and maybe the main issue --- is that we have a settings.xml file that has some Event coding in there that setups the environment. Do I need to run that one first or is it implicitly loaded?

Update - I can run the settings.xml file, but I can't tell if it actually did anything or not. When I do the next line in the script (ie, running the test suite), I get the above errors.

Thanks,

Aaron

3 Replies

  • Optical_Image_T's avatar
    Optical_Image_T
    Occasional Contributor
    But....do you have any idea why there is a problem loading the project? It loads fine from the UI and runs fine from the UI. How would you start troubleshooting this?
  • nmrao's avatar
    nmrao
    Champion Level 3
    Well, I did not get what you mean by
    It loads fine from the UI and runs fine from the UI

    Not sure if you can attach the project to check. Otherwise, have a check, how did you create the project? Is there any version changes of soapui? Try opening the soapui project xml in a browser and see.