Issue 67 in xspec: Test execution fails due to a naming collision of result files

1 view
Skip to first unread message

xs...@googlecode.com

unread,
Mar 3, 2014, 8:03:53 AM3/3/14
to xspe...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 67 by sha...@intelliarts.com: Test execution fails due to a
naming collision of result files
http://code.google.com/p/xspec/issues/detail?id=67

What steps will reproduce the problem?

1. Write a function which reads a document containing more than 1000 nodes
(a sample file is attached).

<xsl:function name="f:read-document" as="document-node()?">
<xsl:sequence select="doc('../data/document.xml')"/>
</xsl:function>

2. Write two identical scenarios calling the written function:

<x:scenario label="scenario 1">
<x:call function="f:read-document"/>

<x:expect>...</x:expect>
</x:scenario>

<x:scenario label="scenario 2">
<x:call function="f:read-document"/>

<x:expect>...</x:expect>
</x:scenario>

3. Evaluate the suite. A transformation error "XTDE1490: Cannot write more
than one result document to the same URI" will be fired.


The issue is caused by the generate-id() function used to evaluate a file
name in generate-test-utils.xsl:
<xsl:variable name="href" as="xs:string"
select="concat(generate-id($value[1]), '.xml')" />


The version of the product is: XSpec 0.4.0 Release Candidate 1.
The issue is not environment-dependent.

Possible fixes:
- Append a unique stamp to each resulting file.
- Make a copy of the resulting $value and pass the new variable to the
generate-id() function.

Attachments:
document.xml 21.4 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages