我在CentOS VM上下载了SoapUI,在其中我创建了可以正常运行的SoapUI项目。现在,我在另一个没有SoapUI的CentOS VM中下载了“ddavison / soapui” docker 镜像。我启动了容器,然后转到“localhost:3000 /”,然后查看将项目 curl 到localhost:3000的说明。我已经尝试过制作的项目以及下载随附的示例soapUI项目。都不起作用,并且它们都收到相同的错误。
我运行命令:curl --form "project=@/home/Documents/Sample-REST-Project-soapui-project.xml" http://localhost:3000/
我得到以下输出:
================================
=
= SOAPUI_HOME = /opt/SoapUI
=
================================
2018-12-13 12:49:06,639 [main] WARN com.eviware.soapui.SoapUI - Could not find jfxrt.jar. Internal browser will be disabled.
SoapUI 5.4.0 TestCase Runner
12:49:06,878 INFO [DefaultSoapUICore] Creating new settings at [/root/soapui-settings.xml]
12:49:07,792 INFO [PluginManager] 0 plugins loaded in 2 ms
12:49:07,792 INFO [DefaultSoapUICore] All plugins loaded
12:49:08,652 INFO [WsdlProject] Loaded project from [file:/tmp/soapui-project.xml]
12:49:08,657 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [Sample REST Project]
12:49:08,658 INFO [SoapUITestCaseRunner] Running Project [Sample REST Project], runType = SEQUENTIAL
12:49:08,669 INFO [SoapUITestCaseRunner] Running SoapUI testcase [accountcreation TestCase]
12:49:08,675 INFO [SoapUITestCaseRunner] running step [View Form]
12:49:08,749 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Connection closed
12:49:08,749 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Connection shut down
12:49:08,752 ERROR [WsdlSubmit] Exception in request: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8080 refused
12:49:08,764 ERROR [SoapUI] An error occurred [Connection to http://localhost:8080 refused], see error log for details
12:49:08,770 ERROR [SoapUITestCaseRunner] View Form failed, exporting to [/opt/bin/Test_account_creation-accountcreation_TestCase-View_Form-0-FAILED.txt]
12:49:08,772 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [accountcreation TestCase], time taken: 0ms, status: FAILED
12:49:08,773 INFO [SoapUITestCaseRunner] Project [Sample REST Project] finished with status [FAILED] in 110ms
12:49:08,773 ERROR [SoapUITestCaseRunner] java.lang.Exception: TestCase [accountcreation TestCase] failed without assertions
12:49:08,773 ERROR [SoapUI] An error occurred [TestCase [accountcreation TestCase] failed without assertions
], see error log for details
org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8080 refused
at com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$SoapUIClientConnectionOperator.openConnection(SoapUIMultiThreadedHttpConnectionManager.java:290)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:297)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:227)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:79)
at com.eviware.soapui.impl.rest.RestRequest.submit(RestRequest.java:192)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:794)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:138)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:128)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:363)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$SoapUIClientConnectionOperator.openConnection(SoapUIMultiThreadedHttpConnectionManager.java:273)
... 24 more
java.lang.Exception: TestCase [accountcreation TestCase] failed without assertions
at com.eviware.soapui.tools.SoapUITestCaseRunner.throwFailureException(SoapUITestCaseRunner.java:519)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:435)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:202)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:137)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:112)
at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:122)
我需要在要从中运行docker容器的VM中的某个位置下载SoapUI吗?另外,我从中运行容器的VM中没有/ opt / SoapUI文件夹,那是我应该添加的东西吗?
最佳答案
我对运行SoapUI项目的这种方式不熟悉,但是我认为您似乎没有运行自己认为正在运行的东西...
您的参数指向“Sample-REST-Project-soapui-project.xml”项目,但在输出中指出:
12:49:08,652 INFO [WsdlProject] Loaded project from [file:/tmp/soapui-project.xml]
您还给了参数http://localhost:3000/,我认为它是端点...?但是在输出中,您会收到错误消息
org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8080 refused
我认为它们应该相同吗?
关于docker - 使用 “ddavison/soapui” docker image在docker容器中运行SoapUI测试时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53762499/