| 2222 |
sbetterm |
1 |
//---------------------------------------------------------------------------
|
|
|
2 |
|
|
|
3 |
#ifndef MainH
|
|
|
4 |
#define MainH
|
|
|
5 |
//---------------------------------------------------------------------------
|
|
|
6 |
#include <Classes.hpp>
|
|
|
7 |
#include <Controls.hpp>
|
|
|
8 |
#include <StdCtrls.hpp>
|
|
|
9 |
#include <Forms.hpp>
|
|
|
10 |
#include <ComCtrls.hpp>
|
|
|
11 |
#include <ExtCtrls.hpp>
|
|
|
12 |
#include <Menus.hpp>
|
|
|
13 |
#include <ToolWin.hpp>
|
|
|
14 |
#include <Buttons.hpp>
|
|
|
15 |
#include <DBCtrls.hpp>
|
|
|
16 |
#include "Grids_ts.hpp"
|
|
|
17 |
#include "TSDBGrid.hpp"
|
|
|
18 |
#include "TSGrid.hpp"
|
|
|
19 |
#include <ADODB.hpp>
|
|
|
20 |
#include <DB.hpp>
|
|
|
21 |
#include <ActnList.hpp>
|
|
|
22 |
#include <vcl\Clipbrd.hpp>
|
|
|
23 |
#include <ImgList.hpp>
|
|
|
24 |
#include "TXMLSchema.h"
|
|
|
25 |
#include "AdvGrid.hpp"
|
|
|
26 |
#include "BaseGrid.hpp"
|
|
|
27 |
#include <Grids.hpp>
|
|
|
28 |
#include "DBAdvNavigator.hpp"
|
|
|
29 |
#include "AdvPageControl.hpp"
|
|
|
30 |
#include "AsgFindDialog.hpp"
|
|
|
31 |
#include "DBAdvGrd.hpp"
|
|
|
32 |
#include "DBAdvGrid.hpp"
|
|
|
33 |
#include "ProgressBar.h"
|
|
|
34 |
|
|
|
35 |
#include <map>
|
|
|
36 |
#include <string>
|
| 2228 |
sbetterm |
37 |
#include <vector>
|
| 2222 |
sbetterm |
38 |
|
|
|
39 |
typedef map<unsigned int, AnsiString> TXNIndexMap;
|
|
|
40 |
typedef pair<unsigned int, AnsiString> TXNIndexPair;
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
typedef map<string, string> IterationParams;
|
|
|
44 |
typedef pair<string, string> IterationParamsPair;
|
|
|
45 |
|
|
|
46 |
typedef struct
|
|
|
47 |
{
|
|
|
48 |
string name;
|
|
|
49 |
unsigned int increment;
|
|
|
50 |
unsigned int initial_value;
|
|
|
51 |
unsigned int reset_at;
|
|
|
52 |
unsigned int value;
|
|
|
53 |
} IterationSequence;
|
|
|
54 |
|
|
|
55 |
typedef map<string, IterationSequence> IterationSequences;
|
|
|
56 |
typedef pair<string, IterationSequence> IterationSequencesPair;
|
|
|
57 |
|
|
|
58 |
typedef struct
|
|
|
59 |
{
|
|
|
60 |
int txnscenario_no;
|
|
|
61 |
int txnspec_no;
|
|
|
62 |
int fieldtag;
|
|
|
63 |
AnsiString fieldname;
|
|
|
64 |
int subscript;
|
|
|
65 |
AnsiString fieldvalue;
|
|
|
66 |
AnsiString xpath;
|
|
|
67 |
char user_supplied;
|
|
|
68 |
} TxnSpecValue;
|
|
|
69 |
|
|
|
70 |
typedef map<AnsiString, TxnSpecValue> TxnSpecValueMap;
|
|
|
71 |
typedef map<AnsiString, TxnSpecValue>::iterator TxnSpecValueIterator;
|
|
|
72 |
typedef pair<AnsiString, TxnSpecValue> TxnSpecValuePair;
|
|
|
73 |
|
|
|
74 |
typedef map<AnsiString, char> FoundTxnSpecValueMap;
|
|
|
75 |
typedef pair<AnsiString, char> FoundTxnSpecValuePair;
|
|
|
76 |
typedef map<AnsiString, char>::iterator FoundTxnSpecValueIterator;
|
|
|
77 |
|
|
|
78 |
class DefinedVariableTable;
|
|
|
79 |
class Iteration;
|
|
|
80 |
class ISecurityWrapperFactory;
|
|
|
81 |
class SequenceCollection;
|
|
|
82 |
class TestScenario;
|
|
|
83 |
class TransactionSpecification;
|
|
|
84 |
#include "SecurityWrapper.h"
|
|
|
85 |
#include "TransactionCache.h"
|
|
|
86 |
#include "TransactionTemplateCollection.h"
|
|
|
87 |
|
|
|
88 |
using namespace std;
|
|
|
89 |
//---------------------------------------------------------------------------
|
|
|
90 |
class TMainForm : public TForm
|
|
|
91 |
{
|
|
|
92 |
__published: // IDE-managed Components
|
|
|
93 |
TPanel *Panel1;
|
|
|
94 |
TPanel *Panel2;
|
|
|
95 |
TSplitter *Splitter1;
|
|
|
96 |
TToolBar *ToolBar1;
|
|
|
97 |
TMainMenu *MainMenu1;
|
|
|
98 |
TMenuItem *Help1;
|
|
|
99 |
TMenuItem *About1;
|
|
|
100 |
TToolButton *ToolButton1;
|
|
|
101 |
TLabel *Label1;
|
|
|
102 |
TLabel *Label2;
|
|
|
103 |
TSpeedButton *ProjectConfigBtn;
|
|
|
104 |
TSpeedButton *IterationConfigBtn;
|
|
|
105 |
TComboBox *ProjectsComboBox;
|
|
|
106 |
TComboBox *IterationsComboBox;
|
|
|
107 |
TPanel *Panel4;
|
|
|
108 |
TBitBtn *ImportXMLSchemaBtn;
|
|
|
109 |
TADOQuery *MASSTxnsQuery;
|
|
|
110 |
TDataSource *MASSTxnsDataSource;
|
|
|
111 |
TADOQuery *TestScenariosQuery;
|
|
|
112 |
TDataSource *TestCasesDataSource;
|
|
|
113 |
TActionList *ActionList1;
|
|
|
114 |
TAction *EditTestCase;
|
|
|
115 |
TADOQuery *TxnSpecQuery;
|
|
|
116 |
TDataSource *TxnSpecDataSource;
|
|
|
117 |
TPanel *Panel3;
|
|
|
118 |
TADOQuery *TxnValuesQuery;
|
|
|
119 |
TDataSource *TxnValuesDataSource;
|
|
|
120 |
TPanel *Panel8;
|
|
|
121 |
TImageList *ImageList1;
|
|
|
122 |
TADOQuery *TestCaseQuery;
|
|
|
123 |
TDataSource *TestCaseEditDataSource;
|
|
|
124 |
TPanel *Panel9;
|
|
|
125 |
TDBMemo *DBMemo2;
|
|
|
126 |
TLabel *Label4;
|
|
|
127 |
TBitBtn *SaveUseCaseEditBtn;
|
|
|
128 |
TADOQuery *IterationParamsQuery;
|
|
|
129 |
TDataSource *IterationParamsDataSource;
|
|
|
130 |
TPopupMenu *ScenarioPopupMenu;
|
|
|
131 |
TMenuItem *NewTransaction;
|
|
|
132 |
TAction *NewTransactionAction;
|
|
|
133 |
TAction *DeleteTransactionAction;
|
|
|
134 |
TPanel *TestCasePanel;
|
|
|
135 |
TPanel *Panel6;
|
|
|
136 |
TSplitter *Splitter2;
|
|
|
137 |
TToolBar *TestScenarioToolBar;
|
|
|
138 |
TToolButton *ToolButton2;
|
|
|
139 |
TSpeedButton *AddTestCaseNode;
|
|
|
140 |
TToolButton *ToolButton4;
|
|
|
141 |
TSpeedButton *TestCaseZoomIn;
|
|
|
142 |
TSpeedButton *TestCaseZoomOut;
|
|
|
143 |
TTreeView *TestCaseTreeView;
|
|
|
144 |
TPanel *Panel7;
|
|
|
145 |
TAction *RunTestCase;
|
|
|
146 |
TPanel *Panel10;
|
|
|
147 |
TPanel *Panel5;
|
|
|
148 |
TToolBar *ToolBar4;
|
|
|
149 |
TToolButton *ToolButton8;
|
|
|
150 |
TSpeedButton *ImportTestDirector;
|
|
|
151 |
TBitBtn *ApplyTemplates;
|
|
|
152 |
TToolButton *ToolButton9;
|
|
|
153 |
TtsDBGrid *tsDBGrid3;
|
|
|
154 |
TADOQuery *TxnStepsQuery;
|
|
|
155 |
TDataSource *TxnStepsDataSource;
|
|
|
156 |
TSplitter *Splitter3;
|
|
|
157 |
TPanel *Panel11;
|
|
|
158 |
TDBMemo *DBMemo3;
|
|
|
159 |
TSplitter *Splitter4;
|
|
|
160 |
TPanel *Panel12;
|
|
|
161 |
TDBMemo *DBMemo4;
|
|
|
162 |
TLabel *Label5;
|
|
|
163 |
TLabel *Label6;
|
|
|
164 |
TDBNavigator *DBNavigator3;
|
|
|
165 |
TtsDBGrid *tsDBGrid6;
|
|
|
166 |
TADOQuery *TxnHdrValuesQuery;
|
|
|
167 |
TDataSource *TxnHdrValuesDataSource;
|
|
|
168 |
TDBNavigator *DBNavigator4;
|
|
|
169 |
TtsDBGrid *tsDBGrid4;
|
|
|
170 |
TMenuItem *N1;
|
|
|
171 |
TMenuItem *ScenarioParameters;
|
|
|
172 |
TADOQuery *SequenceGeneratorQuery;
|
|
|
173 |
TDataSource *SequenceGeneratorDataSource;
|
|
|
174 |
TPopupMenu *TxnValuesPopupMenu;
|
|
|
175 |
TMenuItem *RemoveUserSuppliedValue;
|
|
|
176 |
TBitBtn *GenerateTestTestCaseBtn;
|
|
|
177 |
TMenuItem *ApplyTemplatesToScenario;
|
|
|
178 |
TMemo *TxnFieldComments;
|
|
|
179 |
TSplitter *Splitter5;
|
|
|
180 |
TLabel *Label3;
|
|
|
181 |
TEdit *FieldDatatype;
|
|
|
182 |
TPanel *Panel13;
|
|
|
183 |
TLabel *Label7;
|
|
|
184 |
TListBox *FieldEnumValues;
|
|
|
185 |
TStringField *TxnValuesQueryFIELDNAME;
|
|
|
186 |
TStringField *TxnValuesQueryXPATH;
|
|
|
187 |
TStringField *TxnValuesQueryPROJECT_CODE;
|
|
|
188 |
TBCDField *TxnValuesQueryITERATION;
|
|
|
189 |
TStringField *TxnValuesQueryUSER_SUPPLIED;
|
|
|
190 |
TIntegerField *TxnValuesQuerySUBSCRIPT;
|
|
|
191 |
TBCDField *TxnValuesQueryFIELDTAG;
|
|
|
192 |
TStringField *TxnValuesQueryFIELDVALUE;
|
|
|
193 |
TStringField *TxnValuesQueryNOTES;
|
|
|
194 |
TBCDField *TxnValuesQueryTXNSPEC_NO;
|
|
|
195 |
TBCDField *TxnValuesQueryTESTSCENARIO_NO;
|
|
|
196 |
TStringField *TxnValuesQueryDISPLAY_FIELDNAME;
|
|
|
197 |
TToolBar *ToolBar5;
|
|
|
198 |
TDBAdvNavigator *DBAdvNavigator1;
|
|
|
199 |
TDBAdvNavigator *PayloadStructureNavigator;
|
|
|
200 |
TAdvPageControl *TestsPageControl;
|
|
|
201 |
TAdvTabSheet *TestCaseTabSheet;
|
|
|
202 |
TAdvTabSheet *ParamsTabSheet;
|
|
|
203 |
TAdvTabSheet *MASSTxnTabSheet;
|
|
|
204 |
TStringField *TestCaseQueryUSECASE_ID;
|
|
|
205 |
TStringField *TestCaseQueryNAME;
|
|
|
206 |
TStringField *TestCaseQueryDESCRIPTION;
|
|
|
207 |
TStringField *TestCaseQueryTESTCASE_ID;
|
|
|
208 |
TStringField *TestCaseQueryTRACEABILITY_REF;
|
|
|
209 |
TStringField *TestCaseQueryREF_TYPE;
|
|
|
210 |
TStringField *TestCaseQueryUSE_CASE_TYPE;
|
| 2228 |
sbetterm |
211 |
TMenuItem *N2;
|
| 2222 |
sbetterm |
212 |
TMenuItem *Properties1;
|
|
|
213 |
TPopupMenu *TransactionPopupMenu;
|
|
|
214 |
TMenuItem *DeleteTransaction;
|
|
|
215 |
TMenuItem *DeleteScenario;
|
|
|
216 |
TAction *DeleteScenarioAction;
|
|
|
217 |
TAction *InitialiseTransactionAction;
|
|
|
218 |
TMenuItem *InitialiseTransaction;
|
|
|
219 |
TXMLSchema *XMLSchema;
|
|
|
220 |
TAdvPageControl *TestParametersPageControl;
|
|
|
221 |
TAdvTabSheet *IterationParametersTabSheet;
|
|
|
222 |
TAdvTabSheet *BatchHeaderParametersTabSheet;
|
|
|
223 |
TAdvTabSheet *SequenceGeneratorsTabSheet;
|
|
|
224 |
TAdvTabSheet *CopyParametersTabSheet;
|
|
|
225 |
TBitBtn *Copy;
|
|
|
226 |
TComboBox *SourceIterationComboBox;
|
|
|
227 |
TADOStoredProc *CopyIterationProcedure;
|
|
|
228 |
TDBAdvStringGrid *TestCaseGrid;
|
|
|
229 |
TDBAdvStringGrid *DBAdvStringGrid2;
|
|
|
230 |
TDBAdvStringGrid *DBAdvStringGrid3;
|
|
|
231 |
TAdvPageControl *AdvPageControl1;
|
|
|
232 |
TAdvTabSheet *AdvTabSheet1;
|
|
|
233 |
TAdvTabSheet *AdvTabSheet2;
|
|
|
234 |
TDBAdvGrid *NewPayloadStructureGrid;
|
|
|
235 |
TDBAdvStringGrid *TransactionValueGrid;
|
|
|
236 |
TAdvPageControl *TransactionStructurePageControl;
|
|
|
237 |
TAdvTabSheet *PayloadStructureTabSheet;
|
|
|
238 |
TAdvTabSheet *NewPayloadStructureTabSheet;
|
|
|
239 |
TAdvTabSheet *HeaderStructureTabSheet;
|
|
|
240 |
TBCDField *TxnValuesQueryORDINAL;
|
|
|
241 |
TBCDField *TxnValuesQueryCHILD_COUNT;
|
|
|
242 |
TStatusBar *MainStatusBar;
|
|
|
243 |
TAdvTabSheet *ObsoleteFieldTabSheet;
|
|
|
244 |
TDBAdvNavigator *ObsoleteFieldNavigator;
|
|
|
245 |
TDBAdvStringGrid *ObsoleteFieldGrid;
|
|
|
246 |
TDBAdvNavigator *HeaderStructureNavigator;
|
|
|
247 |
TDBAdvStringGrid *HeaderStructureGrid;
|
|
|
248 |
TDBAdvNavigator *NewPayloadStructureNavigator;
|
|
|
249 |
TADOQuery *TxnHeaderValuesQuery;
|
|
|
250 |
TStringField *StringField1;
|
|
|
251 |
TStringField *StringField2;
|
|
|
252 |
TStringField *StringField3;
|
|
|
253 |
TBCDField *BCDField1;
|
|
|
254 |
TStringField *StringField4;
|
|
|
255 |
TIntegerField *IntegerField1;
|
|
|
256 |
TBCDField *BCDField2;
|
|
|
257 |
TStringField *StringField5;
|
|
|
258 |
TStringField *StringField6;
|
|
|
259 |
TBCDField *BCDField3;
|
|
|
260 |
TBCDField *BCDField4;
|
|
|
261 |
TStringField *StringField7;
|
|
|
262 |
TBCDField *BCDField5;
|
|
|
263 |
TBCDField *BCDField6;
|
|
|
264 |
TDataSource *TxnHeaderValuesDataSource;
|
|
|
265 |
TADOQuery *TxnObsoleteValuesQuery;
|
|
|
266 |
TStringField *StringField8;
|
|
|
267 |
TStringField *StringField9;
|
|
|
268 |
TStringField *StringField10;
|
|
|
269 |
TBCDField *BCDField7;
|
|
|
270 |
TStringField *StringField11;
|
|
|
271 |
TIntegerField *IntegerField2;
|
|
|
272 |
TBCDField *BCDField8;
|
|
|
273 |
TStringField *StringField12;
|
|
|
274 |
TStringField *StringField13;
|
|
|
275 |
TBCDField *BCDField9;
|
|
|
276 |
TBCDField *BCDField10;
|
|
|
277 |
TStringField *StringField14;
|
|
|
278 |
TBCDField *BCDField11;
|
|
|
279 |
TBCDField *BCDField12;
|
|
|
280 |
TDataSource *TxnObsoleteValuesDataSource;
|
|
|
281 |
TAdvPageControl *MainPageControl;
|
|
|
282 |
TAdvTabSheet *TestCasesTabSheet;
|
|
|
283 |
TAdvTabSheet *TestScenariosTabSheet;
|
|
|
284 |
TAdvTabSheet *ScenarioStepsTabSheet;
|
|
|
285 |
TAdvTabSheet *AdvTabSheet4;
|
|
|
286 |
TAdvTabSheet *AdvTabSheet5;
|
|
|
287 |
TAdvTabSheet *AdvTabSheet6;
|
|
|
288 |
TToolButton *ToolButton3;
|
|
|
289 |
TAdvGridFindDialog *TransactionValueGridFindDialog;
|
|
|
290 |
TAdvGridFindDialog *HeaderStructureGridFindDialog;
|
|
|
291 |
TAdvGridFindDialog *ObsoleteFieldGridFindDialog;
|
|
|
292 |
TADOQuery *SequenceGeneratorValueQuery;
|
|
|
293 |
TDataSource *SequenceGeneratorValueDataSource;
|
|
|
294 |
TDBAdvStringGrid *SequenceGeneratorsGrid;
|
|
|
295 |
TDBAdvNavigator *SequenceGeneratorNavigator;
|
| 2224 |
sbetterm |
296 |
TEdit *DocDataType;
|
|
|
297 |
TLabel *Label8;
|
|
|
298 |
TMenuItem *ImportTransactions;
|
|
|
299 |
TAction *ImportTransactionAction;
|
| 2228 |
sbetterm |
300 |
TSpeedButton *IterationCopyButton;
|
|
|
301 |
TMenuItem *Generate;
|
|
|
302 |
TAction *GenerateAction;
|
| 2222 |
sbetterm |
303 |
void __fastcall ProjectConfigBtnClick(TObject *Sender);
|
|
|
304 |
void __fastcall IterationConfigBtnClick(TObject *Sender);
|
|
|
305 |
void __fastcall FormShow(TObject *Sender);
|
|
|
306 |
void __fastcall ProjectsComboBoxChange(TObject *Sender);
|
|
|
307 |
void __fastcall tsDBGrid2RowChanged(TObject *Sender, Variant &OldRow,
|
|
|
308 |
Variant &NewRow);
|
|
|
309 |
void __fastcall EditTestCaseExecute(TObject *Sender);
|
|
|
310 |
void __fastcall UseCaseDBGridEnter(TObject *Sender);
|
|
|
311 |
void __fastcall TestCaseTreeViewEnter(TObject *Sender);
|
|
|
312 |
void __fastcall TestCaseQueryAfterPost(TDataSet *DataSet);
|
|
|
313 |
void __fastcall IterationsComboBoxChange(TObject *Sender);
|
|
|
314 |
void __fastcall IterationParamsQueryAfterInsert(TDataSet *DataSet);
|
|
|
315 |
void __fastcall ImportXMLSchemaBtnClick(TObject *Sender);
|
|
|
316 |
void __fastcall TestCaseTreeViewChange(TObject *Sender, TTreeNode *Node);
|
|
|
317 |
void __fastcall NewTransactionActionExecute(TObject *Sender);
|
|
|
318 |
void __fastcall DeleteTransactionActionExecute(TObject *Sender);
|
|
|
319 |
void __fastcall TestCaseZoomInClick(TObject *Sender);
|
|
|
320 |
void __fastcall TestCaseZoomOutClick(TObject *Sender);
|
|
|
321 |
void __fastcall AddTestCaseNodeClick(TObject *Sender);
|
|
|
322 |
void __fastcall TestCaseTreeViewEndDrag(TObject *Sender, TObject *Target,
|
|
|
323 |
int X, int Y);
|
|
|
324 |
void __fastcall TestCaseTreeViewStartDrag(TObject *Sender,
|
|
|
325 |
TDragObject *&DragObject);
|
|
|
326 |
void __fastcall TestCaseTreeViewDragOver(TObject *Sender, TObject *Source,
|
|
|
327 |
int X, int Y, TDragState State, bool &Accept);
|
|
|
328 |
void __fastcall ApplyTemplatesClick(TObject *Sender);
|
|
|
329 |
void __fastcall ImportTestDirectorClick(TObject *Sender);
|
|
|
330 |
void __fastcall TxnHdrValuesQueryAfterInsert(TDataSet *DataSet);
|
|
|
331 |
void __fastcall ScenarioParametersClick(TObject *Sender);
|
|
|
332 |
void __fastcall TestCaseTreeViewMouseDown(TObject *Sender,
|
|
|
333 |
TMouseButton Button, TShiftState Shift, int X, int Y);
|
|
|
334 |
void __fastcall TxnValuesQueryBeforePost(TDataSet *DataSet);
|
|
|
335 |
void __fastcall RemoveUserSuppliedValueClick(TObject *Sender);
|
|
|
336 |
void __fastcall CopyValuesToClipboardBtnClick(TObject *Sender);
|
|
|
337 |
void __fastcall GenerateTestTestCaseBtnClick(TObject *Sender);
|
|
|
338 |
void __fastcall ApplyTemplatesToScenarioClick(TObject *Sender);
|
|
|
339 |
void __fastcall FieldEnumValuesDblClick(TObject *Sender);
|
|
|
340 |
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
|
|
341 |
void __fastcall SetGenerationDirectoryClick(TObject *Sender);
|
|
|
342 |
void __fastcall TestCaseGridRowChanging(TObject *Sender, int OldRow,
|
|
|
343 |
int NewRow, bool &Allow);
|
|
|
344 |
void __fastcall TestCaseQueryAfterClose(TDataSet *DataSet);
|
|
|
345 |
void __fastcall TestCaseQueryAfterOpen(TDataSet *DataSet);
|
|
|
346 |
void __fastcall SequenceGeneratorQueryAfterInsert(TDataSet *DataSet);
|
|
|
347 |
void __fastcall TestCaseQueryBeforePost(TDataSet *DataSet);
|
|
|
348 |
void __fastcall TestCaseTreeViewEditing(TObject *Sender,
|
|
|
349 |
TTreeNode *Node, bool &AllowEdit);
|
|
|
350 |
void __fastcall TestCaseTreeViewEdited(TObject *Sender,
|
|
|
351 |
TTreeNode *Node, AnsiString &S);
|
|
|
352 |
void __fastcall TestScenarioPropertiesClick(TObject *Sender);
|
|
|
353 |
void __fastcall TestCaseTreeViewContextPopup(TObject *Sender,
|
|
|
354 |
TPoint &MousePos, bool &Handled);
|
|
|
355 |
void __fastcall DeleteScenarioClick(TObject *Sender);
|
|
|
356 |
void __fastcall InitialiseTransactionActionExecute(TObject *Sender);
|
|
|
357 |
void __fastcall InitialiseCopyParametersTabSheet(TObject *Sender);
|
|
|
358 |
void __fastcall CopyClick(TObject *Sender);
|
|
|
359 |
void __fastcall TransactionValueGrid1BeforeContractNode(TObject *Sender,
|
|
|
360 |
int ARow, int ARowReal, bool &Allow);
|
|
|
361 |
void __fastcall TransactionValueGridCanEditCell(TObject *Sender, int ARow,
|
|
|
362 |
int ACol, bool &CanEdit);
|
|
|
363 |
void __fastcall TransactionValueGridGetDisplText(TObject *Sender,
|
|
|
364 |
int ACol, int ARow, AnsiString &Value);
|
|
|
365 |
void __fastcall TransactionValueGridRowChanging(TObject *Sender,
|
|
|
366 |
int OldRow, int NewRow, bool &Allow);
|
|
|
367 |
void __fastcall ObsoleteFieldGridRowChanging(TObject *Sender, int OldRow,
|
|
|
368 |
int NewRow, bool &Allow);
|
|
|
369 |
void __fastcall HeaderStructureGridRowChanging(TObject *Sender,
|
|
|
370 |
int OldRow, int NewRow, bool &Allow);
|
|
|
371 |
void __fastcall HeaderStructureTabSheetShow(TObject *Sender);
|
|
|
372 |
void __fastcall PayloadStructureTabSheetShow(TObject *Sender);
|
|
|
373 |
void __fastcall ObsoleteFieldTabSheetShow(TObject *Sender);
|
|
|
374 |
void __fastcall MainStatusBarResize(TObject *Sender);
|
|
|
375 |
void __fastcall TransactionValueGridKeyDown(TObject *Sender, WORD &Key,
|
|
|
376 |
TShiftState Shift);
|
|
|
377 |
void __fastcall HeaderStructureGridKeyDown(TObject *Sender, WORD &Key,
|
|
|
378 |
TShiftState Shift);
|
|
|
379 |
void __fastcall ObsoleteFieldGridKeyDown(TObject *Sender, WORD &Key,
|
|
|
380 |
TShiftState Shift);
|
| 2224 |
sbetterm |
381 |
void __fastcall ImportTransactionActionExecute(TObject *Sender);
|
| 2228 |
sbetterm |
382 |
void __fastcall IterationCopyButtonClick(TObject *Sender);
|
|
|
383 |
void __fastcall GenerateActionExecute(TObject *Sender);
|
| 2222 |
sbetterm |
384 |
|
|
|
385 |
private: // User declarations
|
|
|
386 |
TXNIndexMap m_mass_txns;
|
|
|
387 |
AnsiString m_testteamcode;
|
|
|
388 |
AnsiString m_currentproject;
|
|
|
389 |
int m_currentiteration;
|
|
|
390 |
string m_schema_handle;
|
|
|
391 |
int m_testscenario_no;
|
|
|
392 |
int m_txnspec_no;
|
|
|
393 |
string m_structure_name;
|
|
|
394 |
|
|
|
395 |
TRegistry * m_Registry;
|
|
|
396 |
vector< string > m_xml_schemas;
|
|
|
397 |
TTreeNode * m_startnode;
|
|
|
398 |
std::vector< int > m_parents;
|
|
|
399 |
TransactionCache m_transactionCache;
|
|
|
400 |
TransactionTemplateCollection m_transactionTemplates;
|
|
|
401 |
ProgressBar * m_progressBar;
|
|
|
402 |
|
|
|
403 |
HINSTANCE m_securityWrapper;
|
|
|
404 |
getSecurityWrapperFactory_t m_getSecurityWrapperFactory;
|
|
|
405 |
ISecurityWrapperFactory * m_securityWrapperFactory;
|
|
|
406 |
|
|
|
407 |
void __fastcall InitialiseMASSTxns();
|
|
|
408 |
void __fastcall InitialiseTxnParams(unsigned int schema_format_version, IterationParams &iteration_params, IterationSequences &iteration_sequences);
|
|
|
409 |
void __fastcall InitialiseTestScenario(unsigned int testscenario_no, TxnSpecValueMap &txnSpecValueMap, FoundTxnSpecValueMap &foundTxnSpecValueMap, IterationSequences &iteration_sequences, IterationParams &iteration_params);
|
|
|
410 |
string __fastcall FindField(const string &structure_name, int fieldtag);
|
|
|
411 |
|
|
|
412 |
void LoadProjectCombo();
|
|
|
413 |
void __fastcall LoadTestCaseNodes(TTreeNode *testcase_node);
|
|
|
414 |
void __fastcall ResequenceTestCases(TTreeNode *testcase_node);
|
|
|
415 |
void __fastcall ResequenceTransactions(TTreeNode *testcase_node);
|
|
|
416 |
void __fastcall ProcessTxnStructure(string structure_handle, unsigned short udtype, unsigned short udsubtype, int testscenario_no, int txnspec_no, TADOQuery *query, TxnSpecValueMap &txnSpecValueMap, FoundTxnSpecValueMap &foundTxnSpecValueMap, IterationParams &iteration_params, IterationSequences &iteration_sequences, unsigned int nested_subscript);
|
|
|
417 |
AnsiString LookupParameter(IterationParams &iteration_params, IterationSequences &iteration_sequences, TADOQuery *query, int testscenario_no, const string ¶m, unsigned short udtype, unsigned short udsubtype);
|
|
|
418 |
static AnsiString & getNameFromNode( AnsiString & name, const AnsiString & string );
|
|
|
419 |
void __fastcall populateHeaderStructureTab( const AnsiString & structure );
|
|
|
420 |
void __fastcall populatePayloadStructureTab( const AnsiString & structure );
|
|
|
421 |
void __fastcall populateObsoleteStructureTab( void );
|
|
|
422 |
void __fastcall buildTransactionSpecificationValues(
|
|
|
423 |
TransactionCache & transactionCache,
|
|
|
424 |
const int & testScenario,
|
|
|
425 |
const int & transactionSpecification,
|
|
|
426 |
const std::string & transactionStructureName,
|
|
|
427 |
const std::string & headerStructureName,
|
|
|
428 |
const std::string & schema,
|
|
|
429 |
const int & iteration );
|
|
|
430 |
void __fastcall buildTransactionSpecificationFieldValue(
|
|
|
431 |
TADOQuery & query,
|
|
|
432 |
const std::string & rootStructure,
|
|
|
433 |
const std::string & fieldHandle,
|
|
|
434 |
const int & testScenario,
|
|
|
435 |
const int & transactionSpecification,
|
|
|
436 |
int & ordinal,
|
|
|
437 |
const & childCount,
|
|
|
438 |
TransactionSpecification & transactions,
|
|
|
439 |
const int & subscript = 0 );
|
|
|
440 |
void __fastcall buildTransactionSpecificationRepeatValue(
|
|
|
441 |
TADOQuery & query,
|
|
|
442 |
const std::string & rootStructure,
|
|
|
443 |
const std::string & attribute,
|
|
|
444 |
const int & testScenario,
|
|
|
445 |
const int & transactionSpecification,
|
|
|
446 |
const std::string & transactionStructureHandle,
|
|
|
447 |
int & ordinal,
|
|
|
448 |
TransactionSpecification & transactions,
|
|
|
449 |
const int & repeatLimit = 1000 );
|
|
|
450 |
void __fastcall buildTransactionSpecificationValues(
|
|
|
451 |
TADOQuery & query,
|
|
|
452 |
const std::string & rootStructure,
|
|
|
453 |
const int & testScenario,
|
|
|
454 |
const int & transactionSpecification,
|
|
|
455 |
const std::string & transactionStructureHandle,
|
|
|
456 |
int & ordinal,
|
|
|
457 |
TransactionSpecification & transactions );
|
|
|
458 |
|
|
|
459 |
const unsigned __fastcall countChildren(
|
|
|
460 |
const std::string & transactionStructureHandle,
|
|
|
461 |
const bool & isStructureRepeat );
|
|
|
462 |
const unsigned __fastcall countChildren(
|
|
|
463 |
const std::string & attribute,
|
|
|
464 |
const std::string & transactionStructureHandle,
|
|
|
465 |
const int & repeatLimit = 1000 );
|
|
|
466 |
|
|
|
467 |
void __fastcall clearTransactionSpecificationValueTree( TDBAdvGrid & grid );
|
|
|
468 |
void __fastcall buildTransactionSpecificationValueTree(
|
|
|
469 |
TDBAdvGrid & grid,
|
|
|
470 |
TADOQuery & query );
|
|
|
471 |
static const int countChildNodes(
|
|
|
472 |
TDBAdvGrid & grid,
|
|
|
473 |
TADOQuery & query,
|
|
|
474 |
const int & row,
|
|
|
475 |
const int & rows );
|
|
|
476 |
void __fastcall getParentOrdinals( std::vector< int > & parents );
|
|
|
477 |
const bool __fastcall isParent( const int & ordinal );
|
|
|
478 |
void __fastcall readTransactionSpecifications(
|
|
|
479 |
TransactionSpecification & transaction,
|
|
|
480 |
const int & transactionSpecification );
|
|
|
481 |
void __fastcall obsoleteTransactionSpecifications(
|
|
|
482 |
const TransactionSpecification & transaction );
|
|
|
483 |
void __fastcall TransactionGridRowChanging( TADOQuery & query, const char * structureName );
|
|
|
484 |
void __fastcall buildTransactionTemplates( TransactionTemplateCollection & templates, const AnsiString & project, const int & iteration );
|
|
|
485 |
void __fastcall loadLegacyHeaderValues( TransactionTemplateCollection & templates, const AnsiString & project, const int & iteration );
|
|
|
486 |
void __fastcall loadLegacyParameters( TransactionTemplateCollection & templates, const AnsiString & project, const int & iteration );
|
|
|
487 |
void __fastcall applyTemplatesToScenario( ProgressBar & progressBar, const int & scenario );
|
|
|
488 |
void __fastcall applyTemplatesToTransaction(
|
|
|
489 |
ProgressBar & progressBar,
|
|
|
490 |
const int & transaction,
|
|
|
491 |
const TestScenarioTemplate * testScenario,
|
|
|
492 |
const TestScenarioTemplate * all );
|
|
|
493 |
const unsigned __fastcall countTransactionsInScenario( const int & scenario );
|
|
|
494 |
const unsigned __fastcall countTransactionsInIteration( const char * project, const int & iteration );
|
|
|
495 |
void __fastcall buildTransactionsForIteration(
|
|
|
496 |
TransactionCache & transactionCache,
|
|
|
497 |
ProgressBar & progressBar,
|
|
|
498 |
const std::string & schema,
|
|
|
499 |
const std::string & project,
|
|
|
500 |
const int & iteration );
|
|
|
501 |
void __fastcall buildTransactionsForScenario(
|
|
|
502 |
TransactionCache & transactionCache,
|
|
|
503 |
ProgressBar & progressBar,
|
|
|
504 |
const int & scenario,
|
|
|
505 |
const std::string & schema,
|
|
|
506 |
const int & iteration );
|
|
|
507 |
void __fastcall buildExecutionSchedule(
|
|
|
508 |
Iteration & iteration,
|
|
|
509 |
const std::string & testcaseId );
|
|
|
510 |
void __fastcall buildExecutionSchedule( TestScenario & testScenario );
|
|
|
511 |
void __fastcall buildExecutionSchedule( TransactionSpecification & transactionSpecification );
|
|
|
512 |
const bool __fastcall findSchema( std::string & handle,
|
|
|
513 |
const AnsiString & projectCode,
|
|
|
514 |
const int & iteration );
|
|
|
515 |
void __fastcall loadLegacyVariables(
|
|
|
516 |
DefinedVariableTable & variables,
|
|
|
517 |
const AnsiString & project,
|
| 2224 |
sbetterm |
518 |
Iteration & iteration );
|
| 2222 |
sbetterm |
519 |
const bool __fastcall openSecurityFactory( const char * library = "SecurityWrapper.dll" );
|
|
|
520 |
void __fastcall closeSecurityFactory();
|
|
|
521 |
void __fastcall readSequences( SequenceCollection & sequences, const std::string & project, const int & iteration );
|
|
|
522 |
void __fastcall writeSequences( const SequenceCollection & sequences, const std::string & project, const int & iteration );
|
| 2224 |
sbetterm |
523 |
void __fastcall importTransaction( const int & testScenarioNumber, const AnsiString & profile, const AnsiString & file );
|
| 2228 |
sbetterm |
524 |
void __fastcall generateTransaction( std::vector< int > & scenarios );
|
| 2222 |
sbetterm |
525 |
|
|
|
526 |
public: // User declarations
|
|
|
527 |
__fastcall TMainForm(TComponent* Owner);
|
|
|
528 |
__fastcall virtual ~TMainForm();
|
|
|
529 |
static const char * g_headerStructure;
|
|
|
530 |
static const int g_messagePanel;
|
|
|
531 |
|
|
|
532 |
};
|
|
|
533 |
//---------------------------------------------------------------------------
|
|
|
534 |
extern PACKAGE TMainForm *MainForm;
|
|
|
535 |
//---------------------------------------------------------------------------
|
|
|
536 |
#endif
|