# Test code for previous step after submitting

**URL:** <https://forum.codecrafters.io/t/test-code-for-previous-step-after-submitting/14643>\
**Category:** General\
**Tags:** challenge:redis\
**Created:** [August 10, 2025, 12:55pm UTC](https://forum.codecrafters.io/t/test-code-for-previous-step-after-submitting/14643 "2025-08-10T12:55:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ApurvR20](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/apurvr20/32/14348_2.png) [@ApurvR20](https://forum.codecrafters.io/u/ApurvR20)\
**Post date:** [August 10, 2025, 12:55pm UTC](https://forum.codecrafters.io/t/test-code-for-previous-step-after-submitting/14643/1 "2025-08-10T12:55:32Z")

</div>

I completed a step in the course, and submitted it. Later, I reorganized the code for readability. Is there any way to test for the previous step, before moving onto next one? My understanding is that code can only be tested for the current one, not the previous steps.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [August 12, 2025, 9:21am UTC](https://forum.codecrafters.io/t/test-code-for-previous-step-after-submitting/14643/4 "2025-08-12T09:21:15Z")

</div>

Hey @ApurvR20, you can re-run previous tests using [our CLI](https://docs.codecrafters.io/cli/installation):

```auto
codecrafters test --previous

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [August 17, 2025, 9:21am UTC](https://forum.codecrafters.io/t/test-code-for-previous-step-after-submitting/14643/6 "2025-08-17T09:21:34Z")

</div>

Closed on August 17, 2025, 9:21am UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
