# Rerun workflow from failed run only failure tests

**URL:** <https://discuss.circleci.com/t/rerun-workflow-from-failed-run-only-failure-tests/46994>\
**Category:** Running Tests\
**Created:** [February 7, 2023, 12:43pm UTC](https://discuss.circleci.com/t/rerun-workflow-from-failed-run-only-failure-tests/46994 "2023-02-07T12:43:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hagi.cohen](https://avatars.discourse-cdn.com/v4/letter/h/cc9497/32.png) [@hagi.cohen](https://discuss.circleci.com/u/hagi.cohen)\
**Post date:** [February 7, 2023, 12:43pm UTC](https://discuss.circleci.com/t/rerun-workflow-from-failed-run-only-failure-tests/46994/1 "2023-02-07T12:43:28Z")

</div>

I would like reduce duration of deploy by when clicking on “rerun workflow from failed” it will not run all tests again but only failed test.

How I can implement it?

---

<div class="post-metadata">

**Author:** ![rit1010](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rit1010/32/34738_2.png) [@rit1010](https://discuss.circleci.com/u/rit1010)\
**Post date:** [February 7, 2023, 7:26pm UTC](https://discuss.circleci.com/t/rerun-workflow-from-failed-run-only-failure-tests/46994/2 "2023-02-07T19:26:39Z")

</div>

This is something you would have to manage/track within your test code as CircleCI has no way to track the detail needed to automate a partial rerun.

One complication that someone else may have an answer for is that I do not know if CircleCI provides any indication that a job is being rerun rather than just run. The limited amount of work I have done regarding job rerunning has been based on the fact that all my jobs have a unique tag and so my scripts can make use of this as an ID.

---

<div class="post-metadata">

**Author:** ![sebastian-lerner](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sebastian-lerner/32/27833_2.png) [@sebastian-lerner](https://discuss.circleci.com/u/sebastian-lerner)\
**Post date:** [June 16, 2023, 12:35pm UTC](https://discuss.circleci.com/t/rerun-workflow-from-failed-run-only-failure-tests/46994/3 "2023-06-16T12:35:13Z")

</div>

@hagi.cohen [Re-run failed tests only (preview) - CircleCI](https://circleci.com/docs/rerun-failed-tests-only/)

---

<div class="post-metadata">

**Author:** ![hagi.cohen](https://avatars.discourse-cdn.com/v4/letter/h/cc9497/32.png) [@hagi.cohen](https://discuss.circleci.com/u/hagi.cohen)\
**Post date:** [June 16, 2023, 1:47pm UTC](https://discuss.circleci.com/t/rerun-workflow-from-failed-run-only-failure-tests/46994/4 "2023-06-16T13:47:44Z")

</div>

thank you, I already implanted it by myself, clicking on rerun workflow from failed I check automatically if last test failed and run only class failed.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [July 12, 2023, 7:19pm UTC](https://discuss.circleci.com/t/rerun-workflow-from-failed-run-only-failure-tests/46994/5 "2023-07-12T19:19:25Z")

</div>

Closed on July 12, 2023, 7:19pm UTC

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