Skip to content

Add more queries #76

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Add more queries #76

wants to merge 13 commits into from

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jun 1, 2025

🤔 What's changed?

  • Added several new methods to find pickles, testcases, test cast started and test steps by TestStepStarted events.
  • Made lineage API public.

⚡️ What's your motivation?

Convert the TeamCity plugin to the message protocol (cucumber/cucumber-jvm#3007). Unlike the JUnit XML formatter this plugin also responds to test steps and so needs queries that involve test steps.

The plugin also needs to transform the elements in the pickle tree to something more complex then a name so the lineage api is made public.

🏷️ What kind of change is this?

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

♻️ Anything particular you want feedback on?

Updating the API section in the README is getting quite cumbersome. Do we want to keep doing that?

📋 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 changed the title Feature/add more queries Add more queries Jun 1, 2025
@mpkorstanje mpkorstanje force-pushed the feature/add-more-queries branch from 3502809 to 1b18f3f Compare June 5, 2025 14:42
@mpkorstanje mpkorstanje requested a review from davidjgoss June 6, 2025 18:57
@davidjgoss
Copy link
Contributor

davidjgoss commented Jun 6, 2025

re the subject being TestStepStarted in most of these, by contrast in the few cases on existing methods where a test step at execution time is involved, it's TestStepFinished. Those make sense as they're generally in the area of results or attachments where it only makes sense once the step has finished. Are the use cases for these new methods particular to the step starting i.e. finishing is too late?

(I don't think it's a problem, I'm more curious than anything.)

@davidjgoss
Copy link
Contributor

Updating the API section in the README is getting quite cumbersome. Do we want to keep doing that?

I think we should stop, and provide nice readable/searchable documentation instead. The commonality across platforms is important for us, but for end users? "Give me docs for the one I need." We can add e.g. typedoc for the JS package.

@mpkorstanje
Copy link
Contributor Author

mpkorstanje commented Jun 6, 2025

re the subject being TestStepStarted in most of these, by contrast in the few cases on existing methods where a test step at execution time is involved, it's TestStepFinished. Those make sense as they're generally in the area of results or attachments where it only makes sense once the step has finished. Are the use cases for these new methods particular to the step starting i.e. finishing is too late?

The TeamCityPlugin interleaves Service Messages into standard output and then builds a hierarchy about that:

image

Each step node of the tree is started by writing a testStarted message and ended by writing a testFinished message. Hence the need to find things when step starts.

@mpkorstanje
Copy link
Contributor Author

I think we should stop, and provide nice readable/searchable documentation instead. The commonality across platforms is important for us, but for end users? "Give me docs for the one I need." We can add e.g. typedoc for the JS package.

I'll do that for the Java implementation.

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