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

[AI Test Tool] Add Multi-Turn Accuracy & Export #2419

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stkillen
Copy link
Contributor

@stkillen stkillen commented Nov 28, 2024

Summary

This PR adds multi-turn accuracy for tests and export option for results.

Accuracy is automatically calculated as the number of turns succeeded / the total number of turns. Accuracy is available on Suite level, codeunit level and test level.

Accuracy can also be set by the test manually, using the new SetAccuracy function in the AIT Test Context.

Export of results is available on the Log Entries page (exports current view) or Suite (exports results for latest version)

Work Item(s)

Fixes AB#557118

@stkillen stkillen requested a review from a team as a code owner November 28, 2024 15:42
@github-actions github-actions bot added this to the Version 26.0 milestone Nov 28, 2024
/// <summary>
/// Gets the accuracy of the test.
/// </summary>
/// <returns>True if the accuracy was set, false otherwise.</returns>
Copy link
Contributor

@t-prda t-prda Nov 29, 2024

Choose a reason for hiding this comment

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

missing parameter doc for AccuracyPct

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not clear that this function returns accuracy only when it is being set manually.

@@ -155,7 +185,7 @@ codeunit 149043 "AIT Test Context Impl."
if not IsMultiTurn then
exit(false);

if CurrentTurn + 1 > NumberOfTurns then
Copy link
Contributor

@t-prda t-prda Nov 29, 2024

Choose a reason for hiding this comment

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

This change may cause regression. Have you tested against some of our existing multi-turn scenarios? Just to be 100% sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can see CurrentTurn is now starts with 1.

@@ -68,6 +68,23 @@ page 149033 "AIT Log Entries"
{
StyleExpr = StatusStyleExpr;
}
field(Accuracy; Rec.Accuracy)
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to expose these in the API as well

Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to create a separate work item, we can uptake the API changes in the same work item.

{
Caption = 'Export Results';
Image = Export;
ToolTip = 'Exports the results.';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you provide a better tool tip. It might be confusing with the existing action of download test output.

field(45; Accuracy; Decimal)
{
Caption = 'Accuracy';
ToolTip = 'Specifies the accuracy of the test line.';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider describing how the accuracy can be calculated or what does it exactly mean. Considering we have a status field as well.

ApplicationArea = All;
UsageCategory = Tasks;
DefaultLayout = Excel;
ExcelLayout = 'Results.xlsx';
Copy link
Contributor

Choose a reason for hiding this comment

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

consider using a better name for the layout

}
field(TurnsText; TurnsText)
{
Visible = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have this visible?

field(45; Accuracy; Decimal)
{
Caption = 'Accuracy';
ToolTip = 'Specifies the average accuracy of the test line.';
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we explain in the tooltip how the accuracy is calculated? As it will not be a straightforward calculation of Sum(Numer of succsful turn)/Sum(number of turns)

ResultsInStream: InStream;
Filename: Text;
begin
Filename := ResultsFileNameLbl;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider using the file name based on the suitename_version_result.xlsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants