# How to run all DocTests within a Package?

**URL:** <https://forum.modular.com/t/how-to-run-all-doctests-within-a-package/1089>\
**Category:** Mojo\
**Tags:** discussion\
**Created:** [March 20, 2025, 11:04pm UTC](https://forum.modular.com/t/how-to-run-all-doctests-within-a-package/1089 "2025-03-20T23:04:17Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Caroline](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/caroline/32/8_2.png) [@Caroline](https://forum.modular.com/u/Caroline)\
**Post date:** [March 29, 2025, 3:42am UTC](https://forum.modular.com/t/how-to-run-all-doctests-within-a-package/1089/6 "2025-03-29T03:42:31Z")

</div>

Hi @Samuel,

Apologies for the delayed response! This behavior is a result of the fact that we’re in the process of [deprecating the Mojo REPL](https://forum.modular.com/t/mojo-repl-deprecation/1158). Docstring tests were previously executed via the REPL. Going forward, we recommend instead [setting up a dedicated testing environment and a `test` action with Magic](https://docs.modular.com/max/tutorials/magic/#step-6-setup-a-test-environment) and using `magic run test.` We’d also recommend checking out [the Mojo standard library test files](https://github.com/modular/max/tree/main/mojo/stdlib/test) and [MAX examples](https://github.com/modular/max/tree/main/examples) for examples of how we recommend structuring tests.

---

_[View the full topic](https://forum.modular.com/t/how-to-run-all-doctests-within-a-package/1089)._
