-1

我想生成一个 XML 报告 SOAtest,如https://github.com/parasoft/SOAtestToMTM所示,但我没有相同的结果。我遵循完全相同的步骤,但我的“标签”完全不同。

我使用 Parasoft SOAtest 9.9.5 版。

SOAtestToMTM 解决方案显示的 XML 结果如下:

<?xml version='1.0' encoding='utf-8'?>
<ResultsSession buildId="build-2016-08-18 15:17:02" date="08/18/16 15:17:02" project="Default Project" tag="Example Configuration" time="2016-08-18T15:17:02-07:00" toolName="SOAtest" toolVer="9.9.3.20151123">
    <TestConfig machine="nitrogen" name="Example Configuration" pseudoUrl="soatest.user://Example Configuration" user="kchen" />
    <Authors>
        <Author id="dev1" name="kchen" />
    </Authors>
    <VersionInfos>
        <StorageInfo ownerId="com.parasoft.xtest.checkers.api.execution" resultId="IFunctionalTestViolation" ver="3" />
...
        <StorageInfo ownerId="com.parasoft.xtest.checkers.api.standards" resultId="IDupCodeViolation" ver="2" />
    </VersionInfos>

    <ExecutedTestsDetails>
        <Total authChange="0;" authFail="3;" change="0" changePass="0" changeTotal="0" fail="3" name="Passed / Total" pass="13" time="0:00:00.120" total="16">
            <Project authChange="0;" authFail="3;" change="0" changePass="0" changeTotal="0" fail="3" name="test" pass="13" time="0:00:00.120" total="16">
                <TestSuite authChange="0;" authFail="3;" change="0" changePass="0" changeTotal="0" fail="3" id="wk:///test/Premera.tst" name="Premera.tst" pass="13" time="0:00:00.120" total="16">
                    <TestSuite auth="kchen" authChange="0;" authFail="3;" change="0" changePass="0" changeTotal="0" fail="3" id="wk:///test/Premera.tst#0000000000" name="Test Suite: Test Suite" pass="13" root="true" time="0:00:00.120" total="16">
                        <TestSuite auth="kchen" authChange="0;" authFail="1;" change="0" changePass="0" changeTotal="0" fail="1" id="wk:///test/Premera.tst#0000000000#0000000002" name="Test Suite: Test Suite A" pass="2" time="0:00:00.026" total="3">
                            <Test auth="kchen" authChange="0;" authFail="1;" change="0" changePass="0" changeTotal="0" fail="1" id="wk:///test/Premera.tst#0000000000#0000000002#0000000006" name="Test 1: Test A" pass="0" startTime="1471558622262" time="0:00:00.015" tool="Test A" total="1">
                                <assoc id="308" tag="pr" />
                                <assoc id="303" tag="req" />
                            </Test>
                            <Test auth="kchen" authChange="0;" authFail="0;" change="0" changePass="0" changeTotal="0" fail="0" id="wk:///test/Premera.tst#0000000000#0000000002#0000000007" name="Test 2: Test B" pass="1" startTime="1471558622279" time="0:00:00.005" tool="Test B" total="1">
                                <assoc id="309" tag="pr" />
                                <assoc id="303" tag="req" />
                            </Test>
                            <Test auth="kchen" authChange="0;" authFail="0;" change="0" changePass="0" changeTotal="0" fail="0" id="wk:///test/Premera.tst#0000000000#0000000002#0000000008" name="Test 3: Test C" pass="1" startTime="1471558622287" time="0:00:00.006" tool="Test C" total="1">
                                <assoc id="310" tag="pr" />
                                <assoc id="303" tag="req" />
                            </Test>
                        </TestSuite>
...
    </ExecutedTestsDetails>
</ResultsSession>

但是 SOAtest 创建的结果 Webservice SOAP 是这样的:

<?xml version="1.0" encoding="UTF-8"?>
<Report time="Tue Mar 27 14:42:40 EDT 2018" app="SOAtest" version="9.9.5.20160601" project="C:\Users\rejean.therrien\parasoft\workspace\Test\DneOnline\Calculator.tst">
    <TestSuite name="Test Suite: Test Suite" runConcurrently="false" testPath="/Test Suite: Test Suite">
        <Requirements>
            <Notes>Created from: http://www.dneonline.com/calculator.asmx?WSDL&#xD;&#10;Timestamp: 2018-01-18 13:00:44</Notes>
        </Requirements>
        <DataSources>
            <DataSource name="Table: New Datasource" type="Table">
                <Row index="0">
                    <Column name="intA">10</Column>
                    <Column name="intB">5</Column>
                    <Column name="intResultAdd">15</Column>
                    <Column name="intResultDivide">2</Column>
                </Row>
...         
            </DataSource>
        </DataSources>
        <TestFlowLogic/>
        <TestSuite name="Test Suite: CalculatorSoap" runConcurrently="false" testPath="/Test Suite: Test Suite/Test Suite: CalculatorSoap">
            <TestFlowLogic/>
            <Test name="Test 1: Add" testPath="/Test Suite: Test Suite/Test Suite: CalculatorSoap">
                <Requirements>
                    <GRSIDs>
                        <ID>303</ID>
                        <ID>308</ID>
                    </GRSIDs>
                </Requirements>
                <Configuration type="SOAP Client" wsdlURI="http://www.dneonline.com/calculator.asmx?WSDL" soapVersion="SOAP 1.1" timeout="30000" outgoingEncoding="UTF-8" dataSource="Table: New Datasource" styleUse="document/literal" attachmentEncapsulation="MIME" operation="Add">
                    <Transport type="HTTP 1.0">
                        <Configuration endpoint="http://www.dneonline.com/calculator.asmx" chunking="false" followRedirects="true" connection="Close Connection"/>
                    </Transport>
                    <Input><?xml version="1.0" encoding="UTF-8"?>&#10;<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">&#10; <SOAP-ENV:Body>&#10;  <Add xmlns="http://tempuri.org/">&#10;   <intA>${intA}</intA>&#10;   <intB>${intB}</intB>&#10;  </Add>&#10; </SOAP-ENV:Body>&#10;</SOAP-ENV:Envelope></Input>
                    <Requirements>
                        <Notes>Test client for operation "Add" in "${WSDL}".</Notes>
                    </Requirements>
                    <ChainedTools/>
                </Configuration>
            </Test>
...
            </TestSuite>
    </TestSuite>
</Report>

完全不同 :(

4

1 回答 1

0

瑞让,

第一份报告由 SOAtest v9.9.3 生成,但我看到与 v9.10.4 相同的语法。您是如何获得 SOAtest 报告的?您说的是“Webservice SOAP”,但您是否使用 SOAtest 的 SOAP 接口来获取报告?或者,也许您正在使用 SOAtest cli 接口:soatestcli[.exe]?如果是,您在测试(tst 文件)执行期间使用哪些参数来获取报告?通常,在使用 cli 时,您应该运行这样的命令:

soatestcli -data <workspace_location> -resource <project name> -config "team://Team Configuration" -report <Report_location> -localsettings acme_policy.settings

其中 Report_location 定义了您应该在哪里找到 xml 和 html 报告。但是,您可以使用 XML 转换,它允许您更改报告的格式。然后您必须检查 -localsettings 参数的内容(通常是文件,此处为 acme_policy.settings),您可以在其中找到有关报告创建的其他信息。

于 2018-03-29T14:48:30.137 回答