XSLT compile error

436 views
Skip to first unread message

fernando guallini

unread,
Jul 23, 2015, 2:53:03 PM7/23/15
to SpecFlow
Hi,
I am trying to get test results reports using nunit-dream xslt template. But, I getting the following error sending xslt template as a parameter:
"XSLT compile error"

Call to specflow.exe:

specflow.exe nunitexecutionreport myProject.csproj  /out:TestResult/MyResult.html  /xsltFile:ExecutionReport.xslt /xmlTestResult:TestResult/TestResult.xml


I found this post asking the same, but it hasn't helped me

Chris Forbes

unread,
Feb 23, 2016, 1:21:27 PM2/23/16
to SpecFlow
I'm having the same issue as yourself. Paths are all correct, dependencies are included, still no luck. If the error was more verbose, then that would be helpful! VS 2015 / SpecFlow 2.0

Chris Forbes

unread,
Feb 24, 2016, 6:32:34 AM2/24/16
to SpecFlow
Clearly, I was making sloppy mistakes yesterday. I fixed the issue and it was entirely my fault. In my FAKE file (F# Make) I was pointing at my tools directory instead of my test directory. Silly, silly.

So, to confirm the requirements for any future readers:
  1. Create a `Reporting` folder somewhere in your source.
  2. Copy the `NUnitExecutionReport.xslt` from SpecFlow source to `Reporting/NUnitExecutionReport/`
  3. Copy the `Common.xslt`, `GherkinElements.xslt`, `Languages.xml` from SpecFlow source to `Reporting/Common/`
  4. Run `specflow.exe "nunitexecutionreport" "<path-to-csproj-file>" "/out:SpecFlowResult.html" "/xmlTestResult:<path-to-NUnit-xml-result-file>" "/testOutput:<path-to-NUnit-txt-result-file>" "/xsltFile:<path-to-custom-xslt-file>"

Mark Winspear

unread,
Feb 26, 2016, 10:36:57 AM2/26/16
to SpecFlow
You could try checking for ampersands in any of your parent folders - that was the cause for me!
Reply all
Reply to author
Forward
0 new messages