SystemWeaver supports a round-trip workflow with vTESTstudio for setting up and executing tests and storing the test results in SystemWeaver. This article describes the overall workflow and how to set it up. To inquire into the SystemWeaver vTESTstudio integration license, contact [email protected].
Note: This article does not cover how to work with vTESTstudio. |
Prerequisites
- Knowledge of vTESTstudio and CANoe
- The SWExtension.VtestStudioImporter extension installed in the swExplorer client
- Overview of the Workflow
- Exporting Trace Items File with Test Cases
- Importing Test Report Using a vTESTstudio Importer
Overview of the Workflow
Below is a principal workflow description. First, a trace items file is produced from SystemWeaver containing the SystemWeaver test cases. This file is imported into vTESTstudio where the SystemWeaver test cases are mapped to vTESTstudio test case implementations. These test case implementations are executed in CANoe and results are reported back to vTESTstudio. Then, the test results are exported from VTESTstudio as a test report file. The standalone program Systemite.VtestStudioImporter or the plugin SWExtension.VtestStudioImporter is used to import the test report file into SystemWeaver.
It is also possible to import test results directly from CANoe using Systemite.VtestStudioImporter or the plugin SWExtension.VtestStudioImporter, as illustrated in the below workflow. The configuration of the importers are the same regardless of whether the source of the result file comes from CANoe or vTESTstudio.
Exporting Trace Items File with Test Cases
To start with, you'll want to export a trace items file containing the relevant test cases. The Configurable XML definition found below lets you export the trace items file with test cases in test specifications, test scopes and test suites recursively.
XML Definition for Exporting Trace Items
The below Configurable XML Definition can be used to generate and save a trace items file. The definition supports generating a trace items file from the following item types: Test Specification, Test Scope, Test Suite, Test case and Test Case Reqs. Depending on from what item type you want to generate the export from, this Configurable XML definition can be saved on any or all of those item types.
<XDocument name="TraceItems"> <XAttribute name="version" value="2"/> <XElement name="Product"> <Text>SystemWeaver</Text> </XElement> <XElement name="Folder"> <ApplyTemplate name="TopFolderInfo"/> <ForEachPart type="ISSS"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ISES"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ISSC"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ITTX"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ITEC"> <ApplyTemplate name="TraceItem"/> </ForEachPart> </XElement> <Template name="Folder"> <XElement name="Folder"> <ApplyTemplate name="FolderInfo"/> <DefObj> <ForEachPart type="ISSS"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ISES"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ISSC"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ITTX"> <ApplyTemplate name="Folder"/> </ForEachPart> <ForEachPart type="ITEC"> <ApplyTemplate name="TraceItem"/> </ForEachPart> </DefObj> </XElement> </Template> <Template name="TraceItem"> <XElement name="TraceItem"> <ApplyTemplate name="FolderInfo"/> </XElement> </Template> <Template name="TraceReqInfo"> <XElement name="TraceRequiremnt"> <ApplyTemplate name="FolderInfo"/> </XElement> </Template> <Template name="TopFolderInfo"> <XElement name="UniqueID"> <Text>#{AncestorHandle}</Text> </XElement> <XElement name="ReadableID"> <Text>#{AncestorHandle}</Text> </XElement> <XElement name="VersionIdentification"> <Text>#{VersionNumber}</Text> </XElement> <XElement name="Name"> <Text>#{Name}</Text> </XElement> <XElement name="Description"> <Description format="plain"/> </XElement> <XElement name="Reference"> <Text>#{Handle}</Text> </XElement> <XElement name="DataSource"> <Text>SystemWeaver</Text> </XElement> <!--ApplyTemplate name="AdditionalInfo"/--> </Template> <Template name="FolderInfo"> <XElement name="UniqueID"> <Text>#{AncestorHandle}</Text> </XElement> <XElement name="ReadableID"> <Text>#{AncestorHandle}</Text> </XElement> <!-- Test case item attribute Id and Test case requirement item attribute Id, If attribute Id's are diffrent need to replace this condition check with new SID's--> <DefObj> <If test="IsSID('JTCS')"> <XElement name="ItemAttributeId"> <Text>#{Attribute:TCID}</Text> </XElement> </If> <If test="IsSID('RQ')"> <XElement name="ItemAttributeId"> <Text>#{Attribute:9RID}</Text> </XElement> </If> </DefObj> <XElement name="VersionIdentification"> <Text>#{VersionNumber}</Text> </XElement> <XElement name="Name"> <Text>#{Name}</Text> </XElement> <DefObj> <XElement name="Description"> <Description format="plain"/> </XElement> </DefObj> <XElement name="Reference"> <Text>#{Handle}</Text> </XElement> <If test="not IsSID('JTCS')"> <XElement name="DataSource"> <Text>SystemWeaver</Text> </XElement> </If> <!-- Test case req --> <DefObj> <ForEachPart type="ITRQ"> <ApplyTemplate name="TraceReqInfo"/> </ForEachPart> </DefObj> </Template> <Template name="TraceItemInfo"> <XElement name="UniqueID"> <Text>#{AncestorHandle}</Text> </XElement> <!--XElement name="ReadableID"> <Text>#{AncestorHandle}</Text> </XElement--> <DefObj> <XElement name="VersionIdentification"> <Text>#{Version}</Text> </XElement> </DefObj> <XElement name="Name"> <Text>#{Name}</Text> </XElement> <DefObj> <XElement name="Description"> <Description format="plain"/> </XElement> </DefObj> <XElement name="Reference"> <Text>#{Handle}</Text> </XElement> <!--ApplyTemplate name="AdditionalInfo"/--> </Template> <!-- Template for additional information according to schema --> <!--Template name="AdditionalInfo"> <XElement name="AdditionalInformation"> <XElement name="Property"> <XElement name="Name"> <Text>Handle</Text> </XElement> <XElement name="Value"> <Text>#{Handle}</Text> </XElement> </XElement> <XElement name="Property"> <XElement name="Name"> <Text>Ancestor</Text> </XElement> <XElement name="Value"> <Text>#{AncestorHandle}</Text> </XElement> </XElement> </XElement> </Template--> </XDocument>
Importing Test Report Using a vTESTstudio Importer
After the test results have been exported from vTESTstudio, they can be imported into SystemWeaver using the SWExtension.VtestStudioImporter plugin.
The SWExtension.VtestStudioImporter is designed for those who want a graphical interface for importing test results from vTESTstudio. It is a plugin that is displayed in the swExplorer client. See Configuring the SWExtension.VtestStudioImporter for configuration instructions. How to use the extension is explained in Using the SWExtension.VtestStudioImporter.
NOTE: It is recommended to have one vTESTstudio test case implementation per test case in SystemWeaver. |