-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpstesttoolpage.txt
231 lines (200 loc) · 7.23 KB
/
pstesttoolpage.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
OBJECT Page 130409 PS Test Tool Page
{
OBJECT-PROPERTIES
{
Date=12-03-19;
Time=12:57:57;
Modified=Yes;
Version List=PS Test Tool;
}
PROPERTIES
{
CaptionML=ENU=Test Tool;
SaveValues=Yes;
DeleteAllowed=Yes;
ModifyAllowed=Yes;
SourceTable=Table130401;
DataCaptionExpr=CurrentSuiteName;
DelayedInsert=Yes;
PageType=Worksheet;
AutoSplitKey=Yes;
OnOpenPage=BEGIN
IF NOT CALTestSuite.GET(CurrentSuiteName) THEN
IF CALTestSuite.FINDFIRST THEN
CurrentSuiteName := CALTestSuite.Name
ELSE BEGIN
CreateTestSuite(CurrentSuiteName);
COMMIT;
END;
FILTERGROUP(2);
SETRANGE("Test Suite",CurrentSuiteName);
FILTERGROUP(0);
IF FIND('-') THEN;
CurrPage.UPDATE(FALSE);
CALTestSuite.GET(CurrentSuiteName);
CALTestSuite.CALCFIELDS("Tests to Execute");
END;
OnAfterGetRecord=VAR
CALTestResult@1000 : Record 130405;
InStr@1001 : InStream;
BEGIN
LineTypeCode := "Line Type";
ResultCode := Result;
IF "Line Type" <> "Line Type"::Codeunit THEN
"Hit Objects" := 0;
CallStackText := '';
IF (Result = Result::Failure) THEN BEGIN
CALTestResult.SETRANGE("Codeunit ID", "Test Codeunit");
IF "Function" <> '' THEN
CALTestResult.SETRANGE("Function Name", "Function");
IF CALTestResult.FINDLAST THEN BEGIN
CALTestResult.CALCFIELDS("Call Stack");
CALTestResult."Call Stack".CREATEINSTREAM(InStr);
InStr.READTEXT(CallStackText);
END;
END;
END;
ActionList=ACTIONS
{
{ 1900000004;0 ;ActionContainer;
ActionContainerType=ActionItems }
{ 10 ;1 ;Action ;
Name=RunSelected;
CaptionML=ENU=Run &Selected;
ApplicationArea=#All;
Promoted=Yes;
PromotedIsBig=Yes;
Image=TestFile;
PromotedCategory=Process;
OnAction=VAR
SelectedCALTestLine@1000 : Record 130401;
CALTestMgt@1001 : Codeunit 130401;
BEGIN
CurrPage.SETSELECTIONFILTER(SelectedCALTestLine);
SelectedCALTestLine.SETRANGE("Test Suite","Test Suite");
CALTestMgt.RunSelected(SelectedCALTestLine);
CurrPage.UPDATE(FALSE);
END;
}
}
}
CONTROLS
{
{ 1900000001;0;Container;
ContainerType=ContentArea }
{ 30 ;1 ;Field ;
Name=CurrentSuiteName;
CaptionML=ENU=Suite Name;
ApplicationArea=#All;
SourceExpr=CurrentSuiteName;
OnValidate=BEGIN
CALTestSuite.GET(CurrentSuiteName);
CALTestSuite.CALCFIELDS("Tests to Execute");
CurrentSuiteNameOnAfterValidate;
END;
OnLookup=VAR
CALTestSuite@1000 : Record 130400;
BEGIN
CALTestSuite.Name := CurrentSuiteName;
IF PAGE.RUNMODAL(0,CALTestSuite) <> ACTION::LookupOK THEN
EXIT(FALSE);
Text := CALTestSuite.Name;
EXIT(TRUE);
END;
ImplicitType=Code10 }
{ 1 ;1 ;Group ;
GroupType=Repeater }
{ 16 ;2 ;Field ;
Name=LineType;
ApplicationArea=#All;
SourceExpr=LineTypeCode;
ImplicitType=Integer }
{ 22 ;2 ;Field ;
Name=TestCodeunit;
ApplicationArea=#All;
SourceExpr="Test Codeunit";
ImplicitType=Integer }
{ 20 ;2 ;Field ;
Name=Name;
ApplicationArea=#All;
SourceExpr=Name;
ImplicitType=Text128 }
{ 11 ;2 ;Field ;
ApplicationArea=#All;
SourceExpr="Hit Objects";
OnDrillDown=VAR
CALTestCoverageMap@1000 : Record 130406;
BEGIN
CALTestCoverageMap.ShowHitObjects("Test Codeunit");
END;
ImplicitType=Integer }
{ 25 ;2 ;Field ;
Name=Run;
ApplicationArea=#All;
SourceExpr=Run;
OnValidate=BEGIN
CurrPage.UPDATE(TRUE);
END;
ImplicitType=Boolean }
{ 28 ;2 ;Field ;
Name=Result;
ApplicationArea=#All;
BlankZero=Yes;
SourceExpr=ResultCode;
ImplicitType=Integer }
{ 31 ;2 ;Field ;
Name=First Error;
DrillDown=Yes;
ApplicationArea=#All;
SourceExpr="First Error";
OnDrillDown=BEGIN
ShowTestResults
END;
ImplicitType=Text250 }
{ 4 ;2 ;Field ;
ApplicationArea=#All;
SourceExpr="Start Time";
ImplicitType=DateTime }
{ 9 ;2 ;Field ;
ApplicationArea=#All;
SourceExpr="Finish Time";
ImplicitType=DateTime }
{ 14 ;2 ;Field ;
Name=Call Stack;
ApplicationArea=#All;
SourceExpr=CallStackText;
ImplicitType=Text }
}
CODE
{
VAR
CALTestSuite@1001 : Record 130400;
CurrentSuiteName@1000 : Code[10];
ResultCode@1002 : Integer INDATASET;
LineTypeCode@1003 : Integer INDATASET;
CallStackText@1004 : Text INDATASET;
[LineStart(37)]
LOCAL PROCEDURE CreateTestSuite@2(VAR NewSuiteName@1001 : Code[10]);
VAR
CALTestSuite@1003 : Record 130400;
CALTestMgt@1000 : Codeunit 130401;
BEGIN
CALTestMgt.CreateNewSuite(NewSuiteName);
CALTestSuite.GET(NewSuiteName);
END;
[LineStart(41)]
LOCAL PROCEDURE CurrentSuiteNameOnAfterValidate@19020347();
BEGIN
CurrPage.SAVERECORD;
FILTERGROUP(2);
SETRANGE("Test Suite",CurrentSuiteName);
FILTERGROUP(0);
IF FIND('-') THEN;
CurrPage.UPDATE(FALSE);
CALTestSuite.GET(CurrentSuiteName);
CALTestSuite.CALCFIELDS("Tests to Execute");
END;
BEGIN
END.
}
}