19 */ |
19 */ |
20 |
20 |
21 |
21 |
22 #include <barsread.h> |
22 #include <barsread.h> |
23 #include "T_ServicesStep.h" |
23 #include "T_ServicesStep.h" |
24 #include "T_SisFileInstaller.h" |
|
25 |
|
26 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
24 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
27 #include <apaidpartner.h> |
25 #include <apaidpartner.h> |
28 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
26 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
29 |
27 |
30 _LIT(KCompleted, "Completed."); |
28 _LIT(KCompleted, "Completed."); |
31 _LIT8(KLitPlainText,"text/plain"); |
29 _LIT8(KLitPlainText,"text/plain"); |
32 _LIT8(KLitPriorityText,"text/priority"); |
30 _LIT8(KLitPriorityText,"text/priority"); |
33 _LIT8(KLitCustom1Text, "text/custom1"); |
31 _LIT8(KLitCustom1Text, "text/custom1"); |
34 |
32 |
35 |
|
36 _LIT(KServerApp2SisFile, "z:\\apparctest\\apparctestsisfiles\\serverapp2.sis"); |
|
37 _LIT(KServerApp2Component, "serverapp2"); |
|
38 |
|
39 _LIT(KServerApp4SisFile, "z:\\apparctest\\apparctestsisfiles\\serverapp4.sis"); |
|
40 _LIT(KServerApp4Component, "serverapp4"); |
|
41 |
|
42 _LIT(KServerApp6SisFile, "z:\\apparctest\\apparctestsisfiles\\serverapp6.sis"); |
|
43 _LIT(KServerApp6Component, "serverapp6"); |
|
44 |
|
45 _LIT(KServerApp7SisFile, "z:\\apparctest\\apparctestsisfiles\\serverapp7.sis"); |
|
46 _LIT(KServerApp7Component, "serverapp7"); |
|
47 |
|
48 _LIT(KOpenServiceApp1SisFile, "z:\\apparctest\\apparctestsisfiles\\openservice1app.sis"); |
|
49 _LIT(KOpenServiceApp1Component, "openservice1app"); |
|
50 |
|
51 _LIT(KOpenServiceApp2SisFile, "z:\\apparctest\\apparctestsisfiles\\openservice2app.sis"); |
|
52 _LIT(KOpenServiceApp2Component, "openservice2app"); |
|
53 |
|
54 _LIT(KCtrlPanelAppSisFile, "z:\\apparctest\\apparctestsisfiles\\TCtrlPnlApp.sis"); |
|
55 _LIT(KCtrlPanelAppComponent, "TCtrlPnlApp"); |
|
56 |
|
57 _LIT(KDataPrioritySystem1SisFile, "z:\\apparctest\\apparctestsisfiles\\T_DataPrioritySystem1.sis"); |
|
58 _LIT(KDataPrioritySystem1Component, "T_DataPrioritySystem1"); |
|
59 |
|
60 _LIT(KDataPrioritySystem2SisFile, "z:\\apparctest\\apparctestsisfiles\\T_DataPrioritySystem2.sis"); |
|
61 _LIT(KDataPrioritySystem2Component, "T_DataPrioritySystem2"); |
|
62 |
|
63 _LIT(KDataPrioritySystem3SisFile, "z:\\apparctest\\apparctestsisfiles\\T_DataPrioritySystem3.sis"); |
|
64 _LIT(KDataPrioritySystem3Component, "T_DataPrioritySystem3"); |
|
65 |
|
66 /** |
33 /** |
67 Constructor |
34 Constructor |
68 */ |
35 */ |
69 CT_ServicesTestStep::CT_ServicesTestStep() |
36 CT_ServicesTestStep::CT_ServicesTestStep() |
70 { |
37 { |
84 @return - TVerdict code |
51 @return - TVerdict code |
85 Override of base class virtual |
52 Override of base class virtual |
86 */ |
53 */ |
87 TVerdict CT_ServicesTestStep::doTestStepPreambleL() |
54 TVerdict CT_ServicesTestStep::doTestStepPreambleL() |
88 { |
55 { |
89 CSisFileInstaller sisInstaller; |
|
90 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KServerApp2SisFile); |
|
91 sisInstaller.InstallSisL(KServerApp2SisFile); |
|
92 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KServerApp4SisFile); |
|
93 sisInstaller.InstallSisL(KServerApp4SisFile); |
|
94 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KServerApp6SisFile); |
|
95 sisInstaller.InstallSisL(KServerApp6SisFile); |
|
96 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KOpenServiceApp1SisFile); |
|
97 sisInstaller.InstallSisL(KOpenServiceApp1SisFile); |
|
98 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KOpenServiceApp2SisFile); |
|
99 sisInstaller.InstallSisL(KOpenServiceApp2SisFile); |
|
100 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KCtrlPanelAppSisFile); |
|
101 sisInstaller.InstallSisL(KCtrlPanelAppSisFile); |
|
102 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KDataPrioritySystem1SisFile); |
|
103 sisInstaller.InstallSisL(KDataPrioritySystem1SisFile); |
|
104 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KDataPrioritySystem2SisFile); |
|
105 sisInstaller.InstallSisL(KDataPrioritySystem2SisFile); |
|
106 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KDataPrioritySystem3SisFile); |
|
107 sisInstaller.InstallSisL(KDataPrioritySystem3SisFile); |
|
108 INFO_PRINTF2(_L("Installing sis file from -> %S"), &KServerApp7SisFile); |
|
109 sisInstaller.InstallSisAndWaitForAppListUpdateL(KServerApp7SisFile); |
|
110 |
|
111 SetTestStepResult(EPass); |
56 SetTestStepResult(EPass); |
112 TInt error = iApaLsSession.Connect(); |
57 TInt error = iApaLsSession.Connect(); |
113 TEST(error==KErrNone); |
58 TEST(error==KErrNone); |
114 return TestStepResult(); |
59 return TestStepResult(); |
115 } |
60 } |
118 @return - TVerdict code |
63 @return - TVerdict code |
119 Override of base class virtual |
64 Override of base class virtual |
120 */ |
65 */ |
121 TVerdict CT_ServicesTestStep::doTestStepPostambleL() |
66 TVerdict CT_ServicesTestStep::doTestStepPostambleL() |
122 { |
67 { |
123 CSisFileInstaller sisInstaller; |
|
124 sisInstaller.UninstallSisL(KServerApp2Component); |
|
125 sisInstaller.UninstallSisL(KServerApp4Component); |
|
126 sisInstaller.UninstallSisL(KServerApp6Component); |
|
127 sisInstaller.UninstallSisL(KServerApp7Component); |
|
128 sisInstaller.UninstallSisL(KOpenServiceApp1Component); |
|
129 sisInstaller.UninstallSisL(KOpenServiceApp2Component); |
|
130 sisInstaller.UninstallSisL(KCtrlPanelAppComponent); |
|
131 sisInstaller.UninstallSisL(KDataPrioritySystem1Component); |
|
132 sisInstaller.UninstallSisL(KDataPrioritySystem2Component); |
|
133 sisInstaller.UninstallSisL(KDataPrioritySystem3Component); |
|
134 return TestStepResult(); |
68 return TestStepResult(); |
135 } |
69 } |
136 |
70 |
137 |
71 |
138 TVerdict CT_ServicesTestStep::doTestStepL() |
72 TVerdict CT_ServicesTestStep::doTestStepL() |
149 } |
83 } |
150 |
84 |
151 TInt CT_ServicesTestStep::RunTestCasesL() |
85 TInt CT_ServicesTestStep::RunTestCasesL() |
152 { |
86 { |
153 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery1L(), iApaLsSession.ClearAppInfoArray() ); |
87 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery1L(), iApaLsSession.ClearAppInfoArray() ); |
154 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
155 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery2L(), iApaLsSession.ClearAppInfoArray() ); |
88 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery2L(), iApaLsSession.ClearAppInfoArray() ); |
156 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery3L(), NO_CLEANUP); |
89 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery3L(), NO_CLEANUP); |
157 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery4L(), NO_CLEANUP); |
90 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery4L(), NO_CLEANUP); |
158 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery5L(), NO_CLEANUP); |
91 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery5L(), NO_CLEANUP); |
159 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery6(), NO_CLEANUP); |
92 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery6(), NO_CLEANUP); |
160 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery7L(), NO_CLEANUP); |
93 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery7L(), NO_CLEANUP); |
161 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery8L(), NO_CLEANUP); |
94 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery8L(), NO_CLEANUP); |
162 #endif |
|
163 // The following two APIs InsertDataMappingL() & DeleteDataMappingL(), update the type store on the server side. |
95 // The following two APIs InsertDataMappingL() & DeleteDataMappingL(), update the type store on the server side. |
164 // This update takes place on the server side while the test case is still running, which causes the heap check to fail. |
96 // This update takes place on the server side while the test case is still running, which causes the heap check to fail. |
165 // To avoid the heap check on the server side, DONT_CHECK macro is used. |
97 // To avoid the heap check on the server side, DONT_CHECK macro is used. |
166 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
167 HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestServiceDiscovery9(), NO_CLEANUP ); |
98 HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestServiceDiscovery9(), NO_CLEANUP ); |
168 #endif |
|
169 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery10L(), NO_CLEANUP); |
99 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery10L(), NO_CLEANUP); |
170 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery11L(), NO_CLEANUP); |
100 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery11L(), NO_CLEANUP); |
171 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery12L(), NO_CLEANUP); |
101 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery12L(), NO_CLEANUP); |
172 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery13L(), NO_CLEANUP); |
102 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery13L(), NO_CLEANUP); |
173 |
103 |
203 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery22(), iApaLsSession.FlushRecognitionCache() ); |
133 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery22(), iApaLsSession.FlushRecognitionCache() ); |
204 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery23(), iApaLsSession.FlushRecognitionCache() ); |
134 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery23(), iApaLsSession.FlushRecognitionCache() ); |
205 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery24(), NO_CLEANUP); |
135 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery24(), NO_CLEANUP); |
206 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery25(), iApaLsSession.FlushRecognitionCache() ); |
136 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery25(), iApaLsSession.FlushRecognitionCache() ); |
207 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery27(), iApaLsSession.FlushRecognitionCache() ); |
137 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery27(), iApaLsSession.FlushRecognitionCache() ); |
208 //HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery28L(), NO_CLEANUP); |
138 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery28L(), NO_CLEANUP); |
209 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestOpenService1L(), NO_CLEANUP); |
139 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestOpenService1L(), NO_CLEANUP); |
210 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestCtrlPnlAppL(), NO_CLEANUP); |
140 HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestCtrlPnlAppL(), NO_CLEANUP); |
211 // The following two APIs InsertDataMappingL() & DeleteDataMappingL(), update the type store on the server side. |
141 // The following two APIs InsertDataMappingL() & DeleteDataMappingL(), update the type store on the server side. |
212 // This update takes place on the server side while the test case is still running, which causes the heap check to fail. |
142 // This update takes place on the server side while the test case is still running, which causes the heap check to fail. |
213 // To avoid the heap check on the server side, DONT_CHECK macro is used. |
143 // To avoid the heap check on the server side, DONT_CHECK macro is used. |