SilkTest Training - D2

Download SilkTest Training - D2

Post on 10-Apr-2018

223 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • 8/8/2019 SilkTest Training - D2

    1/10

    SilkTest: Basics and BeyondDay 2

  • 8/8/2019 SilkTest Training - D2

    2/10

    Anapplication state is the state you wa

    nt yourapplication to be in after the base state is restored but

    before you run one or more testcases.

    Application State

  • 8/8/2019 SilkTest Training - D2

    3/10

    How really A Testcase Works ?

    DefaultTestcaseEnter

    SetAppState

    DefaultBaseState

    Chain ofApplication state

    Testcase

    DefaultTestcaseExit

    SetBaseState

    BaseState

    Executes the application state chain associated with the testcase, from the

    base state up to the highest application state.

    The application is running. The application is not minimized. The application

    is the active application. No windows other than the applications main

    window are open.

    Calling SetBaseState for a testcase executes the statements associated with

    the base statethat is, the application state at the bottom of the appstate

    chain.

    Executes chain of application states

  • 8/8/2019 SilkTest Training - D2

    4/10

    Before the first line of your testcase begins running, the recovery system

    restores the application to the BaseState even if an unexpected event

    corrupted the application between testcases.

    During a testcase, if an application error occurs, the recovery system

    terminates the execution of the testcase, writes a message in the error

    log, and restores the application to the BaseState before running the next

    testcase.

    After the testcase completes, if the testcase was not able to clean up after

    itself (for example, it could not close a dialog it opened), the recovery

    system restores the application to the BaseState.

    Recovery System

  • 8/8/2019 SilkTest Training - D2

    5/10

    Default Recovery System

    Function Purpose

    DefaultBaseState Restores the default BaseState, then call the applications BaseState function, if defined.

    DefaultScriptEnter

    Executed when a script file is first accessed.

    Default action:none.

    DefaultScriptExit

    Executed when a script file is exited.

    Default action: Call the ExceptLog function if the script had errors.

    DefaultTestCaseEnter

    Executed when a testcase is about to start.

    Default action: Set the application state

    DefaultTestCaseExit

    Executed when a testcase has ended.

    Default action: Call the ExceptLog function if the script had errors, then set the BaseState

    DefaultTestPlanEnter

    Executed when a test plan is entered.

    Default action:none

    DefaultTestPlanExit

    Executed when a test plan is exited.

    Default action:none

  • 8/8/2019 SilkTest Training - D2

    6/10

    Recording, Verifying, Debugging TC

  • 8/8/2019 SilkTest Training - D2

    7/10

    Using Template of GUIHierarchy

  • 8/8/2019 SilkTest Training - D2

    8/10

    Bitmap

  • 8/8/2019 SilkTest Training - D2

    9/10

    Control Statements

    IfElse Statement

    For Statement

    For each statement

    While statement

    Do..except statement

    Switch statement

  • 8/8/2019 SilkTest Training - D2

    10/10

    Q?A

Recommended

View more >