Skip to content

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jun 20, 2025

🤔 What's changed?

Adds several new methods to find all instances of a message:

  • findAllTestCaseFinished()
  • findAllTestCases()
  • findAllTestStepsStarted()
  • findAllTestStepsFinished()

Adds several new methods to find messages by TestCaseFinished:

  • findMostSevereTestStepResultBy(TestCaseFinished)
  • findPickleBy(TestCaseFinished)
  • findPickleBy(TestCaseFinished)
  • findTestCaseStartedBy(TestCaseFinished)
  • findTestStepsFinishedBy(TestCaseFinished)

Adds several new methods to find messages by TestStepFinished:

  • findTestCaseBy(TestStepFinished)
  • findTestCaseDurationBy(TestStepFinished)
  • findTestCaseStartedBy(TestStepFinished)

⚡️ What's your motivation?

The Query object makes it possible to walk the relationships in the Cucumber messages. Adding these methods implements a more complete set of possible operations.

Most of these messages already had a {TestCase, TestStep}Started equivalent. The Finished variation is useful when trying to find (for example) Pickles in response to a {TestCase, TestStep}Finished message.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

@mpkorstanje mpkorstanje force-pushed the feature/add-more-queries-v2 branch from d739d6d to 7d010bc Compare September 4, 2025 16:08
@mpkorstanje mpkorstanje marked this pull request as ready for review September 4, 2025 17:36
@mpkorstanje mpkorstanje merged commit 86b2c30 into main Sep 4, 2025
9 checks passed
@mpkorstanje mpkorstanje deleted the feature/add-more-queries-v2 branch September 4, 2025 19:02
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.

2 participants