Start a new topic

How to attach an Error log to a test case

One way of attaching an Error log to a Test Case is using External reference attribute, which allows you to attach a single, or an array of multiple references in the form of a URI and a reference name.


Prerequisites:

A. Set up a File/Directory on SystemWeaver server, read more in the help by searching for "File repository".

B. swArchitect Role.


According to this alternative, you need to do the following:

1.  Create an External reference attribute, you can set any SID and Name of your choice, as shown below.

image

2. Create a Grid that is valid for Item type= Test Suite, SID= JBTE.

3. Add the created External reference attribute to a Test Node, using a NodeAttributeColumn in the created Grid definition and set the readOnly="False",  as shown below.

<NodeAttributeColumn caption="Erro Log refernce" readOnly="False" width="60" type="XREF"/>

  A full example:

<Grid>
<Options>
 <CellAutoHeight/>
</Options>
    <Columns>
        <ItemNameColumn cellMerge="True" caption="Test" width="300" objectName="Test"/>
        <ItemNameColumn cellMerge="True" caption="TC" width="150" objectName="TCpart"/>
        <TextColumn caption="PNo" width="25" objectName="TCpart">#{PartNo}</TextColumn>
        <ItemAttributeColumn font="Heading2" caption="TC-ID" width="50" objectName="TCpart" type="AUID"/>
        <NodeAttributeColumn caption="Result" readOnly="False" width="60" type="PTCS"/>
        <NodeAttributeColumn caption="Erro Log refernce" readOnly="False" width="60" type="XREF"/>
        <NodeAttributeColumn caption="Issue Ref." readOnly="False" width="60" type="ISRF"/>
        <NodeAttributeColumn caption="Comment" readOnly="False" width="200" type="ABAN"/>
        <NodeAttributeColumn caption="Long Comment" readOnly="False" width="200" type="ARAN"/>
        <NodeAttributeColumn caption="Measurements" readOnly="False" width="200" type="PTMS"/>                            
    </Columns>
    <Context name="TestContext">
        <AddParts owner="main" sid="ISES" part="TestSuiteToTestPart" defobj="Test"/>
        <AddParts owner="Test" sid="ISSP" part="TestToTestSpecPart" defobj="TestSpec"/>
        <AddParts owner="Test" sid="ISSP" part="TestToTestSpec" defobj="TestSpec" nodes="true"/>
        <AddParts owner="TestSpec" sid="ITEC" part="SpecToTestCase" defobj="TestCase" nodes="true"/>
        <AddParts owner="TestCase" sid="ITRQ" part="TestCaseToRequirement" defobj="Requirement"/>
    </Context>
    <ForEachInContext name="TestContext" group="main">
        <ContextGoForward part="TestSuiteToTestPart">
        <RowObject name="Test">
        <ContextGoForward part="TestToTestSpec">
            <ContextGoForwardToPart part="SpecToTestCase">
            <RowObject name="TCpart">
                <ContextGoNodes>
                    <Row/>
                </ContextGoNodes>
            </RowObject>
            </ContextGoForwardToPart> 
        </ContextGoForward>
        </RowObject>
        </ContextGoForward>
    </ForEachInContext>
</Grid>

 The result:

image



BR Bashar



Login to post a comment