WSO2 EI-Integration Studio单元测试配置

问题描述 投票:2回答:1

我正在尝试使用一个用于API工件的测试用例构建一个简单的测试套件:

我创建了以下测试套件:

<unit-test>
         <artifacts>
          <test-artifact>
            <artifact>/DevOps_Deploy/src/main/synapse-config/api/testEsbDevOps.xml</artifact>
        </test-artifact>
        <supportive-artifacts/>
        <registry-resources/>
        <connector-resources/>
    </artifacts>
    <test-cases>
        <test-case name="TestOutput">
            <input>
                <request-path>/Project</request-path>
                <request-method>GET</request-method>
            </input>
            <assertions>
                <assertNotNull>
                    <actual>$body</actual>
                    <message>error</message>
                </assertNotNull>
            </assertions>
        </test-case>
    </test-cases>
    <mock-services/>
</unit-test>

然后,要运行单元测试,请输入运行EI的服务器的IP和端口。但我收到以下错误:

[INFO] U N I T - T E S T S

[INFO] ------------------------------------------------------------------------

[INFO] Detect 1 Synapse test case files to execute

[INFO] 

[error] Error in getting response from the synapse unit test agent

java.io.StreamCorruptedException: invalid stream header: 48545450
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:866)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:358)
       at org.wso2.synapse.unittest.TCPClient.readData(TCPClient.java:69)
       at org.wso2.synapse.unittest.UnitTestClient.executeTests(UnitTestClient.java:60)
       at org.wso2.synapse.unittest.UnitTestCasesMojo.testCaseRunner(UnitTestCasesMojo.java:143)
       at org.wso2.synapse.unittest.UnitTestCasesMojo.execute(UnitTestCasesMojo.java:78)
       at ...
..
[INFO] No test cases found in D:\Users\user\IntegrationStudio\workspace\MavenParentProjectDevOps\DevOps_Deploy\test\TestSuiteOne.xml unit test suite

我在哪里出错了?

eclipse unit-testing wso2 wso2esb wso2ei
1个回答
0
投票
对于Windows:

integrator.bat -DsynapseTest

对于Linux / MacOS

sh integrator.sh -DsynapseTest
© www.soinside.com 2019 - 2024. All rights reserved.