Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch and report unexpected exceptions #1701

Open
robstoll opened this issue Feb 4, 2024 · 0 comments
Open

catch and report unexpected exceptions #1701

robstoll opened this issue Feb 4, 2024 · 0 comments
Assignees

Comments

@robstoll
Copy link
Owner

robstoll commented Feb 4, 2024

Platform (all, jvm, js): all
Extension (none, kotlin 1.3): none

Code related feature

Currently, we only catch unexpected exceptions in:

  • feature extractors
  • Function0.toThrow/notToThrow

But we especially don't do it in:

  • ExpectGrouping-block
  • groups
  • expectation-groups
  • subject changer
  • _logicAppend

Which means we:

  • fail fast
  • might miss to evaluate further expectations
  • won't be able to report anything about already evaluated expectations or give more context

For instance:

expectGrouped {
   group("foo") {

      // one expectation fails
   }

  group("bar") {
    // throws unexpected exception
  }

  group("baz"){
    // no longer evaluated
  }
}

The result will be that we only see that an IllegalStateException was thrown and not a single report of Atrium

Relates to 387

@robstoll robstoll self-assigned this Feb 4, 2024
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

No branches or pull requests

1 participant