# Unit testing iterators

**URL:** <https://discourse.julialang.org/t/unit-testing-iterators/135078>\
**Category:** General Usage\
**Tags:** question, testing\
**Created:** [January 15, 2026, 1:49pm UTC](https://discourse.julialang.org/t/unit-testing-iterators/135078 "2026-01-15T13:49:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 15, 2026, 1:49pm UTC](https://discourse.julialang.org/t/unit-testing-iterators/135078/1 "2026-01-15T13:49:12Z")

</div>

Is there a package to test that a type implements the [iteration interface](https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-iteration) correctly?

Just some basic sanity checks, eg if get the size/eltype traits, check that they are consistent, compare repeatedly calling `iterate` until `nothing` with `length`, where applicable, etc.

I recall

> **[GitHub - oxinabox/InterfaceTesting.jl: (Julia 0.5 only) Concept still good, but needs...](https://github.com/oxinabox/InterfaceTesting.jl)**
>
> (Julia 0.5 only) Concept still good, but needs updating for julia 1.0

but it seems to be abandoned.

Asking because I end up typing the same boilerplate code when I test my iterator implementations.
