Skip to content

Conversation

@Syffe
Copy link
Contributor

@Syffe Syffe commented Oct 15, 2025

In some cases, the classname can be equal to the test_case_name, which leads us to create a test_name with double identical values concatenated. To avoid this, we introduced a new clause.

Fixes MRGFY-5937

Copilot AI review requested due to automatic review settings October 15, 2025 13:50
@mergify mergify bot requested a deployment to Mergify Merge Protections October 15, 2025 13:50 In progress
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the JUnit processing logic to prevent duplicate test names when the classname equals the test case name. This addresses cases like Cypress component failures where both values are identical.

Key Changes:

  • Added logic to check if classname matches test_case_name before concatenating them
  • Modified separator from "." to ". " (dot-space) for better readability
  • Extracted test_case_name into a variable for reuse

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mergify
Copy link
Contributor

mergify bot commented Oct 15, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 👀 Review Requirements

This rule is failing.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = renovate[bot]

🔴 🔎 Reviews

This rule is failing.
  • #review-requested = 0
  • #review-threads-unresolved = 0
  • #changes-requested-reviews-by = 0

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=test (macos-15)
    • check-success=test (ubuntu-24.04)
    • check-success=test (windows-2025)

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 13:51 Failure
@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 13:52 Failure
@mergify
Copy link
Contributor

mergify bot commented Oct 15, 2025

🧪 CI Insights

Here's what we observed from your CI run for 5fb8bf9.

🟢 All jobs passed!

But CI Insights is watching 👀

@mergify mergify bot requested a review from a team October 15, 2025 13:54
sileht
sileht previously requested changes Oct 15, 2025
Copy link
Member

@sileht sileht left a comment

Choose a reason for hiding this comment

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

I don't think it's a good move.

If the tool that creates a Junit file with the same classname and test_name, we should just keep it as-is. You can't know if that was on purpose or not.

If the reporting is not good due to this it's not a big deal.

@sileht
Copy link
Member

sileht commented Oct 15, 2025

I don't think it's a good move.

If the tool that creates a Junit file with the same classname and test_name, we should just keep it as-is. You can't know if that was on purpose or not.

If the reporting is not good due to this it's not a big deal.

As example, this is totally legit and should be reported as TestFooBar::TestFooBar when the code looks like:

class TestFooBar:
     def TestFoobar():
            ...

@Syffe
Copy link
Contributor Author

Syffe commented Oct 15, 2025

I don't think it's a good move.

If the tool that creates a Junit file with the same classname and test_name, we should just keep it as-is. You can't know if that was on purpose or not.

If the reporting is not good due to this it's not a big deal.

indeed, I agree, then we should just close this ticket I guess

The issue here was that we hit a specific error generated on cypress components, which led to this case, I think it's proper to how cypress works and we can't do anything more upstream to fix this

Let's close the ticket, agreed ?

@sileht
Copy link
Member

sileht commented Oct 15, 2025

I don't think it's a good move.
If the tool that creates a Junit file with the same classname and test_name, we should just keep it as-is. You can't know if that was on purpose or not.
If the reporting is not good due to this it's not a big deal.

indeed, then we should just close this ticket I guess

The issue here was that we hit a specific error generated on cypress components, which led to this case, I think it's proper to how cypress works and we can't do anything more upstream to fix this

Let's close the ticket, agreed ?

Yes

@mergify mergify bot dismissed sileht’s stale review October 15, 2025 14:37

Pull request has been modified.

@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 14:37 Failure
@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 14:42 Failure
@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 14:44 Failure
@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 14:57 Failure
@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 15:04 Failure
jd
jd previously approved these changes Oct 15, 2025
@mergify mergify bot dismissed jd’s stale review October 15, 2025 15:21

Pull request has been modified.

@mergify mergify bot had a problem deploying to Mergify Merge Protections October 15, 2025 15:21 Failure
@mergify mergify bot requested a review from a team October 15, 2025 15:23
@mergify mergify bot requested a review from a team October 15, 2025 17:10
@mergify mergify bot had a problem deploying to Mergify Merge Protections October 16, 2025 08:20 Failure
…ned list

We needed a more spaced reporting for the test lists in order
to prevent confusion. We now report the class and test name separately for better clarity.

Fixes MRGFY-5937
@mergify mergify bot had a problem deploying to Mergify Merge Protections October 16, 2025 08:38 Failure
@mergify mergify bot requested a review from a team October 16, 2025 08:42
for qt_span in quarantined_tests_spans:
click.echo(f" · {qt_span.name}")
if qt_span.attributes is not None:
generate_test_report(
Copy link
Member

Choose a reason for hiding this comment

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

You should pass directly qt_span.attributes and handle the if None and cast there to avoid repeating the code.

@mergify mergify bot requested a review from a team October 16, 2025 08:43
@jd
Copy link
Member

jd commented Oct 16, 2025

We're not going into that direction as it means the output would be too much different from what we report in the frontend.

@jd jd closed this Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants