Skip to content

[Impacted Area Based PR testing] Fix script timing with recent test plans#16437

Merged
wangxin merged 2 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/fix_get_time_error
Jan 13, 2025
Merged

[Impacted Area Based PR testing] Fix script timing with recent test plans#16437
wangxin merged 2 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/fix_get_time_error

Conversation

@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor

Description of PR

In the previous implementation, we retrieved 5 test case entries from Kusto to calculate the total running time of a script. However, the query included the condition | where FilePath == '{script}', and since each script may contain multiple test cases, this approach only sampled 5 random test cases from the script. As a result, the calculated average running time was inaccurate. In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
    • Add ownership here(Microsft required only)
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

In the previous implementation, we retrieved 5 test case entries from Kusto to calculate the total running time of a script. However, the query included the condition | where FilePath == '{script}', and since each script may contain multiple test cases, this approach only sampled 5 random test cases from the script. As a result, the calculated average running time was inaccurate. In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.

How did you do it?

In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yutongzhang-microsoft yutongzhang-microsoft changed the title [Impacted Area Based PR testing] Fix get time error [Impacted Area Based PR testing] Fix script timing with recent test plans Jan 10, 2025
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit d533ae3 into sonic-net:master Jan 13, 2025
@yutongzhang-microsoft yutongzhang-microsoft deleted the yutongzhang/fix_get_time_error branch January 13, 2025 01:30
wangxin pushed a commit that referenced this pull request Jan 14, 2025
…est scripts. (#16487)

What is the motivation for this PR?
In PR #16437, we addressed the script timing issue by selecting the five most recent test plans. However, this caused an incorrect ActualCount, as it was summarizing the number of test cases instead of the test scripts. Since the number of test scripts matches the number of test plans, this PR updates the query to correctly count the test plans.

How did you do it?
Since the number of test scripts matches the number of test plans, this PR updates the query to correctly count the test plans.
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
…plans (sonic-net#16437)

What is the motivation for this PR?
In the previous implementation, we retrieved 5 test case entries from Kusto to calculate the total running time of a script. However, the query included the condition | where FilePath == '{script}', and since each script may contain multiple test cases, this approach only sampled 5 random test cases from the script. As a result, the calculated average running time was inaccurate. In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.

How did you do it?
In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
…est scripts. (sonic-net#16487)

What is the motivation for this PR?
In PR sonic-net#16437, we addressed the script timing issue by selecting the five most recent test plans. However, this caused an incorrect ActualCount, as it was summarizing the number of test cases instead of the test scripts. Since the number of test scripts matches the number of test plans, this PR updates the query to correctly count the test plans.

How did you do it?
Since the number of test scripts matches the number of test plans, this PR updates the query to correctly count the test plans.
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