Improve test failures output to make it more readable

Is any effort being undertaken to better format the output of test failures?

For instance, I get something like:

Evaluated: "<html><head><title>Genie test</title></head><body><div class=\"template\"><h1>Welcome</h1><div><p>This is a Genie test</p></div><hr>\n</div><footer>  Just a footer\n</footer></body></html>" == "<html><head><title>Genie test</title></head><body><div class=\"template\"><h1>Welcome</h1><div><p>This is a Genie test</p></div><hr>\n</div><footer>Just a footer</footer></body></html>"

This makes it very hard to see the differences, and it would be much better to format it as:

Expected: "<html><head><title>Genie test</title></head><body><div class=\"template\"><h1>Welcome</h1><div><p>This is a Genie test</p></div><hr>\n</div><footer>  Just a footer\n</footer></body></html>"
Result:   "<html><head><title>Genie test</title></head><body><div class=\"template\"><h1>Welcome</h1><div><p>This is a Genie test</p></div><hr>\n</div><footer>Just a footer</footer></body></html>"

P.S. visual diffing would be even better though too ambitious for a quick fix, something in the line of git diff:
image

2 Likes

https://github.com/ssfrr/TestSetExtensions.jl did this but I think some changes to the Test module broke it.

3 Likes

That looks awesome - definitely worth taking a look at, maybe I can make it work. Thanks!

OK, I managed to upgrade it to run on Julia v1, all tests passing.

Fork here:

I’ve also made a pull request :crossed_fingers:t2:

5 Likes

Any chance TestSetExtensions.jl become the default Test? It is really convenient to have tests highlighted, and also be able to choose a subset of test sets to run. Really nice package, thanks for sharing.