Skip to content
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

feat: add helper function to generate unique case name #539

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

nanjingfm
Copy link
Contributor

@nanjingfm nanjingfm commented Feb 28, 2024

ginkgo 生成的 junit 报告中的 case 名称包含了用例的描述,所以要定义个特殊的格式来识别唯一名称。

现在代码中定义的格式是 {case:the-real-unique-case-name},如 {case:GetProject}

<?xml version="1.0" encoding="UTF-8"?>
  <testsuites tests="9" disabled="0" errors="0" failures="0" time="0.000668">
      <testsuite name="integrations-e2e" package="/Users/xx/code/katanomi/integrations/test/e2e" tests="9" disabled="0" skipped="0" errors="0" failures="0" time="0.000668" timestamp="2024-02-28T19:21:23">
          <testcase name="[SynchronizedBeforeSuite]" classname="integrations-e2e" status="passed" time="0"></testcase>
          <testcase name="[It] [P1][ClusterIntegrationSyncPeriod] when Manual-Private-two-ns should change status from ready to not ready [{case:GetProject}, controller, integration]" classname="integrations-e2e" status="passed" time="0"></testcase>
          <testcase name="[SynchronizedAfterSuite]" classname="integrations-e2e" status="passed" time="0"></testcase>
      </testsuite>
  </testsuites>

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • spec PR link included
  • Follows the commit message standard
  • Meets the contributing guidelines (including
    functionality, content, code)
  • Test cases with documentation and functionality works as expected using current and related github repos (MUST deploy and check)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

chengjingtao
chengjingtao previously approved these changes Feb 29, 2024
chengjingtao
chengjingtao previously approved these changes Feb 29, 2024
@nanjingfm nanjingfm merged commit 1658127 into main Feb 29, 2024
2 checks passed
@nanjingfm nanjingfm deleted the feat/test-case-name branch February 29, 2024 09:42
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