Skip to content

Conversation

@AndrianBdn
Copy link
Contributor

Some users are adding tests gradually and they see a lot of unmatched tests. Normally they result a failure; which could be overridden with "force". However "force" sounds a bit scary and it still leaves lot of noise in logs.

Hence this PR introduces separate flag for ignoring unmatched test cases, when uploading reports.

I've also took chance to slightly refactor some areas, by using early exists and moving console messages to separate functions.

Adds --ignore-unmatched option that shows only a summary (e.g. 'Skipped 2 unmatched tests') instead of individual error messages for unmatched tests. Useful during gradual test case library migration to reduce CI log noise.
Refactored extractTestCaseRefs() with shouldFailOnInvalid flag and early returns for better readability.
@gemini-code-assist
Copy link

Summary of Changes

Hello @AndrianBdn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the test result upload functionality by introducing a new --ignore-unmatched flag. This flag provides a more user-friendly way to handle test reports containing unlinked test cases, particularly useful for users who are gradually integrating their tests. Instead of failing or displaying verbose errors for each unmatched test, the CLI will now offer a concise summary, reducing log noise and improving the overall upload experience. Additionally, the internal code responsible for handling result uploads has been refactored for better structure and clarity.

Highlights

  • New --ignore-unmatched flag: Introduced a new command-line flag --ignore-unmatched for junit-upload and playwright-json-upload commands. This flag allows users to suppress individual error messages for unmatched test cases, instead showing only a summary of skipped tests.
  • Improved Error Handling for Unmatched Tests: The logic for handling unmatched test cases during report uploads has been refined. When --ignore-unmatched is used, the CLI will no longer exit with a failure for each unmatched test, providing a smoother experience for gradual test linking.
  • Code Refactoring: The ResultUploader class has been refactored to improve readability and maintainability. This includes using early exits and separating console message functions into distinct private methods for better modularity.
  • Version Update: The package version has been incremented from 0.4.0 to 0.4.1 in package.json.
  • New Test Case: A new test case has been added to result-upload.spec.ts to ensure the --ignore-unmatched functionality works as expected.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the --ignore-unmatched flag, a valuable feature for users gradually integrating their tests. The implementation is robust, complete with updated documentation and new tests ensuring the feature's correctness. The refactoring within ResultUploader.ts is a notable improvement, enhancing code readability and maintainability by decomposing a large method into smaller, single-responsibility functions. The logic correctly handles the new flag for both creating new test runs and updating existing ones. Overall, this is a high-quality contribution.

@AndrianBdn AndrianBdn added the publish Publish to NPM label Nov 6, 2025
@AndrianBdn AndrianBdn merged commit d08d7bf into main Nov 6, 2025
1 check passed
@AndrianBdn AndrianBdn deleted the andrian/unmatched-behavior-202511031221 branch November 6, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish Publish to NPM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants