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

Allow Wildcards and Filter on Test Codeunit Name #16096

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -531,25 +531,27 @@ page 130455 "Command Line Test Tool"

CodeunitTestMethodLine.SetRange("Test Suite", GlobalALTestSuite.Name);
CodeunitTestMethodLine.SetRange("Line Type", CodeunitTestMethodLine."Line Type"::Codeunit);
CodeunitTestMethodLine.SetRange(Name, CodeunitName);
if not CodeunitTestMethodLine.FindFirst() then
CodeunitTestMethodLine.SetFilter(Name, CodeunitName);
JesperSchulz marked this conversation as resolved.
Show resolved Hide resolved
if CodeunitTestMethodLine.IsEmpty() then
CodeunitTestMethodLine.SetRange(Name, CodeunitName);
if not CodeunitTestMethodLine.FindSet() then
exit;

TestMethodLine.SetRange("Test Suite", GlobalALTestSuite.Name);
TestMethodLine.SetRange("Line Type", Rec."Line Type"::"Function");
TestMethodLine.SetRange("Test Codeunit", CodeunitTestMethodLine."Test Codeunit");
TestMethodLine.SetFilter(Name, TestMethodName);
TestMethodLine.ModifyAll(Run, false);


TestMethodLine.SETRANGE(Name);
TestMethodLine.SETRANGE(Run, TRUE);
if TestMethodLine.IsEmpty() then begin
CodeunitTestMethodLine.VALIDATE(Run, FALSE);
CodeunitTestMethodLine.Modify(TRUE);
end;

repeat
TestMethodLine.SetRange("Test Suite", GlobalALTestSuite.Name);
TestMethodLine.SetRange("Line Type", Rec."Line Type"::"Function");
TestMethodLine.SetRange("Test Codeunit", CodeunitTestMethodLine."Test Codeunit");
TestMethodLine.SetFilter(Name, TestMethodName);
TestMethodLine.ModifyAll(Run, false);


TestMethodLine.SetRange(Name);
TestMethodLine.SetRange(Run, true);
if TestMethodLine.IsEmpty() then begin
CodeunitTestMethodLine.Validate(Run, false);
CodeunitTestMethodLine.Modify(true);
end;
until CodeunitTestMethodLine.Next() = 0;

CurrPage.Update();
end;
}

Loading