messagingfw/msgtestfw/TestCases/ScriptedTestCases/ConnectAndSyncMultipleImap4Email.script
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     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:
       
    15 //
       
    16 // Test Case Name:
       
    17 //	ConnectAndSyncMultipleImap4Email.script
       
    18 // ------------------------------------------
       
    19 // Component Under Test:
       
    20 //	Email
       
    21 // ------------------------------------------
       
    22 // API function under test:
       
    23 //	CImap4ClientMtm::InvokeAsyncFunctionL()
       
    24 //	with IMAP4 command KIMAP4MTMConnect and 
       
    25 //	command KIMAP4MTMFullSync and command
       
    26 //  KIMAP4MTMConnectAndPopulateNewMailAndStayDisconnect
       
    27 // ------------------------------------------
       
    28 // Requirement/Use Case/Functional Spec:
       
    29 //	DEF 045525 
       
    30 // ------------------------------------------
       
    31 // Polarity:
       
    32 //	Positive
       
    33 // ------------------------------------------
       
    34 // Test Type (unit, integration, panic, performance, conformance, stress, or interoperability):
       
    35 //	Integration
       
    36 // ------------------------------------------
       
    37 // Expected Panic ID (if a panic test, only for non-scripted test cases):
       
    38 //	n/a
       
    39 // ------------------------------------------
       
    40 // Interface Dependencies (does it require connection, which subsystems does it require):
       
    41 // 	NTRAS
       
    42 // ------------------------------------------
       
    43 // Importance (critical, high, or low):
       
    44 //	High
       
    45 // ------------------------------------------
       
    46 // Execution Time (fast, medium, or slow):
       
    47 //	medium
       
    48 // ------------------------------------------
       
    49 // Pre-condition description:
       
    50 //	1.  Set the SMTP and IMAP4 service settings for an IMAP4 account
       
    51 //	2.  Connect to IMAP4 server and synchronise with the IMAP4 server 
       
    52 //	3.  Delete all mails in the Inbox on the server
       
    53 //	4.  Disconnect from IMAP4 server
       
    54 //
       
    55 //	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
       
    56 //	account are cleaned up before starting the test.
       
    57 // ------------------------------------------
       
    58 // Action Description:
       
    59 // 	Main purpose of test that to check that emails marked as New after a Sync operation stay
       
    60 //  as new after subsequent Sync operations in the same connection. This behaviour was previously
       
    61 //  fixed by old defect EDNSHAY-4NANNL (p4 changeset 52023), but this fix was the cause of DEF045525.
       
    62 //  So the same behaviour has been implemented in a different way to fix DEF 045525 and maintain
       
    63 //  the fix for EDNSHAY-4NANNL.
       
    64 //	
       
    65 // 	Implementation and execution:
       
    66 //	1.  Create 2 emails from data file and send emails to the same account
       
    67 //	2.  Connect, Synchronise Inbox and Disconnect
       
    68 //  3.  Send 2 more emails to the same account
       
    69 //  4.  Connect to IMAP server
       
    70 //	5.  Synchronise Inbox 
       
    71 //  6.  Wait 15 seconds
       
    72 //	7.  Synchronise Inbox 
       
    73 //  8.  Wait 15 seconds
       
    74 //	9.  Synchronise Inbox 
       
    75 // 10.  Disconnect from IMAP4 server
       
    76 // 11.  Fetch the mails with IMAP4 KIMAP4MTMConnectAndPopulateNewMailAndStayDisconnect command
       
    77 // 12.  Check the received messages' flags. 
       
    78 //		
       
    79 // ------------------------------------------
       
    80 // Post-condition description (i.e., expected outcome):
       
    81 //      Should have 4 messages, 2 New, 2 Complete (fetched)
       
    82 //		
       
    83 // ------------------------------------------
       
    84 // Reference to a review document:
       
    85 //	
       
    86 // ------------------------------------------
       
    87 // Full pathname of an epoc.ini (if there are special epoc.ini requirements)
       
    88 // 	For emulator, an epoc.ini that creates an emulated external drive (drive letter 
       
    89 //	between D: and Y:) is required. Optionally, an environment variable can be defined.
       
    90 // ------------------------------------------
       
    91 // Any CommDb restrictions:
       
    92 //	NTRAS CommDb (should have reasonably long idle timeout values to avoid disconnection during
       
    93 //  Sleep actions
       
    94 // ------------------------------------------
       
    95 // Build Requirements (e.g., no watchers):
       
    96 //	No Watchers and Phone Book Synchroniser
       
    97 // ------------------------------------------
       
    98 // Hardware Requirements
       
    99 //	Null Modem Cable for NT RAS connection
       
   100 // ------------------------------------------
       
   101 RUN_UTILS DeleteFile c:\messaging.db
       
   102 LOAD_SUITE MessagingTestServer -SharedData
       
   103 
       
   104 //CED c:\msgtest\TestFramework\Configurations\CommDbSettings\NtRasLongIdleTimeout.cfg
       
   105 PREFIX RUN_TEST_STEP 100 MessagingTestServer 
       
   106 BEGIN_TEST_CASE
       
   107 SETUP_TEST_CASE
       
   108 GetBaseConstants				c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini GetBaseConstants
       
   109 InitNtRas						c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini InitNtRas
       
   110 CreateSession					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateSession
       
   111 ResetMessageStore				c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini ResetMessageStore
       
   112 CreateImap4Service				c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateImap4Service
       
   113 CreateSmtpService				c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateSmtpService
       
   114 CreateRegistry					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateRegistry
       
   115 CreateImap4Mtm					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateImap4Mtm
       
   116 CreateSmtpMtm					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateSmtpMtm
       
   117 GetDefaultSmtpService				c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini GetDefaultSmtpService
       
   118 SetImap4ServiceParameters		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini SetImap4ServiceParameters
       
   119 SetSmtpServiceParameters		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini SetSmtpServiceParameters
       
   120 SetDefaultConfiguration			c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini SetDefaultConfiguration2
       
   121 ConnectImap4Server   			c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini ConnectImap4Server0
       
   122 DoFullImap4Synchronisation		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DoFullImap4Synchronisation0
       
   123 FindEntryByName					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini FindEntryByName0
       
   124 DeleteChildren					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DeleteChildren
       
   125 CheckChildrenCount				c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CheckChildrenCount0
       
   126 DisconnectImap4Server			c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DisconnectImap4Server0
       
   127 EXECUTE_TEST_CASE
       
   128 CreateSmtpMessageFromEmailFile	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateSmtpMessageFromEmailFile0
       
   129 CopyEntry						c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CopyEntry0
       
   130 CreateSmtpMessageFromEmailFile	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateSmtpMessageFromEmailFile1
       
   131 CopyEntry						c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CopyEntry1
       
   132 Sleep		   					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini Sleep5
       
   133 ConnectImap4Server		   		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini ConnectImap4Server1
       
   134 DoFullImap4Synchronisation   	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DoFullImap4Synchronisation1
       
   135 DisconnectImap4Server			c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DisconnectImap4Server1
       
   136 CreateSmtpMessageFromEmailFile	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateSmtpMessageFromEmailFile0
       
   137 CopyEntry						c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CopyEntry0
       
   138 CreateSmtpMessageFromEmailFile	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CreateSmtpMessageFromEmailFile1
       
   139 CopyEntry						c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CopyEntry1
       
   140 Sleep		   					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini Sleep5
       
   141 ConnectImap4Server		   		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini ConnectImap4Server1
       
   142 DoFullImap4Synchronisation   	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DoFullImap4Synchronisation1
       
   143 Sleep		   					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini Sleep15
       
   144 DoFullImap4Synchronisation   	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DoFullImap4Synchronisation1
       
   145 Sleep		   					c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini Sleep15
       
   146 DoFullImap4Synchronisation   	c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DoFullImap4Synchronisation1
       
   147 DisconnectImap4Server			c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini DisconnectImap4Server1
       
   148 SetImap4FullDownloadLimits		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini SetImap4FullDownloadLimits1 
       
   149 DoImap4ConnectAndPopulateNewMailAndDisconnect   		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini ConnPopulateNewMailAndDisconn
       
   150 CHECK_POSTCONDITIONS
       
   151 CheckChildrenCount		   		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CheckChildrenCount4
       
   152 CheckChildrenCountWithFlagNew		   		c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CheckChildrenCountWithFlagNew2
       
   153 CheckChildrenCountWithFlagComplete			c:\msgtest\TestFramework\ScriptedTestCases\ConnectAndPopulateImap4EmailTests.ini CheckChildrenCountWithFlagComp2
       
   154 END_TEST_CASE