Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test execution fails due to a naming collision of result files #67

Open
GoogleCodeExporter opened this issue Jun 8, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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. 

Original issue reported on code.google.com by sha...@intelliarts.com on 3 Mar 2014 at 1:03

Attachments:

cirulls pushed a commit to xspec/xspec that referenced this issue Oct 30, 2016
- test naming collision in result file when a function read a document containing more than 100 nodes
cirulls pushed a commit to xspec/xspec that referenced this issue Oct 30, 2016
* Test result naming collision (expath#67)

- test naming collision in result file when a function read a document containing 100 nodes
- print out test name when running test suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant