I'm using NUnitLite runner in console application (according to this example) to run my test on linux/mac.
I need to transform the results into JUnit format. I haven't found any flag/option how I can do the transformation only by using NUnitLite runner.
Another way would be to transform the results after the test run. I found xslt transformation here, but I'm not sure, how to use it on linux/mac (I don't want to use mono in this case).
Did I miss something in NUniteLite runner or is there a simple way to run xslt transformation on linux/mac I could use?
Thanks a lot
OK, it's not universal, but worked for me on linux(Ubuntu)/mac:
xsltproc -o PATH_TO/JUNIT_FILE.xml PATH_TO/nunit3-junit.xslt PATH_TO/TestResult.xml
Where "nunit3-junit.xslt" comes from nunit /
nunit-transforms
and for more info about xsltproc see here.
Related
So I have some simple unit tests setup in busted. I am a little new to LUA, so I may be missing something obvious.
When I run:
lua test.lua
I get expected results (7 succeed, 1 failed on purpose to try out busted) in the nice terminal output.
My ultimate goal however is to output JSON results, and have a script that consumes JSON from multiple tests to make some summary pages for my fellow WoW addon developers.
When I run:
lua test.lua -o json
my terminal pauses for a brief second, and I am returned to the command line.
There is no terminal output, nor is any file created.
I am relatively new to lua and busted in general, could you provide me any pointers?
Here is a screenshot:
And here is a link to Busted's website.
The issue in question was caused by dkjson module not using functions in tables properly. The bug was fixed in pull request #449, so, You should wait for the fix to get to next release candidate (>2.0.rc10-0) of Busted or just download and build recent version from here. Btw, relevant bug report - #448.
I need an example (in some console tool) to convert generated gtest XML report to HTML.
A solution mast be without using ant or Maven.
you should use xslt to transform xml into html.
you could use the xsltproc tool from the command line under linux. I guess there are equivalent tools for other OSes.
I did it for myself with programming language, which is Python 2.*: https://github.com/burlachenkok/gtest_report
Also this gtest_report supports comparision of 2 or more google test results.
If to be honest it was the prime goal.
Is there a way to run JUnit programmatically in which I could pass custom PrintStream for all output of JUnit framework itself and leave standard output for test cases?
I see that JUnit internally is using JUnitSystem and TextListener to achieve this but I don't see intended entry point to use it without modifying or extending JUnitCore.
Does anyone have idea how to achieve this?
I don't think that JUnitCore and the classes used underneath print anything to standard out. The notable exception is JUnitCore.main, but this is just the main method for direct command-line execution. Instead you should use one of the run or runClasses methods. Your own RunListener can then output whatever/however it desires.
I have some tests I would like to run with nosetests and generate junit xml results. As far as I know, this is not possible by the default installation of nosetests, as it only produced xunit xml files.
However, nose plugins exist which can do various things, among them a code snippet to be use to create junit xml output.
My questions:
What are the differences between junit and xunit xml results? Are they basically different and incompatible?
How to install or use the junitxml plugin code in the link I mentioned above? Maybe there is a different way to create junit output?
Nose supports xunit natively, now.
nose supports xunit output with built-in plugin, just try --with-xunit
~ From Oleksiy, https://stackoverflow.com/a/20750012/311901
This is a nose plugin; You can install it by
pip install NoseXUnit
Read the documentation for it here: http://nosexunit.sourceforge.net/. This will help you run the plugin
I would like to write a junit test for my Checkstyle extension. Can someone show me how to do it? I know there is a project in github called JUnit-Checkstyle-Test-Wrapper. However, I don't see how using this tool would help me get to my extension and verify its values.
thanks.
Probably the best reference for how to test your checkstyle extension (I assume you've added a checker) is to look at the checkstyle source code, and just copy & change one of the existing tests. For example, here is the test for HeaderCheck. This is probably the best way to start. Remember you can actually extend the Checkstyle test classes.
take a look at a lot of examples for custom Checkstyle checks and UTs for them https://github.com/sevntu-checkstyle/sevntu.checkstyle/tree/master/sevntu-checks