我想生成一个XML报告SOAtest,如 https://github.com/parasoft/SOAtestToMTM 所示,但我没有相同的结果。我按照完全相同的步骤,但我的'TAGS'完全不同。
我使用的是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
 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"?> <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"> <SOAP-ENV:Body> <Add xmlns="http://tempuri.org/"> <intA>${intA}</intA> <intB>${intB}</intB> </Add> </SOAP-ENV:Body> </SOAP-ENV:Envelope></Input>
<Requirements>
<Notes>Test client for operation "Add" in "${WSDL}".</Notes>
</Requirements>
<ChainedTools/>
</Configuration>
</Test>
...
</TestSuite>
</TestSuite>
</Report>
完全不同:(
答案 0 :(得分:0)
Rejean,
第一个报告是由SOAtest v9.9.3生成的,但是我看到了与v9.10.4相同的语法。 您是如何获得SOAtest报告的? 您说过“Webservice SOAP”,但是您是否使用SOAtest的SOAP接口来获取报告? 或者您使用的是SOAtest cli接口:soatestcli [.exe]? 如果是,您在测试(tst文件)执行期间使用什么参数来获取报告? 通常,在使用cli时,您应该运行以下命令:
import numpy as np
from scipy import stats
A = np.random.randint(0, 9, (10, 10))
res = stats.mode(A.ravel())
# ModeResult(mode=array([4]), count=array([19]))
其中Report_location定义了应该在哪里找到xml和html报告。 但是,您可以使用XML转换,它允许您更改报告的格式。 然后你必须检查-localsettings参数的内容(通常是文件,这里是acme_policy.settings),你可以在其中找到有关报告创建的其他信息。