Skip to content

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.

@davidjgoss davidjgoss force-pushed the feature/add-more-queries branch from fcc3e23 to 412ef9a Compare June 7, 2025 08:59
@davidjgoss davidjgoss marked this pull request as ready for review June 7, 2025 11:15
@mpkorstanje mpkorstanje merged commit 9d09898 into main Jun 10, 2025
9 checks passed
@mpkorstanje mpkorstanje deleted the feature/add-more-queries branch June 10, 2025 12:26
mpkorstanje added a commit that referenced this pull request Jul 9, 2025
In #76 Lineage became part of the public API. This removes the need for
various queries that depend on the lineage or the lineage reducer.

To ensure test coverage remains the `NamingStrategyAcceptanceTest` was
added.

Fixes: #82.
@mpkorstanje mpkorstanje mentioned this pull request Jul 9, 2025
7 tasks
mpkorstanje added a commit that referenced this pull request Sep 10, 2025
In #76 Lineage became part of the public API. This removes the need for
various queries that depend on the lineage or the lineage reducer.

To ensure test coverage remains the `NamingStrategyAcceptanceTest` was
added.

Fixes: #82.
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.

3 participants