CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

Run-rerun on version 3

Open ipapagia opened this issue 5 years ago • 16 comments

After upgrading to 3.0.1, I am trying to use the command run-rerun introduced in 2.4.

The functionality is not available.

$ npx codeceptjs run-rerun

Unknown command run-rerun

Details

  • CodeceptJS version: 3.0.1
  • NodeJS Version:
  • Operating System:
  • puppeteer || webdriverio || protractor || testcafe version (if related)
  • Configuration file:
# paste config here

ipapagia avatar Nov 11 '20 21:11 ipapagia

Same issue here.

I see that run-rerun definition is present in master branch https://github.com/codeceptjs/CodeceptJS/blob/master/bin/codecept.js#L122-L157

But it's missing in 3.x, from what latest releases are made. It was removed with this commit https://github.com/codeceptjs/CodeceptJS/commit/03c5c910272b8a2cd2aefe29d279c35511c97856#diff-dbf7fdf7b53c931c00e8c6103a0f8843d92161657ae66613f6659415f9ac85d8 by @DavertMik

@DavertMik was it intentional? :) Can I PR to put it back?

artvinn avatar Nov 12 '20 14:11 artvinn

Yep, can confirm as well, would be great to have this feature back :) it was really go to find flakiness :)

manciukass avatar Nov 12 '20 15:11 manciukass

facing the same problem myself, should we revert to the old version to support it?

hammadebot avatar Dec 04 '20 23:12 hammadebot

It's still in docs: https://codecept.io/commands/#run-rerun , so I guess that feature was not removed intentionally.

mirao avatar Dec 18 '20 13:12 mirao

Any chance to get a response from the authors of the aforementioned commit? @DavertMik @pablopaul

danielrentz avatar Feb 10 '21 08:02 danielrentz

Voting for this feature back

jancorvus avatar Feb 26 '21 08:02 jancorvus

Hi, I just wanna up this topic, because it still actual

Tir0ck avatar Jun 18 '21 08:06 Tir0ck

when will it come back? Anybody know? :)

eduardofinotti-james avatar Jul 07 '21 13:07 eduardofinotti-james

I would also like to know when is it coming back, my project needs to deal with some flaky tests

khushal-sahni avatar Jul 09 '21 06:07 khushal-sahni

@PeterNgTr this feature is very much needed. Can someone help in this matter?

AllysonYuShiong avatar Aug 05 '21 06:08 AllysonYuShiong

I see that there are still parts of the rerun code left in the current 3.x branch. Maybe it's possible to integrate the rerun config into the standard run command: When rerun: {} config is present, it will be used. Otherwise, the test runs once.

stracker-phil avatar Aug 15 '21 21:08 stracker-phil

I am also facing the same issue. Any chance to get this feature back.

VinnyIla avatar Aug 19 '21 14:08 VinnyIla

@DavertMik Just ran into this myself with v3.2.2 - been almost a year with no reply or fix?

jimpriest avatar Dec 17 '21 16:12 jimpriest

Sorry, no one has implemented this command yet

DavertMik avatar Dec 17 '21 16:12 DavertMik

I see. Should I remove it from the docs? According to comments above and in the docs it was in 2.4 but removed from 3?

jimpriest avatar Dec 17 '21 16:12 jimpriest

After spending a good 30 minutes trying to work out what I was doing wrong, I strongly agree with removing it from the docs until the feature is re-added. There should also be a section about it in the breaking changes/migration notes

mc-alt avatar Mar 08 '22 03:03 mc-alt

hi @dwentland24 , I have a question for re-run command, it is only run one by one , not like run-workers or run-multiple, right?

cherrieg avatar Oct 09 '22 07:10 cherrieg

Just tested it with CodeceptJS 3.3.6 and it works as expected (in my case 2/25 runs failed). However when a last test iteration finishes, the CodeceptJS process isn't closed (even if I wait for long time) and I have to interrupt it over Ctrl + C. Is anybody seeing the same behavior?

$ codeceptjs run-rerun PlayDndGame_test.ts --profile jobr --debug
...
  OK  | 23 passed   // 1m

Process run 25 of max 25, success runs 23/25


Flaky tests detected! 23 success runs achieved instead of 25 success runs expected

Error: 
    at CodeceptRerunner.runTests (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/rerun.js:60:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Command.module.exports (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/command/run-rerun.js:31:5)

^C
$ 

my config:

rerun: {
    // how many times all tests should pass
    minSuccess: 25,
    // how many times to try to rerun all tests
    maxReruns: 25,
},

mirao avatar Oct 13 '22 08:10 mirao

Same issue as above, process wont finish on its own.

MaticNezic avatar Nov 24 '22 08:11 MaticNezic