Skip to content

Exit with code 1 when tests fail (for CI purposes) #49

Closed

Description

@ke1Del

Hi guys

In order to use codeceptjs for Continuous Integration, it needs to exit with code 1 when the tests fail. Unfortunately at this point it always exits with code 0 whether the tests pass or fail, thus CI assumes the tests are always successful. This makes codeceptjs useless for CI purposes unfortunately.

I'm using codeceptjs 0.2.4 with webdriverIO and chrome.

A possible solution would be to add process.exit(1); at the end of the tests if tests failed. I see that an event is emitted when the tests end (event.dispatcher.emit(event.all.result, this);) so maybe this could be done with a listener?

Best regards

Activity

  1. DavertMik commented on Jan 26, 2016

    @DavertMik
    Contributor

    Thanks. This must be implemented

  2. added a commit that references this issue on Jan 26, 2016
    468b331
  3. trikonasana commented on Apr 4, 2016

    @trikonasana

    Hi,

    with 0.3.3 thus issue was reintroduced.

    Best regrads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions