# Is there a way to test individual \`jldoctests\`?

**URL:** <https://discourse.julialang.org/t/is-there-a-way-to-test-individual-jldoctests/49930>\
**Category:** General Usage\
**Created:** [November 10, 2020, 6:27pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-test-individual-jldoctests/49930 "2020-11-10T18:27:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [November 10, 2020, 6:27pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-test-individual-jldoctests/49930/1 "2020-11-10T18:27:47Z")

</div>

I am using Documenter.jl for the first time and my attempts at using `jldoctest` aren’t very good. There are a lot of failures.

It would be nice to debug these failures one by one, say

````julia
"""
    foo(x)

Returns 1

```jldoctest
julia> foo("a")
1
```
"""
foo(x) = 2

````

How is there some way to use jldoctest to debug failures like the above?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [November 10, 2020, 6:30pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-test-individual-jldoctests/49930/2 "2020-11-10T18:30:52Z")

</div>

Copy-paste it to the REPL?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [November 10, 2020, 6:34pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-test-individual-jldoctests/49930/3 "2020-11-10T18:34:10Z")

</div>

yup…

Also don’t use random number generators if they aren’t absolutely necessary.
