Skip to content

Conversation

cacieprins
Copy link
Contributor

Adds --posix-exit-codes flag, which disables exiting with the number of tests fail. This is preliminary to adding a custom (but compliant) exit code for terminal cloud API failures during recording or parallel runs.

See: cypress-io/cypress#32485

Copy link

cypress bot commented Sep 30, 2025

cypress-documentation    Run #699

Run Properties:  status check passed Passed #699  •  git commit f259c7c68c: Merge branch 'release/15.4.0' into feat/posix-exit-codes
Project cypress-documentation
Branch Review feat/posix-exit-codes
Run status status check passed Passed #699
Run duration 03m 56s
Commit git commit f259c7c68c: Merge branch 'release/15.4.0' into feat/posix-exit-codes
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 309
View all changes introduced in this branch ↗︎
UI Coverage  10.85%
  Untested elements 2483  
  Tested elements 3  
Accessibility  97.21%
  Failed rules  1 critical   3 serious   4 moderate   0 minor
  Failed elements 28  

@MikeMcC399

This comment was marked as resolved.

@cacieprins
Copy link
Contributor Author

Please add what the default exit code contains when the option --posix-exit-codes is not used. This does not appear to be documented anywhere that I could find.

This is the default behavior as described in the previous two paragraphs. We are considering whether or not to modify the default behavior to align to posix standards as a breaking change in a later release.

Comment on lines 443 to 450
#### `cypress run --posix-exit-codes` {#cypress-run-posix-exit-codes}
Exit with POSIX exit code of 1 when there are test failures or if Cypress could not run.
```shell
cypress run --posix-exit-codes
```
Copy link
Contributor

@MikeMcC399 MikeMcC399 Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe cross-link here to the section #Exit-code?

I completely missed this section when I glanced at the change 🤭

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Updated here 524b211

Comment on lines 636 to 640
...
```
```text
## print exit code on Mac or Linux
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...
```
```text
## print exit code on Mac or Linux
...
## print exit code on Mac or Linux

Merge into one code block like the other examples above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


## 15.4.0

_Released 9/30/2025_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_Released 9/30/2025_
_Released 10/7/2025_

| `--no-runner-ui` | [Hides the Cypress Runner UI](#cypress-run-no-runner-ui) |
| `--parallel` | [Run recorded specs in parallel across multiple machines](#cypress-run-parallel) |
| `--port`,`-p` | [Override default port](#cypress-run-port-lt-port-gt) |
| `--posix-exit-codes` | [Exit with a POSIX-compliant exit code](#cypress-run-posix-exit-codes) rather than the number of failed tests. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option needs to be added to the Module API doc: https://deploy-preview-6284--cypress-docs.netlify.app/app/references/module-api

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added here: e271a0a

@jennifer-shehane jennifer-shehane self-requested a review October 6, 2025 14:34
@jennifer-shehane jennifer-shehane merged commit 08024c9 into release/15.4.0 Oct 6, 2025
11 checks passed
@jennifer-shehane jennifer-shehane deleted the feat/posix-exit-codes branch October 6, 2025 16:40
AtofStryker added a commit that referenced this pull request Oct 7, 2025
* remove experimentalStudio flag (#6283)

* docs: adds --posix-exit-codes cli flag for run mode (#6284)

* adds --posix-exit-codes cli flag for run mode

* add history entry

* clarify option/description table for --posix-exit-codes

* expand docs on posix exit codes

* prettify bash block

* fix changelog link

* formatting

* Add posixExitCodes to module API page

* changelog

* lint fix

---------

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* cy.prompt docs (#6270)

* docs: begin writing cy.prompt docs

* Iterate on wording

* lint

* Fix links + improve TOC

* Fix some css warnings

* update dynamic variable examples

* lint fix

* update areas based on feedback

* lint

* Add more examples to prompt docs

* lint fix

* Add Gherkin examples

* lint fix

* Add another Gherkin example

* lint fix

* update some styles to make more space in UI

* Update yields of prompt

* Update language support

* Remove trigger from officially supported 'things to do'

* lint

* Add not.exist assertions not being supported

* expand documented assertion types

* Updates for placeholders

* update docs

* add to TOC

* fix loop example.

* Update docs/api/commands/prompt.mdx

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>

* Update docs/api/commands/prompt.mdx

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>

* Some wording updates

* Update docs/api/commands/prompt.mdx

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>

* lint

* fix broken links

---------

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>

* chore: add 15.4.0 changelog (#6292)

* chore: fix headers (#6293)

---------

Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants