|
1 /* |
|
2 * Copyright (c) 1998-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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __T_SCRIPTSETUP_H__ |
|
20 #define __T_SCRIPTSETUP_H__ |
|
21 |
|
22 #include <testhandler2/t_testsetup.h> |
|
23 #include <testhandler2/tscripttests.h> |
|
24 |
|
25 //test setup base classes |
|
26 _LIT8(KActionStart, "<action>"); |
|
27 _LIT8(KActionEnd, "</action>"); |
|
28 _LIT8(KActionNameStart, "<actionname>"); |
|
29 _LIT8(KActionNameEnd, "</actionname>"); |
|
30 _LIT8(KActionTypeStart, "<actiontype>"); |
|
31 _LIT8(KActionTypeEnd, "</actiontype>"); |
|
32 _LIT8(KActionBodyStart, "<actionbody>"); |
|
33 _LIT8(KActionBodyEnd, "</actionbody>"); |
|
34 _LIT8(KActionResultStart, "<actionresult>"); |
|
35 _LIT8(KActionResultEnd, "</actionresult>"); |
|
36 _LIT8(KActionGroupingStart, "<actiongrouping>"); |
|
37 _LIT8(KActionGroupingEnd, "</actiongrouping>"); |
|
38 _LIT8(KKnownDefectStart, "<knowndefect>"); |
|
39 _LIT8(KKnownDefectEnd, "</knowndefect>"); |
|
40 |
|
41 class CTestAction; |
|
42 class TTestActionSpec; |
|
43 class CTestSetup; |
|
44 class CTestSpec; |
|
45 |
|
46 |
|
47 class CScriptSetup : public CTestSetup |
|
48 { |
|
49 public: |
|
50 IMPORT_C static CScriptSetup* NewLC(CConsoleBase* aConsole); |
|
51 |
|
52 public: |
|
53 //aTestSpec is the class that holds the array of test actions, and has the GetNextTest function |
|
54 //theTestTypes is the static array of test types |
|
55 //aCommandLineSettings contains the command line parameters |
|
56 IMPORT_C virtual void SetupTestsL(RFs& aFs, CTestSpec& aTestSpec, TScriptTests theTestTypes[], |
|
57 const CTestHandlerSettings& aCommandLineSettings); |
|
58 IMPORT_C ~CScriptSetup(); |
|
59 |
|
60 IMPORT_C TBool InitialiseL(RFs &aFs, const TDesC& aDefaultScript = KNullDesC, const TDesC& aDefaultLog = KNullDesC, TBool aUseCommandLine = ETrue); |
|
61 |
|
62 protected: |
|
63 CScriptSetup(CConsoleBase* aConsole); |
|
64 |
|
65 protected: |
|
66 HBufC8* iTestInput; |
|
67 |
|
68 protected: |
|
69 IMPORT_C virtual CTestAction* CreateActionL(RFs& aFs, const TTestActionSpec& aTestActionSpec, |
|
70 const TScriptTests theTestArray[]) const; |
|
71 }; |
|
72 |
|
73 #endif |