NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Sequence call from xml report using the stylesheet

I wish to remove sequence call steps from the XML report as they just make a mess of the report. This hopefully would remove the annoying 'begin' and 'end' sequence call tags also from the report. This would just leave the actual passed/failed/done/skipped steps only.

I am trying the ADD_STEP_FILTERING_CONDITION in the XML stylesheet but without success; I have tried the following but it does not work:

if (StepResult.TS.StepType == \"SequenceCall\")

                return false;

return true;

Anyone know the correct format of the filter command necessary to remove sequence calls from the XML report?

TestStand 12

 

0 Kudos
Message 1 of 11
(4,279 Views)

I don't think you can just remove the sequence call because then it will remove all the steps within it.  I believe the stylesheet iterates through the results from the sequences.

 

Which stylesheet are you working with?

 

If it is the horizontal then replace section 2.3 with the following:

<!-- XSLT Section 2.3: Template to add header to the table that contains the report for a sequence call and call Template to handle 'TEResult'  within it. -->
	<xsl:template match="Prop[@Name='SequenceCall']">
		<xsl:param name="reportOptions"/>
		<xsl:if test="$gEnableResultFiltering = 0 or user:IsTableCreatedForSequence(Prop[@Name = 'ResultList']/Value[@ID]/Prop[@Type = 'TEResult']) = 'true'">
			<xsl:if test="Prop[@Name='ResultList'] and Prop[@HBound != '[]']">
				<!--<xsl:value-of disable-output-escaping="yes" select="user:AddIndentStartTag()"/>
				<font size='1'>
					<b>
						<br/>
						<nobr>Begin Sequence: <xsl:value-of select="Prop[@Name='Sequence']/Value"/>
						<br/> (<xsl:apply-templates select="Prop[@Name='SequenceFile']"/>)</nobr>
					</b>
				</font>-->
				<xsl:if test="$gEnableResultFiltering = 0 or user:IsTableCreationNecessary(Prop[@Name = 'ResultList']/Value[@ID]/Prop[@Type = 'TEResult']) = 'true'">
					<xsl:value-of disable-output-escaping="yes" select="user:BeginTable()"/>
				</xsl:if>
				<xsl:apply-templates select="Prop[@Name='ResultList']/Value[@ID]/Prop[@Type='TEResult']">
					<xsl:with-param name="reportOptions" select="$reportOptions"/>
				</xsl:apply-templates>
				<xsl:if test="$gEnableResultFiltering = 0 or user:IsTableCreatedForSequence(Prop[@Name = 'ResultList']/Value[@ID]/Prop[@Type = 'TEResult']) = 'true'">
					<xsl:value-of disable-output-escaping="yes" select="user:EndTable()"/>
					<xsl:value-of disable-output-escaping="yes" select="user:AddEndingBlockQuotesForCurrentSequence()"/>
				</xsl:if>
				<!--<h5>
					<font size='1'>
						End Sequence: <xsl:value-of select="Prop[@Name='Sequence']/Value"/>
					</font>
				</h5>
				<xsl:value-of disable-output-escaping="yes" select="user:AddIndentEndTag()"/>-->
			</xsl:if>
			<xsl:if test="Prop[@Name='ResultList']">
				<xsl:if test="Prop[@Name='ResultList'] and Prop[@HBound = '[]']">
					<br/>
				</xsl:if>
			</xsl:if>
			<!-- In case the resultList is deleted and does not exist in the stream -->
			<xsl:if test="not (Prop[@Name='ResultList'])">
				<font size='1'>
					<br/>
					No Sequence Results Found
				</font>
			</xsl:if>
		</xsl:if>
	</xsl:template>
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 11
(4,273 Views)

It won't remove the sequence result but it will left align everything and get rid of the annoying begin and end sequence call breaks.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 11
(4,272 Views)

Thanks for that, but there must be a way to get rid of each sub sequence call result from the XML report, as they are completely unnecessary bits of text that just cloggs up the report; don't know why they are there in the first place?

TestStand 12, Horizontal stylesheet.

 

 

0 Kudos
Message 4 of 11
(4,253 Views)

If you use the HTML or ASCII Text report formats you can use the following expression in the filter experssion box within the report options.

Left(Result.TS.StepType, 12) != "SequenceCall"

This expression will remove all sequence call steps from the report.

For XML it is a more difficult because you have to change the style sheet. Additionally, the TDMS format stuff posted above is not really a viable option.

0 Kudos
Message 5 of 11
(4,213 Views)

For the love of everything that is holy do NOT use TDMS.  You would have to write an entire plugin because I don't know of one that exists.

 

If you go the HTML or ASCII route then you get an ugly report.  Just turn off result recording for your sequence call steps to get the same result.  But good luck with the ugly report format.

 

I understand what you want and that in your case you may think having the sequence call step name is annoying.  However, I've seen that most often people want to see it on there so they know what is getting called.  And in our case we turn the sequence calls into MultiNumeric limit steps which we definitely want on the report.  I haven't played with the style sheet enough but I'm sure you could just filter that out in there. 

 

Also, just to clarify: You want the sub steps to show on the report just not the sequence call step name- correct?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 11
(4,203 Views)

Jiggawax-

 

If you turn off result recording for the sequence call step then all sequences and steps called by that sequence call step will not show up in the report. Again, the correct way to get ride of just the sequence call step for a HTML or ASCII report is to filter out the sequence call steps with the following expression.

 

Left(Result.TS.StepType, 12) != "SequenceCall" 

0 Kudos
Message 7 of 11
(4,183 Views)

Lots of discussion here on other subjects but I really do need XML, nothing else. There must be a way of just removing the annoying sub sequence call print outs whilst leaving the actual sub sequence test results alone?

 

Message 8 of 11
(4,163 Views)

Hi stevesteve,

 

Could you solve this?

0 Kudos
Message 9 of 11
(2,483 Views)

I did not solve this, and am still annoyed by the useless unnecessary begin & end's of sub sequences & indentation. Rather than one page of results I end up many due to the begin & end rubbish.

 

Regards

 

0 Kudos
Message 10 of 11
(2,465 Views)