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 1 commit
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 @@ -355,24 +355,25 @@ 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 not CodeunitTestMethodLine.FindSet() then
exit;

TestMethodLine.SetRange("Test Suite", GlobalALTestSuite.Name);
TestMethodLine.SetRange("Line Type", "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", "Line Type"::"Function");
TestMethodLine.SetRange("Test Codeunit", CodeunitTestMethodLine."Test Codeunit");
TestMethodLine.SetFilter(Name, TestMethodName);
TestMethodLine.ModifyAll(Run, false);


TestMethodLine.SETRANGE(Name);
ChrisBlankDe marked this conversation as resolved.
Show resolved Hide resolved
TestMethodLine.SETRANGE(Run, TRUE);
if TestMethodLine.IsEmpty() then begin
CodeunitTestMethodLine.VALIDATE(Run, FALSE);
ChrisBlankDe marked this conversation as resolved.
Show resolved Hide resolved
CodeunitTestMethodLine.Modify(TRUE);
ChrisBlankDe marked this conversation as resolved.
Show resolved Hide resolved
end;
until CodeunitTestMethodLine.Next = 0;
ChrisBlankDe marked this conversation as resolved.
Show resolved Hide resolved

CurrPage.Update();
end;
}
Expand Down