# Incorrect console output for nested @testset

**URL:** <https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198>\
**Category:** General Usage\
**Created:** [March 15, 2021, 2:50pm UTC](https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198 "2021-03-15T14:50:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michal](https://discourse.julialang.org/u/Michal)\
**Post date:** [March 15, 2021, 2:50pm UTC](https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198/1 "2021-03-15T14:50:52Z")

</div>

I created nested @testsets with tests. In general, it is running correct for all tests, but console output is not same as I expected from following website. I tried it on Julia 1.5.2, 1.5.4, 1.6RC.

[https://docs.julialang.org/en/v1/stdlib/Test/](https://docs.julialang.org/en/v1/stdlib/Test/)

Modified example from website:

```julia
using Test

@testset "1." begin
    @testset "1.1" begin
        @testset "Felines" begin
            @test true
        end
        @testset "1.2" begin
            @test true
        end
    end
    @testset "1.2" begin
        @test true
    end
end

```

Console output:

```julia
Test Summary: | Pass Total
1. | 3 3
Test.DefaultTestSet("1.", Any[Test.DefaultTestSet("1.1", Any[Test.DefaultTestSet("Felines", Any[], 1, false, false), Test.DefaultTestSet("1.2", Any[], 1, false, false)], 0, false, false), Test.DefaultTestSet("1.2", Any[], 1, false, false)], 0, false, false)

```

I’m expecting output like this:

```julia
Test Summary: | Pass Total
1. | 3 3
1.1 | 1 1
1.2 | 1 1
1.2 | 1 1

```

---

<div class="post-metadata">

**Author:** ![rfourquet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rfourquet/32/3610_2.png) [@rfourquet](https://discourse.julialang.org/u/rfourquet)\
**Post date:** [March 15, 2021, 3:19pm UTC](https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198/2 "2021-03-15T15:19:39Z")

</div>

This is expected. By default, you get the detailed summary only if there was a failure. On Julia 1.6, you can pass the `verbose=true` argument to the outer `@testset` macro to get the output you expected, i.e. `@testset verbose=true "1." begin ...`

---

<div class="post-metadata">

**Author:** ![Michal](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michal](https://discourse.julialang.org/u/Michal)\
**Post date:** [March 15, 2021, 4:21pm UTC](https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198/3 "2021-03-15T16:21:23Z")

</div>

> [@rfourquet](#):
>
> verbose=true

Thank you so much. Solved.

---

<div class="post-metadata">

**Author:** ![Michal](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michal](https://discourse.julialang.org/u/Michal)\
**Post date:** [March 16, 2021, 12:50pm UTC](https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198/4 "2021-03-16T12:50:44Z")

</div>

I have one more question. Option verbose=true is what I wanted to see test summary results. Behind this “Test Summary” is another part, some kind of array “Test.DefaultTestSet”. How can I hide this?

---

<div class="post-metadata">

**Author:** ![rfourquet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rfourquet/32/3610_2.png) [@rfourquet](https://discourse.julialang.org/u/rfourquet)\
**Post date:** [March 16, 2021, 1:21pm UTC](https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198/5 "2021-03-16T13:21:29Z")

</div>

> [@Michal](#):
>
> Behind this “Test Summary” is another part, some kind of array “Test.DefaultTestSet”. How can I hide this?

I assume you are talking of the return value of the `@testset`, which you can hide by inserting `;` at the end of the expression (like for any other expression at the REPL).

---

<div class="post-metadata">

**Author:** ![Michal](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michal](https://discourse.julialang.org/u/Michal)\
**Post date:** [March 16, 2021, 4:28pm UTC](https://discourse.julialang.org/t/incorrect-console-output-for-nested-testset/57198/7 "2021-03-16T16:28:06Z")

</div>

Thank you. Solved
