Skip to content

Commit

Permalink
Code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stkillen committed Jan 27, 2025
1 parent 71ae9fe commit 73c359d
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
Binary file added src/Tools/AI Test Toolkit/AITestSummary.xlsx
Binary file not shown.
Binary file removed src/Tools/AI Test Toolkit/Results.xlsx
Binary file not shown.
5 changes: 3 additions & 2 deletions src/Tools/AI Test Toolkit/src/AITTestContextImpl.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ codeunit 149043 "AIT Test Context Impl."
end;

/// <summary>
/// Gets the accuracy of the test.
/// Gets the accuracy of the test. Can only be retrieved if the accuracy of the test was already set manually.
/// </summary>
/// <returns>True if the accuracy was set, false otherwise.</returns>
/// <param name="AccuracyPct">The accuracy as a decimal between 0 and 1.</param>
/// <returns>True if it was possible to get the accuracy, false otherwise.</returns>
procedure GetAccuracy(var AccuracyPct: Decimal): Boolean
begin
if AccuracySetManually then begin
Expand Down
10 changes: 5 additions & 5 deletions src/Tools/AI Test Toolkit/src/Logs/AITLogEntries.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -270,17 +270,17 @@ page 149033 "AIT Log Entries"
Page.Run(Page::"AIT Test Data Compare", Rec);
end;
}
action("Export Results")
action("Download Test Summary")
{
Caption = 'Export Results';
Caption = 'Download Test Summary';
Image = Export;
ToolTip = 'Exports the results.';
ToolTip = 'Downloads a summary of the test results.';

trigger OnAction()
var
AITTestSuiteMgt: Codeunit "AIT Test Suite Mgt.";
begin
AITTestSuiteMgt.ExportResults(Rec);
AITTestSuiteMgt.DownloadTestSummary(Rec);
end;
}
}
Expand Down Expand Up @@ -309,7 +309,7 @@ page 149033 "AIT Log Entries"
actionref("View Test Data_Promoted"; "View Test Data")
{
}
actionref("Export Results_Promoted"; "Export Results")
actionref("Export Results_Promoted"; "Download Test Summary")
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tools/AI Test Toolkit/src/Logs/AITLogEntry.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ table 149034 "AIT Log Entry"
field(45; Accuracy; Decimal)
{
Caption = 'Accuracy';
ToolTip = 'Specifies the accuracy of the test line.';
ToolTip = 'Specifies the accuracy of the test line. The accuracy is calculated as the percentage of turns that passed or can be set manually by the test.';
}
field(50; "Tokens Consumed"; Integer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

namespace System.TestTools.AITestToolkit;

report 149030 "AIT Results"
report 149030 "AIT Test Summary"
{
Caption = 'AI Test Results';
Caption = 'AI Test Summary';
ApplicationArea = All;
UsageCategory = Tasks;
DefaultLayout = Excel;
ExcelLayout = 'Results.xlsx';
ExcelLayout = 'AITestSummary.xlsx';

dataset
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ table 149032 "AIT Test Method Line"
field(45; Accuracy; Decimal)
{
Caption = 'Accuracy';
ToolTip = 'Specifies the average accuracy of the test line.';
ToolTip = 'Specifies the average accuracy of the test line. The accuracy is calculated as the percentage of turns that passed or can be set manually by the test.';
Editable = false;
FieldClass = FlowField;
CalcFormula = average("AIT Log Entry"."Accuracy" where("Test Suite Code" = field("Test Suite Code"), "Test Method Line No." = field("Line No."), Version = field("Version Filter"), Operation = const('Run Procedure'), "Procedure Name" = filter(<> '')));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ table 149030 "AIT Test Suite"
field(25; Accuracy; Decimal)
{
Caption = 'Accuracy';
ToolTip = 'Specifies the average accuracy of the test suite.';
ToolTip = 'Specifies the average accuracy of the test suite. The accuracy is calculated as the percentage of turns that passed or can be set manually by the test.';
Editable = false;
FieldClass = FlowField;
CalcFormula = average("AIT Log Entry"."Accuracy" where("Test Suite Code" = field("Code"), Version = field("Version"), Operation = const('Run Procedure'), "Procedure Name" = filter(<> '')));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ codeunit 149034 "AIT Test Suite Mgt."
FeatureNameLbl: Label 'AI Test Toolkit', Locked = true;
LineNoFilterLbl: Label 'Codeunit %1 "%2" (Input: %3)', Locked = true;
TurnsLbl: Label '%1/%2', Comment = '%1 - No. of turns that passed, %2 - Total no. of turns';
DownloadResultsLbl: Label 'Download results';
ResultsFileNameLbl: Label 'Results.xlsx', Locked = true;
DownloadResultsLbl: Label 'Download Test Summary';
ResultsFileNameLbl: Label 'AITestSummary.xlsx', Locked = true;

procedure StartAITSuite(Iterations: Integer; var AITTestSuite: Record "AIT Test Suite")
var
Expand Down Expand Up @@ -457,9 +457,9 @@ codeunit 149034 "AIT Test Suite Mgt."
exit(FeatureNameLbl);
end;

internal procedure ExportResults(var AITLogEntries: Record "AIT Log Entry")
internal procedure DownloadTestSummary(var AITLogEntries: Record "AIT Log Entry")
var
AITResults: Report "AIT Results";
AITResults: Report "AIT Test Summary";
ResultsTempBlob: Codeunit "Temp Blob";
ResultsOutStream: OutStream;
ResultsInStream: InStream;
Expand Down

0 comments on commit 73c359d

Please sign in to comment.