|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This main DLL entry point for the TS_CsdAgt.dll |
|
15 // |
|
16 // |
|
17 |
|
18 // EPOC includes |
|
19 #include <e32base.h> |
|
20 #include <nd_err.h> |
|
21 |
|
22 // Test system includes |
|
23 #include "log.h" |
|
24 #include "teststep.h" |
|
25 #include "TestStepCsdAgt.h" |
|
26 #include "testsuite.h" |
|
27 #include "TestSuiteCsdAgt.h" |
|
28 |
|
29 // Test Cases |
|
30 #include "CsdAgtTestCommDBParameters.h" |
|
31 #include "CsdAgtTestStateMachineInit.h" |
|
32 #include "CsdAgtTestReconnect.h" |
|
33 #include "CsdAgtTestOOM.h" |
|
34 #include "CsdAgtTestScriptErr.h" |
|
35 |
|
36 |
|
37 /** |
|
38 * New Test CsdAgt is exported at ordinal 1. |
|
39 * This provides the interface to allow schedule test to create |
|
40 * instances of this test suite. |
|
41 * |
|
42 */ |
|
43 EXPORT_C CTestSuiteCsdAgt* NewTestSuiteCsdAgt( void ) |
|
44 { |
|
45 return new (ELeave) CTestSuiteCsdAgt; |
|
46 } |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 * |
|
51 */ |
|
52 CTestSuiteCsdAgt::~CTestSuiteCsdAgt() |
|
53 { |
|
54 } |
|
55 |
|
56 /** |
|
57 * Add a test step into the suite. |
|
58 * |
|
59 */ |
|
60 void CTestSuiteCsdAgt::AddTestStepL( CTestStepCsdAgt * aPtrTestStep ) |
|
61 { |
|
62 // test steps contain a pointer back to the suite which owns them |
|
63 aPtrTestStep->iCsdAgtSuite = this; |
|
64 |
|
65 // add the step using tyhe base class method |
|
66 CTestSuite::AddTestStepL(aPtrTestStep); |
|
67 } |
|
68 |
|
69 /** |
|
70 * Constructor for TS_CsdAgt test suite. |
|
71 * This creates all the TS_CsdAgt test steps and stores them inside CTestSuiteCsdAgt. |
|
72 * |
|
73 */ |
|
74 void CTestSuiteCsdAgt::InitialiseL( void ) |
|
75 { |
|
76 TInt ret = User::LoadPhysicalDevice( PDD_NAME ); |
|
77 if ( KErrNone != ret && KErrAlreadyExists != ret ) |
|
78 { |
|
79 User::Leave( ret ); |
|
80 } |
|
81 ret = User::LoadLogicalDevice( LDD_NAME ); |
|
82 if ( KErrNone != ret && KErrAlreadyExists != ret ) |
|
83 { |
|
84 User::Leave( ret ); |
|
85 } |
|
86 // When bootstrapping C32 we have to avoid starting both the normal ETEL (because we use a |
|
87 // dummy one of the same server name) and PhBkSyncServer being started, since |
|
88 // it needs a different CommDB |
|
89 _LIT(KTelephonyCMIs, "phbsync.cmi,etel.cmi"); |
|
90 ret = StartC32WithCMISuppressions(KTelephonyCMIs); |
|
91 if ( KErrNone != ret && KErrAlreadyExists != ret ) |
|
92 { |
|
93 User::Leave( ret ); |
|
94 } |
|
95 |
|
96 // CommDB tests |
|
97 AddTestStepL( new(ELeave) CCsdAgtTest1_1 ); |
|
98 AddTestStepL( new(ELeave) CCsdAgtTest1_2 ); |
|
99 AddTestStepL( new(ELeave) CCsdAgtTest1_3 ); |
|
100 |
|
101 // State machine init |
|
102 AddTestStepL( new(ELeave) CCsdAgtTest2_1 ); |
|
103 AddTestStepL( new(ELeave) CCsdAgtTest2_2 ); |
|
104 AddTestStepL( new(ELeave) CCsdAgtTest2_3 ); |
|
105 AddTestStepL( new(ELeave) CCsdAgtTest2_4 ); |
|
106 AddTestStepL( new(ELeave) CCsdAgtTest2_5 ); |
|
107 AddTestStepL( new(ELeave) CCsdAgtTest2_6 ); |
|
108 AddTestStepL( new(ELeave) CCsdAgtTest2_7 ); |
|
109 AddTestStepL( new(ELeave) CCsdAgtTest2_8 ); |
|
110 AddTestStepL( new(ELeave) CCsdAgtTest2_9 ); |
|
111 AddTestStepL( new(ELeave) CCsdAgtTest2_10 ); |
|
112 AddTestStepL( new(ELeave) CCsdAgtTest2_11 ); |
|
113 AddTestStepL( new(ELeave) CCsdAgtTest2_12 ); |
|
114 AddTestStepL( new(ELeave) CCsdAgtTest2_13 ); |
|
115 AddTestStepL( new(ELeave) CCsdAgtTest2_14 ); |
|
116 AddTestStepL( new(ELeave) CCsdAgtTest2_15 ); |
|
117 |
|
118 // Reconnect |
|
119 AddTestStepL( new(ELeave) CCsdAgtTest3_1 ); |
|
120 AddTestStepL( new(ELeave) CCsdAgtTest3_2 ); |
|
121 |
|
122 // OOM |
|
123 AddTestStepL( new(ELeave) CCsdAgtTest4_1 ); |
|
124 |
|
125 // Script processing errors |
|
126 AddTestStepL( new(ELeave) CCsdAgtTest5_1 ); |
|
127 AddTestStepL( new(ELeave) CCsdAgtTest5_2 ); |
|
128 AddTestStepL( new(ELeave) CCsdAgtTest5_3 ); |
|
129 AddTestStepL( new(ELeave) CCsdAgtTest5_4 ); |
|
130 AddTestStepL( new(ELeave) CCsdAgtTest5_5 ); |
|
131 AddTestStepL( new(ELeave) CCsdAgtTest5_6 ); |
|
132 AddTestStepL( new(ELeave) CCsdAgtTest5_7 ); |
|
133 AddTestStepL( new(ELeave) CCsdAgtTest5_8 ); |
|
134 AddTestStepL( new(ELeave) CCsdAgtTest5_9 ); |
|
135 AddTestStepL( new(ELeave) CCsdAgtTest5_10 ); |
|
136 AddTestStepL( new(ELeave) CCsdAgtTest5_11 ); |
|
137 AddTestStepL( new(ELeave) CCsdAgtTest5_12 ); |
|
138 AddTestStepL( new(ELeave) CCsdAgtTest5_13 ); |
|
139 AddTestStepL( new(ELeave) CCsdAgtTest5_14 ); |
|
140 AddTestStepL( new(ELeave) CCsdAgtTest5_15 ); |
|
141 AddTestStepL( new(ELeave) CCsdAgtTest5_16 ); |
|
142 AddTestStepL( new(ELeave) CCsdAgtTest5_17 ); |
|
143 AddTestStepL( new(ELeave) CCsdAgtTest5_18 ); |
|
144 AddTestStepL( new(ELeave) CCsdAgtTest5_19 ); |
|
145 } |
|
146 |
|
147 TPtrC CTestSuiteCsdAgt::GetVersion( ) |
|
148 { |
|
149 _LIT(KVersion,"1.1"); // updated for addition of script error tests. |
|
150 return KVersion(); |
|
151 } |