This package produces JUnit XML test reports. It is for use with your CI tooling of choice, for example a CI tool like GoCD consumes reports in this format and gives back HTML reports.
The reporting is designed to enable you to write your unit tests in the standard Julia way,
that is using
test/runtests.jl as the entry point to your tests and with default
types. In theory, it should also work with custom
TestSet types - see the
To test and generate a report for your package:
julia> TestReports.test("MyPackage") # Unit tests run, report saved to testlog.xml in current working directory
To add to CI:
$ julia -e 'using Pkg; Pkg.add("TestReports"); using TestReports; TestReports.test("MyPackage")'
Additionally, properties can be added to your
TestSets. To do this, use the
function like so:
using Test using TestReports @testset "MyTests" begin recordproperty("ID", 1) @test 1==1 end
testlog.xml file (after pretty printing) is below.
Test Failed Expression: contains(registration_block, "A Data Mining Approach to Predict Forest Fires using Meteorological Data")
I actually don't recommend using this directly in your tests. It is more flexible to just keep using the default testset type, and then use something like the Runner script to generate a wrapper of your tests with this testset around it.
about 2 months ago