xmlxsltnunitnunit-console

NUnit Console Runner pass XSLT parameters


When using the Console Runner, I am using an XSLT transform to convert the NUnit XML output to a custom HTML report using transform with --result option. I need to access some environment variables within the XSLT file, and the only way I know of doing that is to pass them as parameters to the transform. Is there a way that I can pass parameters to the XSLT transform from the command-line? Or is there some other way I can do this?


Solution

  • I think I may have found a solution. I can pass the environment variables to NUnit as parameters that I want to have in my HTML report. At the end of the test run, the result XML file will contain the parameters containing my env variables. The XSLT can then get those parameters from the XML file and format them into the HTML file.