# Improve test failures output to make it more readable

**URL:** https://discourse.julialang.org/t/improve-test-failures-output-to-make-it-more-readable/30747
**Category:** General Usage
**Created:** [November 5, 2019, 1:16pm UTC](https://discourse.julialang.org/t/improve-test-failures-output-to-make-it-more-readable/30747 "2019-11-05T13:16:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [November 5, 2019, 1:16pm UTC](https://discourse.julialang.org/t/improve-test-failures-output-to-make-it-more-readable/30747/1 "2019-11-05T13:16:18Z")

</div>

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

For instance, I get something like:

```julia
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:

```julia
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](https://global.discourse-cdn.com/julialang/original/3X/e/d/ededce30e2ce9ca5ffcdde1543c40c82e7b5af1a.png)

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [November 5, 2019, 1:18pm UTC](https://discourse.julialang.org/t/improve-test-failures-output-to-make-it-more-readable/30747/2 "2019-11-05T13:18:35Z")

</div>

> [@essenciary](#):
>
> P.S. visual diffing would be even better though too ambitious for a quick fix, something in the line of `git diff` :

[GitHub - ssfrr/TestSetExtensions.jl: Extensions to Julia's Base.Test](https://github.com/ssfrr/TestSetExtensions.jl) did this but I think some changes to the Test module broke it.

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [November 5, 2019, 1:23pm UTC](https://discourse.julialang.org/t/improve-test-failures-output-to-make-it-more-readable/30747/3 "2019-11-05T13:23:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [November 8, 2019, 8:21am UTC](https://discourse.julialang.org/t/improve-test-failures-output-to-make-it-more-readable/30747/4 "2019-11-08T08:21:27Z")

</div>

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

Fork here:  
[https://github.com/essenciary/TestSetExtensions.jl/tree/julia\_v1](https://github.com/essenciary/TestSetExtensions.jl/tree/julia_v1)

I’ve also made a pull request 🤞🏻

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [November 8, 2019, 9:56am UTC](https://discourse.julialang.org/t/improve-test-failures-output-to-make-it-more-readable/30747/5 "2019-11-08T09:56:18Z")

</div>

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.
