Selenium Testing Life Cycle

Selenium Tutorial
Selenium Testing Life Cycle / Selenium Test Process

Phases of Software Test Process or Software Test Life Cycle

1) Test Planning
2) Generating Basic Tests
3) Enhancing Tests
4) Running & Debugging Tests
5) Analyzing Test Results and Reporting Defects
----------------------------------------
1) Test Planning

> Get Application Environment (UI design and Database) details from development team
> Analyze the AUT in terms of Objects/Elements Identification

Using Recording feature in Selenium IDE
Or
Using Element Inspectors we can inspect Elements.
Mozilla Firefox - Page Inspector
Chrome or IE - Developer Tools

> Select Test Cases for Automation

    Test Cases that we have to execute on every software build (Sanity Tests)
    Test Cases that we have to execute on every modified software build (Regression Tests)
    Test Cases that we have to execute using multiple sets of Test data (Data Driven Tests)

> Choose Selenium Tools and Configure
----------------------------------------
2) Generating Basic Tests

In UFT/QTP

    1) Object Repository based Test Design (Recording, keyword driven methodology)
    2) Descriptive Programming / programmatic Descriptions

In Selenium:

Selenium IDE:

    a) Using Recording
    Or
    b) Type Test steps using Element Locators and Selenese Commands

Selenium WebDriver
    Using Element Locators and WebDriver Commands / Methods   
----------------------------------------
3) Enhancing Tests

i) Inserting Verification Points

In UFT/QTP

    Using UFT Checkpoints or VBScript Conditional Statements

In Selenium

    Selenium IDE
        Using Assert / Verify Commands

    Selenium WebDriver
        Using Java Flow Control Statements (Conditional)
        Or
        Using Testing Framework (JUnit / TestNG) Assertion Methods
----------------------------------------------------
ii) Parameterization

Replacing constant (fixed) values with Parameters (ex: variables)

Purpose of Parameterization
    To pass single value (When we call user defined methods)
    To pass multiple values (To conduct Data Driven Testing)

What is Data Driven Testing?

Testing the same functionality using multiple sets of Test Data.

Why Data Driven Testing?

For Positive and Negative Testing

Relation between Parameterization and Data Driven Testing
We use Parameterization feature in Data Driven Testing

In UFT / QTP

Using UFT Tool feature Data Table or by importing External files (Test data file)

Selenium IDE
    Selenium IDE doesn't support Parameterization

Selenium WebDriver
    By importing External files (Test data file) we can Parameterize Test cases
----------------------------------------------------
iii) Synchronization

What is Synchronization?

Why Synchronization?

How to Synchronize Selenium and AUT?
Using WebDriver Command or Java Method
----------------------------------------------------
iv) Error Handling

Handling expected and unexpected errors

In UFT:

Using Recovery Scenarios or VBScript features

In Selenium WebDriver
Using Java Exception handling

v) Adding Comments (Optional)
    To make the code readable
    To make the code disable from execution

Etc...
-------------------------------------------
4) Running & Debugging Tests

Running ......
Running - Debugging - Running....
----------------------------------
Running / Execution
Types of Test Run
    1) Single Test Run
    2) Batch Testing
        You can write &execute  multiple test cases in a Java Class
        Or
        Using Testing Framework (JUnit/TestNG)
---------------------------------
Debugging Test Cases (Optional)

What is debugging?
Locating and isolating errors through step by step execution

When Debugging is required?

Scenario 1: Test Case is not showing any errors and providing correct output - Not required

Scenario 2: Test Case is showing errors- Debugging optional

Scenario 3: Test Case is not showing any errors and Not providing correct output - Required
----------------------------------------------------------------
5) Analyze Test Results and Reporting Defects

Analyze Test Results

Selenium IDE provides Test Result (Summary only) for every Test Iteration.

Selenium WebDriver doesn't have Reporting facility

Using Java Programming we can define Test Results
Or
Using Testing Framework (JUnit/TestNG) we can generate Test Reports.

----------------------------------------------
Status of Test Results in Functional Test Automation

1) Pass (if Expected = Actual)

2) Fail (if Expected != Actual)

3) Done (if there is no verification point in the Test Case)

4) Warning (if any interruption during test execution)
-------------------------------------------
Reporting Defects

No Tool Integration with Selenium for Test Management / Defect Management

Functional Test Automation         Defect Management
-----------------------------------------------------------------------------
Selenium                                   Manual
------------------------------------------------------------------------------
Selenium                                   Bugzilla / Jira etc...
--------------------------------------------------------------------------------

0 comments:

Post a Comment