Open galtm opened 3 years ago
XSpecCounterCH
seems to implement a simple XSpec document parser. I'm afraid it is not viable, because
Yes, it's an old heritage. Actually, I didn't know <x:like />
....
This class was introduced to keep a viable result even if the XSpec crashes, for example if Xslt throws an exception, to be able to produce a report.
Hi, @cmarchand .
Yes, the usage and expectations look good. I'm not familiar with the code in this repository, so I can't comment on the tests' connection with this issue or whether other test cases would be useful. I'll leave that part up to you. Thanks for working on this issue!
One more thing, in case it affects your fix or tests: The shared scenario is not limited to a single x:expect
child. It can have zero or more x:expect
elements and other kinds of elements as well.
Ok, I'll complete the test cases with this.
I have a case where an
<x:expect>
element in the XSpec test produces a failure, but the overall Maven process reports success. Here is a small test that reproduces the issue. (The XSLT stylesheet can be anything because it's not actually used.)After I do
mvn test
the result includes the following.The problem seems to be related to code reuse in the XSpec test via the
<x:like>
element. If I delete one of the<x:like>
elements or replace it with the content of the shared scenario, the problem goes away.