Skip to content

Conversation

@hi-rai
Copy link
Contributor

@hi-rai hi-rai commented Dec 29, 2025

@hi-rai hi-rai self-assigned this Dec 29, 2025
@hi-rai hi-rai changed the title Add support for creating test cases Add time tracking information to uploaded results Dec 29, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @hi-rai, 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 reporting system by introducing support for capturing and processing the execution duration (timeTaken) of individual test cases. While the PR title suggests adding support for creating test cases, the actual changes focus on integrating test duration data from JUnit XML and Playwright JSON reports into the existing data structures and API. This allows for more comprehensive test result analysis, including performance metrics.

Highlights

  • API and Data Model Update: The CreateResultsRequestItem interface in src/api/schemas.ts and the TestCaseResult interface in src/utils/result-upload/types.ts have been updated to include a timeTaken field, representing the test execution duration in milliseconds.
  • JUnit XML Parsing Enhancement: The junitXmlParser.ts now extracts the time attribute from <testcase> elements in JUnit XML reports, converts it to milliseconds, and populates the timeTaken field.
  • Playwright JSON Parsing Enhancement: The playwrightJsonParser.ts has been updated to parse the duration field from Playwright JSON results and map it to the timeTaken field. The internal schema for Playwright results was also updated to include duration.
  • Result Uploader Integration: The ResultUploader.ts now includes the timeTaken value when constructing the CreateResultsRequestItem objects for API submission.
  • Test Fixtures and Unit Tests: Numerous Playwright JSON test fixtures (src/tests/fixtures/playwright-json/*.json) were updated to include duration values, and unit tests for both JUnit XML and Playwright JSON parsing were extended to validate the correct extraction and mapping of the timeTaken field.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 successfully adds time tracking information to uploaded test results, with changes across schema definitions, parsers for JUnit and Playwright formats, the result uploader, and corresponding tests. However, I've identified a recurring issue in both the JUnit and Playwright parsers where a test duration of 0 is incorrectly converted to null because 0 is a falsy value in JavaScript. This affects data correctness and should be addressed. I've also pointed out the tests that validate this incorrect behavior, which will need to be updated along with the parser logic.

Copy link
Contributor

@AndrianBdn AndrianBdn left a comment

Choose a reason for hiding this comment

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

Thanks @hi-rai - looks good to me.

@hi-rai hi-rai changed the base branch from dev/himanshu/create-tcase-flag to main December 30, 2025 12:29
@hi-rai hi-rai force-pushed the dev/himanshu/time-tracking branch from 023791e to eb3e8dc Compare December 30, 2025 12:29
@hi-rai
Copy link
Contributor Author

hi-rai commented Dec 30, 2025

/gemini review

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 successfully adds time tracking information to uploaded test results. The changes are well-implemented across the board, from the API schema update in src/api/schemas.ts to the TestCaseResult type definition. The parsers for both JUnit XML and Playwright JSON have been correctly updated to extract test duration, with robust handling for different formats and potential missing values in junitXmlParser.ts. The ResultUploader is properly modified to include this new data in the payload. Furthermore, the test files and fixtures have been comprehensively updated to ensure the new functionality is well-tested. The code quality is high, and no issues were found.

@hi-rai hi-rai merged commit fca4004 into main Dec 30, 2025
1 check passed
@hi-rai hi-rai deleted the dev/himanshu/time-tracking branch December 30, 2025 12:33
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.

4 participants