1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This file contains the header file of the TestScripter |
|
15 * module of STIF Test Framework. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef TestScripter_H |
|
20 #define TestScripter_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 |
|
25 #include <StifParser.h> |
|
26 #include <StifLogger.h> |
|
27 #include <StifTestModule.h> |
|
28 #include "TestScripterInternal.h" |
|
29 #include "TestKeywords.h" |
|
30 #include "StifKernelTestClass.h" |
|
31 #include "StifTestInterference.h" |
|
32 #include "STIFMeasurement.h" |
|
33 |
|
34 // CONSTANTS |
|
35 // Printing priorities |
|
36 const TInt KPrintPriLow = 10; |
|
37 const TInt KPrintPriNorm = 30; |
|
38 const TInt KPrintPriHigh = 50; |
|
39 // Log dir and file |
|
40 _LIT( KTestScripterLogDir, "\\Logs\\TestFramework\\TestScripter\\" ); |
|
41 _LIT( KTestScripterLogFile, "TestScripter.txt" ); |
|
42 _LIT( KTestScripterLogFileWithTitle, "TestScripter_[%S].txt"); |
|
43 // Configuration file tags |
|
44 _LIT( KTestStartTag, "[Test]" ); |
|
45 _LIT( KTestEndTag, "[Endtest]" ); |
|
46 |
|
47 // Define tags |
|
48 _LIT( KDefineStartTag, "[Define]" ); |
|
49 _LIT( KDefineEndTag, "[Enddefine]" ); |
|
50 |
|
51 // Loop counter macro |
|
52 _LIT( KLoopCounter, "LOOP_COUNTER" ); |
|
53 |
|
54 // MACROS |
|
55 // None |
|
56 |
|
57 // DATA TYPES |
|
58 class CTestRunner; |
|
59 typedef CScriptBase* (*CInterfaceFactory)( CTestModuleIf& aTestModuleIf ); |
|
60 |
|
61 // FUNCTION PROTOTYPES |
|
62 // None |
|
63 |
|
64 // FORWARD DECLARATIONS |
|
65 class CTestRunner; |
|
66 class CTestContinue; |
|
67 class TTestModule; |
|
68 class TTestObjectBase; |
|
69 class TTestObject; |
|
70 class TTestInterference; |
|
71 class CStifTestMeasurement; |
|
72 class TTestMeasurement; |
|
73 |
|
74 // CLASS DECLARATION |
|
75 |
|
76 // DESCRIPTION |
|
77 // Predefined value entry |
|
78 class CDefinedValue |
|
79 :public CBase |
|
80 { |
|
81 public: // Constructors and destructor |
|
82 |
|
83 /** |
|
84 * Two-phased constructor. |
|
85 */ |
|
86 static CDefinedValue* NewL( TDesC& aName, TDesC& aValue ); |
|
87 |
|
88 /** |
|
89 * Destructor. |
|
90 */ |
|
91 virtual ~CDefinedValue(); |
|
92 |
|
93 public: // New functions |
|
94 |
|
95 /** |
|
96 * Returns define name. |
|
97 */ |
|
98 TDesC& Name(); |
|
99 |
|
100 /** |
|
101 * Returns define value. |
|
102 */ |
|
103 TDesC& Value(); |
|
104 |
|
105 /** |
|
106 * Returns new define value. |
|
107 */ |
|
108 void SetValueL( TDesC& aValue ); |
|
109 |
|
110 private: |
|
111 |
|
112 /** |
|
113 * C++ default constructor. |
|
114 */ |
|
115 CDefinedValue(); |
|
116 |
|
117 /** |
|
118 * By default Symbian OS constructor is private. |
|
119 */ |
|
120 void ConstructL( TDesC& aName, TDesC& aValue ); |
|
121 |
|
122 private: // Data |
|
123 |
|
124 // Define name |
|
125 HBufC* iNameBuf; |
|
126 TPtrC iName; |
|
127 |
|
128 // Define value |
|
129 HBufC* iValueBuf; |
|
130 TPtrC iValue; |
|
131 |
|
132 }; |
|
133 |
|
134 // CLASS DECLARATION |
|
135 |
|
136 // DESCRIPTION |
|
137 // CTestScripter contains the Test Module interface of TestScripter |
|
138 // for STIF Test Framework |
|
139 |
|
140 class CTestScripter |
|
141 :public CTestModuleBase |
|
142 { |
|
143 public: // Enumerations |
|
144 |
|
145 private: // Enumerations |
|
146 |
|
147 public: // Constructors and destructor |
|
148 |
|
149 /** |
|
150 * Two-phased constructor. |
|
151 */ |
|
152 static CTestScripter* NewL(); |
|
153 |
|
154 /** |
|
155 * Destructor. |
|
156 */ |
|
157 ~CTestScripter(); |
|
158 |
|
159 public: // New functions |
|
160 |
|
161 /** |
|
162 * Call specified tst class object. |
|
163 */ |
|
164 TInt CallTestClass( const TDesC& aLine ); |
|
165 |
|
166 /** |
|
167 * Get pointer to test class object. |
|
168 */ |
|
169 TInt GetTestScriptObject( const TDesC& aObjectName ); |
|
170 |
|
171 /** |
|
172 * Return runner handle. |
|
173 */ |
|
174 CTestRunner& TestRunner(){ return *iTestRunner; }; |
|
175 |
|
176 public: // Functions from base classes |
|
177 |
|
178 /** |
|
179 * Test module initialization. |
|
180 */ |
|
181 TInt InitL( TFileName& aIniFile, TBool aFirstTime ); |
|
182 |
|
183 /** |
|
184 * GetTestCasesL is used to inquire testcases. |
|
185 */ |
|
186 TInt GetTestCasesL( const TFileName& aConfigFile, |
|
187 RPointerArray<TTestCaseInfo>& aTestCases ); |
|
188 |
|
189 /** |
|
190 * RunTestCase is used to run an individual test case specified |
|
191 * by aTestCase. |
|
192 */ |
|
193 TInt RunTestCaseL( const TInt aCaseNumber, |
|
194 const TFileName& aConfig, |
|
195 TTestResult& aResult ); |
|
196 |
|
197 /** |
|
198 * Internal fuction to get const value defined in |
|
199 * [Define]...[Enddefine] section of script file |
|
200 */ |
|
201 IMPORT_C TInt GetConstantValue( const TDesC& aName, TDes& aValue ); |
|
202 |
|
203 /** |
|
204 * Set result description of test case. |
|
205 */ |
|
206 IMPORT_C void SetResultDescription(const TDesC& aDescr); |
|
207 |
|
208 /** |
|
209 * Internal fuction to set local value. |
|
210 */ |
|
211 IMPORT_C TInt SetLocalValue(const TDesC& aName, const TDesC& aValue); |
|
212 |
|
213 /** |
|
214 * Internal fuction to get local value. |
|
215 */ |
|
216 IMPORT_C TInt GetLocalValue(const TDesC& aName, TDes& aValue); |
|
217 |
|
218 protected: // New functions |
|
219 |
|
220 protected: // Functions from base classes |
|
221 |
|
222 private: |
|
223 /** |
|
224 * C++ default constructor. |
|
225 */ |
|
226 CTestScripter(); |
|
227 |
|
228 /** |
|
229 * By default Symbian OS constructor is private. |
|
230 */ |
|
231 void ConstructL(); |
|
232 |
|
233 /** |
|
234 * GetTestCaseL gets the specified test case section |
|
235 * from the onfigfile. |
|
236 */ |
|
237 CStifSectionParser* GetTestCaseL( TInt aCaseNumber, |
|
238 const TFileName& aConfig ); |
|
239 |
|
240 /** |
|
241 * RunTestL runs the testcase specified in section. |
|
242 */ |
|
243 void RunTestL(); |
|
244 |
|
245 /** |
|
246 * LoadTestModuleL loads test module. |
|
247 */ |
|
248 TTestModule* LoadTestModuleL( TDesC& aModule ); |
|
249 |
|
250 /** |
|
251 * CreateObjectL create new object. |
|
252 */ |
|
253 void CreateObjectL( TDesC& aModule, TDesC& aObjectId ); |
|
254 |
|
255 /** |
|
256 * CreateKernelObjectL create new kernel object. |
|
257 */ |
|
258 void CreateKernelObjectL( TDesC& aDriver, TDesC& aObjectId ); |
|
259 |
|
260 /** |
|
261 * DeleteObjectL deletes object with aObjectId. |
|
262 */ |
|
263 TInt DeleteObjectL( TDesC& aObjectId ); |
|
264 |
|
265 /** |
|
266 * GetObject returns object corresponding to aObjectId. |
|
267 */ |
|
268 TTestObjectBase* GetObject( const TDesC& aObjectId ); |
|
269 |
|
270 /** |
|
271 * Read initialization from file. |
|
272 */ |
|
273 void ReadInitializationL( const TDesC& aIniFile, |
|
274 RPointerArray<CDefinedValue>& aDefines ); |
|
275 |
|
276 /** |
|
277 * Read sub section from test case file. |
|
278 */ |
|
279 CStifSectionParser* GetSubL(const TDesC& aSubName); |
|
280 |
|
281 /** |
|
282 * Updates result of test case. |
|
283 */ |
|
284 void UpdateTestCaseResult(const TInt aError, const TDesC& aDescr); |
|
285 |
|
286 public: // Data |
|
287 // Logger |
|
288 CStifLogger* iLog; |
|
289 |
|
290 protected: // Data |
|
291 |
|
292 private: // Data |
|
293 // Test case array of running/runned test cases |
|
294 RPointerArray<TTestObjectBase> iTestObjects; |
|
295 // Array of test modules |
|
296 RPointerArray<TTestModule> iTestModules; |
|
297 |
|
298 // Test case result of the TestScripter |
|
299 TTestResult iResult; |
|
300 |
|
301 // Sectionparser for the current testcase |
|
302 CStifSectionParser* iSectionParser; |
|
303 |
|
304 // Currently used section parser (changed when executing a function (sub)) |
|
305 CStifSectionParser* iCurrentParser; |
|
306 |
|
307 // It says if we need to call GetLine or GetNextLine for the parser |
|
308 TBool iCurrentParserReadFirstLine; |
|
309 |
|
310 // Stack of parsers for called functions (subs) |
|
311 RPointerArray<CStifSectionParser> iParserStack; |
|
312 |
|
313 // Pointer to used testrunner |
|
314 CTestRunner* iTestRunner; |
|
315 |
|
316 // Predefined values are listed here |
|
317 RPointerArray<CDefinedValue> iDefinedIni; |
|
318 RPointerArray<CDefinedValue> iDefinedRuntime; |
|
319 RPointerArray<CDefinedValue> iDefinedLocal; |
|
320 |
|
321 // Flag for OOM testing. If true test class's build |
|
322 // block execution result will ignored. |
|
323 TBool iOOMIgnoreFailure; |
|
324 |
|
325 // Flag which says if heap balance should be checked (affects only |
|
326 // EKA2 environment). May be set in StifSettings section. |
|
327 TBool iCheckHeapBalance; |
|
328 |
|
329 // Standard logger |
|
330 CStifLogger* iStdLog; |
|
331 |
|
332 // Test case Logger |
|
333 CStifLogger* iTCLog; |
|
334 |
|
335 // Flag which says if test case title should be appended to the |
|
336 // log file name. This is read from SettingServer |
|
337 TBool iAddTestCaseTitleToLogName; |
|
338 |
|
339 // The running test case's config file name |
|
340 TFileName iConfig; |
|
341 |
|
342 public: // Friend classes |
|
343 |
|
344 protected: // Friend classes |
|
345 |
|
346 private: // Friend classes |
|
347 friend class CTestRunner; |
|
348 friend class CTestContinue; |
|
349 |
|
350 }; |
|
351 |
|
352 // CLASS DECLARATION |
|
353 |
|
354 // DESCRIPTION |
|
355 // CTestRunner parses the TestScripter configuration file and |
|
356 // runs a testcase. CTestRunner is the friend of CTestScripter |
|
357 // and uses its private member variables directly. |
|
358 |
|
359 class CTestRunner |
|
360 :public CActive |
|
361 { |
|
362 public: // Enumerations |
|
363 |
|
364 private: // Enumerations |
|
365 enum TRunnerState{ |
|
366 ERunnerIdle, |
|
367 ERunnerRunning, |
|
368 ERunnerCancel, |
|
369 ERunnerError, |
|
370 ERunnerPaused, |
|
371 }; |
|
372 |
|
373 public: // Constructors and destructor |
|
374 /** |
|
375 * Two-phased constructor. |
|
376 */ |
|
377 static CTestRunner* NewL( CTestScripter* aTestScripter ); |
|
378 |
|
379 /** |
|
380 * Destructor. |
|
381 */ |
|
382 ~CTestRunner(); |
|
383 |
|
384 public: // New functions |
|
385 /** |
|
386 * Calls SetActive() from CActive. |
|
387 */ |
|
388 void SetRunnerActive(); |
|
389 |
|
390 /** |
|
391 * Get test case result handle. |
|
392 */ |
|
393 RArray<TInt>& TestCaseResults(){ return iTestCaseResults; }; |
|
394 |
|
395 |
|
396 public: // Functions from base classes |
|
397 /** |
|
398 * RunL derived from CActive handles the completed requests. |
|
399 */ |
|
400 void RunL(); |
|
401 |
|
402 /** |
|
403 * DoCancel derived from CActive handles the Cancel. |
|
404 */ |
|
405 void DoCancel(); |
|
406 |
|
407 /** |
|
408 * RunError derived from CActive handles errors from active handler. |
|
409 */ |
|
410 TInt RunError( TInt aError ); |
|
411 |
|
412 protected: // New functions |
|
413 |
|
414 protected: // Functions from base classes |
|
415 |
|
416 private: |
|
417 /** |
|
418 * C++ default constructor. |
|
419 */ |
|
420 CTestRunner( CTestScripter* aTestScripter ); |
|
421 |
|
422 /** |
|
423 * By default Symbian OS constructor is private. |
|
424 */ |
|
425 void ConstructL(); |
|
426 |
|
427 /** |
|
428 * Executes one script line. |
|
429 */ |
|
430 TBool ExecuteLineL( TDesC& aKeyword, |
|
431 CStifItemParser* aItem ); |
|
432 |
|
433 /** |
|
434 * Executes method call to object script line. |
|
435 */ |
|
436 TBool ExecuteCommandL( TDesC& aObject, |
|
437 CStifItemParser* aItem ); |
|
438 |
|
439 /** |
|
440 * Executes event control script line. |
|
441 */ |
|
442 TBool ExecuteEventL( TDesC& aKeyword, |
|
443 CStifItemParser* aItem ); |
|
444 |
|
445 /** |
|
446 * Preprocess hardcoded values in test case. |
|
447 */ |
|
448 CStifItemParser* PreprocessLineL( TDesC& line ); |
|
449 |
|
450 /** |
|
451 * Checks if aWord is defined value. |
|
452 */ |
|
453 TInt CheckDefined( TPtrC& aWord ); |
|
454 |
|
455 /** |
|
456 * Checks if aWord is a local variable. |
|
457 */ |
|
458 TInt CheckDefinedLocals( TPtrC& aWord ); |
|
459 |
|
460 /** |
|
461 * Handles 'oomignorefailure' keyword parsing. |
|
462 */ |
|
463 void OOMIgnoreFailureL( CStifItemParser* aItem ); |
|
464 |
|
465 /** |
|
466 * Handles 'oomheapfailnext' keyword parsing. |
|
467 */ |
|
468 void OOMHeapFailNextL( CStifItemParser* aItem ); |
|
469 |
|
470 /** |
|
471 * Handles 'oomheapsetfail' keyword parsing. |
|
472 */ |
|
473 void OOMHeapSetFailL( CStifItemParser* aItem ); |
|
474 |
|
475 /** |
|
476 * Initialize all OOM related variables. |
|
477 */ |
|
478 void OOMHeapToNormal(); |
|
479 |
|
480 /** |
|
481 * Handles 'testinterference' keyword parsing. |
|
482 */ |
|
483 void TestInterferenceL( CStifItemParser* aItem ); |
|
484 |
|
485 /** |
|
486 * Starts test interference. |
|
487 */ |
|
488 void StartInterferenceL( TDesC& aName, CStifItemParser* aItem ); |
|
489 |
|
490 /** |
|
491 * Stops test interference. |
|
492 */ |
|
493 void StopInterferenceL( TDesC& aName ); |
|
494 |
|
495 /** |
|
496 * Handles 'measurement' keyword parsing. |
|
497 */ |
|
498 void MeasurementL( CStifItemParser* aItem ); |
|
499 |
|
500 /** |
|
501 * Starts measurement. |
|
502 */ |
|
503 void StartMeasurementL( const TDesC& aType, CStifItemParser* aItem ); |
|
504 |
|
505 /** |
|
506 * Stops measurementplugin's measurement. |
|
507 */ |
|
508 void StopMeasurementL( const TDesC& aType ); |
|
509 |
|
510 /** |
|
511 * Adds new test case result. Used with 'allownextresult' |
|
512 * and 'allowerrorcodes' keywords. |
|
513 */ |
|
514 void AddTestCaseResultL( CStifItemParser* aItem ); |
|
515 |
|
516 /** |
|
517 * Sends key press event to AppUi |
|
518 */ |
|
519 TBool PressKeyL( CStifItemParser* aItem ); |
|
520 |
|
521 /** |
|
522 * Sends text to AppUi |
|
523 */ |
|
524 TBool TypeTextL( CStifItemParser* aItem ); |
|
525 |
|
526 /** |
|
527 * Sends pointer event to AppUi |
|
528 */ |
|
529 TBool SendPointerEventL( CStifItemParser* aItem ); |
|
530 public: // Data |
|
531 |
|
532 protected: // Data |
|
533 |
|
534 private: // Data |
|
535 // Runner state |
|
536 TRunnerState iState; |
|
537 |
|
538 // Backpointer to CTestScripter |
|
539 CTestScripter* iTestScripter; |
|
540 |
|
541 // Allowed test case results |
|
542 RArray<TInt> iTestCaseResults; |
|
543 |
|
544 // Temporary line buffer |
|
545 HBufC* iLine; |
|
546 |
|
547 // Store for requested events |
|
548 RPointerArray<HBufC> iEventArray; |
|
549 |
|
550 // Pause timer |
|
551 RTimer iPauseTimer; |
|
552 |
|
553 // Pause value for timer |
|
554 TInt iRemainingTimeValue; |
|
555 |
|
556 // Loop times, counter and start position |
|
557 TInt iLoopTimes; |
|
558 TInt iLoopCounter; |
|
559 TInt iLoopStartPos; |
|
560 TBuf<10> iLoopCounterDes; |
|
561 |
|
562 // Loop (timed loop option) |
|
563 TBool iTimedLoop; |
|
564 TTime iStartTime; |
|
565 TTimeIntervalMicroSeconds iExpectedLoopTime; |
|
566 |
|
567 // For OOM heap testing, FAILNEXT: count |
|
568 TInt iHeapFailNext; |
|
569 // For OOM heap testing, SETFAIL: type and value(rate) |
|
570 RHeap::TAllocFail iHeapSetFailType; |
|
571 TInt iHeapSetFailValue; |
|
572 |
|
573 // Array for test interference |
|
574 RPointerArray<TTestInterference> iTestInterferenceArray; |
|
575 |
|
576 // CStifTestMeasurement object |
|
577 RPointerArray<TTestMeasurement> iTestMeasurementArray; |
|
578 |
|
579 // Message displayed when leave occurs during script parsing |
|
580 TBuf<256> iRunErrorMessage; |
|
581 |
|
582 public: // Friend classes |
|
583 |
|
584 protected: // Friend classes |
|
585 |
|
586 private: // Friend classes |
|
587 |
|
588 }; |
|
589 |
|
590 // CLASS DECLARATION |
|
591 |
|
592 // DESCRIPTION |
|
593 // CTestContinue gets ContinueScript signals from test class |
|
594 class CTestContinue |
|
595 :public CActive |
|
596 { |
|
597 public: // Enumerations |
|
598 |
|
599 private: // Enumerations |
|
600 |
|
601 public: // Constructors and destructor |
|
602 /** |
|
603 * Two-phased constructor. |
|
604 */ |
|
605 static CTestContinue* NewL( CTestScripter* aTestScripter, |
|
606 TTestObject* aObject ); |
|
607 |
|
608 /** |
|
609 * Destructor. |
|
610 */ |
|
611 ~CTestContinue(); |
|
612 |
|
613 public: // New functions |
|
614 |
|
615 public: // Functions from base classes |
|
616 /** |
|
617 * RunL derived from CActive handles the completed requests. |
|
618 */ |
|
619 void RunL(); |
|
620 |
|
621 /** |
|
622 * DoCancel derived from CActive handles the Cancel. |
|
623 */ |
|
624 void DoCancel(); |
|
625 |
|
626 /** |
|
627 * RunError derived from CActive handles errors from active handler. |
|
628 */ |
|
629 TInt RunError( TInt aError ); |
|
630 |
|
631 protected: // New functions |
|
632 |
|
633 protected: // Functions from base classes |
|
634 |
|
635 private: |
|
636 /** |
|
637 * C++ default constructor. |
|
638 */ |
|
639 CTestContinue( CTestScripter* aTestScripter, |
|
640 TTestObject* aObject ); |
|
641 |
|
642 /** |
|
643 * By default Symbian OS constructor is private. |
|
644 */ |
|
645 void ConstructL(); |
|
646 |
|
647 public: //Data |
|
648 |
|
649 protected: // Data |
|
650 |
|
651 private: // Data |
|
652 // Backpointer to CTestScripter |
|
653 CTestScripter* iTestScripter; |
|
654 |
|
655 // Objectid for this object |
|
656 TTestObject* iObject; |
|
657 |
|
658 public: // Friend classes |
|
659 |
|
660 protected: // Friend classes |
|
661 |
|
662 private: // Friend classes |
|
663 |
|
664 }; |
|
665 |
|
666 // CLASS DECLARATION |
|
667 |
|
668 // DESCRIPTION |
|
669 // TTestObjectBase contains test object base information |
|
670 class TTestObjectBase |
|
671 { |
|
672 public: |
|
673 enum TObjectType |
|
674 { |
|
675 EObjectNormal, |
|
676 EObjectKernel, |
|
677 }; |
|
678 |
|
679 public: |
|
680 TTestObjectBase( TObjectType aType ); |
|
681 virtual ~TTestObjectBase(); |
|
682 public: |
|
683 TName& ObjectId(){return iName;} |
|
684 TObjectType ObjectType(){ return iType; }; |
|
685 |
|
686 virtual TInt RunMethodL( CStifItemParser& aItem ) = 0; |
|
687 virtual TBool Signal() = 0; |
|
688 virtual TBool Wait() = 0; |
|
689 |
|
690 public: |
|
691 TInt iAsyncResult; |
|
692 |
|
693 protected: |
|
694 TObjectType iType; |
|
695 |
|
696 private: |
|
697 TName iName; |
|
698 |
|
699 }; |
|
700 |
|
701 // CLASS DECLARATION |
|
702 |
|
703 // DESCRIPTION |
|
704 // TTestObject contains test object information |
|
705 class TTestObject : public TTestObjectBase |
|
706 { |
|
707 public: |
|
708 TTestObject(); |
|
709 virtual ~TTestObject(); |
|
710 |
|
711 public: |
|
712 TInt RunMethodL( CStifItemParser& aItem ); |
|
713 inline TBool Signal(){ return ( iCount++ < 0 ); }; |
|
714 inline TBool Wait(){ return ( --iCount >= 0 ); }; |
|
715 |
|
716 public: |
|
717 CScriptBase* iScript; |
|
718 CTestContinue* iContinue; |
|
719 |
|
720 private: |
|
721 TInt iCount; |
|
722 }; |
|
723 |
|
724 // CLASS DECLARATION |
|
725 |
|
726 // DESCRIPTION |
|
727 // TTestObjectKernel contains kernel test object information |
|
728 class TTestObjectKernel : public TTestObjectBase |
|
729 { |
|
730 public: |
|
731 TTestObjectKernel(); |
|
732 virtual ~TTestObjectKernel(); |
|
733 |
|
734 public: |
|
735 TInt RunMethodL( CStifItemParser& aItem ); |
|
736 |
|
737 // Signal and Wait not supported |
|
738 TBool Signal(){ return ETrue; }; |
|
739 TBool Wait(){ return ETrue; }; |
|
740 |
|
741 TName& LddName(){ return iLddName; } |
|
742 RStifKernelTestClass& KernelTestClass(){ return iTestClass; } |
|
743 |
|
744 private: |
|
745 RStifKernelTestClass iTestClass; |
|
746 TName iLddName; |
|
747 |
|
748 }; |
|
749 |
|
750 // CLASS DECLARATION |
|
751 |
|
752 // DESCRIPTION |
|
753 // TTestModule contains test module information |
|
754 class TTestModule |
|
755 { |
|
756 public: |
|
757 TTestModule(){}; |
|
758 ~TTestModule(){ iLibrary.Close(); }; |
|
759 |
|
760 public: |
|
761 TName& ModuleName(){return iName;} |
|
762 |
|
763 public: |
|
764 RLibrary iLibrary; |
|
765 CInterfaceFactory iLibEntry; |
|
766 |
|
767 private: |
|
768 TName iName; |
|
769 |
|
770 }; |
|
771 |
|
772 // DESCRIPTION |
|
773 // TTestInterference contains test interference object information |
|
774 class TTestInterference |
|
775 { |
|
776 public: |
|
777 TTestInterference(){ iInterference = NULL; }; |
|
778 ~TTestInterference(){ delete iInterference; }; |
|
779 |
|
780 public: |
|
781 |
|
782 public: |
|
783 // "object" name given in test case file. |
|
784 TName iName; |
|
785 // MSTIFTestInterference object. |
|
786 MSTIFTestInterference* iInterference; |
|
787 |
|
788 private: |
|
789 |
|
790 }; |
|
791 |
|
792 // DESCRIPTION |
|
793 // TTestMeasurement contains test measurement module information |
|
794 class TTestMeasurement |
|
795 { |
|
796 public: |
|
797 TTestMeasurement(){ iMeasurement = NULL; }; |
|
798 ~TTestMeasurement(){ delete iMeasurement; }; |
|
799 |
|
800 public: |
|
801 |
|
802 public: |
|
803 // "object" name given in test case file. |
|
804 TName iName; |
|
805 // MSTIFTestInterference object. |
|
806 CSTIFTestMeasurement* iMeasurement; |
|
807 |
|
808 private: |
|
809 |
|
810 }; |
|
811 |
|
812 #endif // TestScripter_H |
|
813 |
|
814 // End of File |
|