summaryrefslogtreecommitdiffstats
path: root/QtMobility
diff options
context:
space:
mode:
authorKeith Isdale <keith.isdale@nokia.com>2010-11-24 08:23:27 +1000
committerKeith Isdale <keith.isdale@nokia.com>2010-11-24 08:23:27 +1000
commit324e82afb90a7a6c7d50b13769bd305d6dd6e28b (patch)
tree54dde3e9cb4429468984bc6fd060bf6b6872a9c9 /QtMobility
parent103c463641f794f5b1ff52c382a27ab44a3ae4cb (diff)
Add a "Run test application" test function
Add Run_Test_Application() and make use of startTestApp() to simplify changing test application name later on
Diffstat (limited to 'QtMobility')
-rw-r--r--QtMobility/sys_qmlcontacts/sys_qmlcontacts.qtt27
1 files changed, 23 insertions, 4 deletions
diff --git a/QtMobility/sys_qmlcontacts/sys_qmlcontacts.qtt b/QtMobility/sys_qmlcontacts/sys_qmlcontacts.qtt
index 30da173..ca0f23f 100644
--- a/QtMobility/sys_qmlcontacts/sys_qmlcontacts.qtt
+++ b/QtMobility/sys_qmlcontacts/sys_qmlcontacts.qtt
@@ -1,6 +1,12 @@
//TESTED_COMPONENT=src/contacts
+// make it simple to change the name of test application later on
+function startTestApp()
+{
+ startApplication('qmlcontacts');
+}
+
// create a re-usable contact set
function exampleContactSet()
{
@@ -121,6 +127,19 @@ function checkContact(contact)
testcase = {
+ // prove that the test application starts before anything else is tested.
+ Run_Test_Application: function()
+ {
+ startTestApp();
+ if (!runAsManualTest()){
+ // ensure we have a widget to work with, dump its details
+ print('Focus widget is' + focusWidget());
+ }else{
+ prompt('Verify test application started and closed without issue');
+ }
+ },
+
+
Check_Contact_List_data : {
ContactSet : [ exampleContactSet() ]
},
@@ -128,7 +147,7 @@ testcase = {
// verify that overview of contact names is correct
Check_Contact_List: function(contactSet)
{
- startApplication('qmlcontacts');
+ startTestApp();
for (var index=0; index < contactSet.length; index++){
// note the contact list should be the focus widget
select(contactSet[index].firstName);
@@ -143,7 +162,7 @@ testcase = {
// verify that when selecting a contact its summary is shown
Expand_A_Contact: function(contactSet)
{
- startApplication('qmlcontacts');
+ startTestApp();
for (var index = 0; index < 3; index++){
prompt("Verify that no details for " + contactSet[index].firstName +' is seen');
select(contactSet[index].firstName);
@@ -160,7 +179,7 @@ testcase = {
// verify that the details page for contacts can be seen
Show_All_Contact_Detail : function(contactSet)
{
- startApplication('qmlcontacts');
+ startTestApp();
for (var index = 0; index < 3; index++){
select(contactSet[index].firstName);
select('More..')
@@ -177,7 +196,7 @@ testcase = {
// check that each contact has the details expected
Check_Contact_Details: function(contactSet)
{
- startApplication('qmlcontacts');
+ startTestApp();
for (var index=0; index < contactSet.length; index++){
checkContact(contactSet[index]);
}