3 – Selenium Testing Process-2

Selenium 3 – Selenium Testing Process Part -2

Selenium Test Process
iii) Enhance Test Cases
3) Synchronization

In UFT: Using Synchronization Point, or wait command or increase Tool default time

In Selenium IDE: Using Synchronization Timeout feature (Tool feature)
In Selenium WebDriver: Using programming wait feature or WebDriver command

4) Error Handling

Handling expected and unexpected Errors

In UFT: Using Recovery Scenarios (Tool feature) or VBScript features
In Selenium WebDriver: Using programming features (Ex: exception handling in Java)

5) Adding Comments
To make the code readable and to disable the code from execution

In UFT: We can use VBScript Comment syntax
In Selenium IDE: Using Selenium IDE comments syntax
In Selenium WebDriver: Using Programming Syntax (if we use Java then use Java Comment syntax)

iv) Run & Debug Test Cases

Run > Debug > Run…
Run Test Cases is a mandatory task in Testing, but Debugging Test cases is an optional task in automated testing

Run Test Scripts / Test Cases

Run a Single Test case
Batch Testing

In UFT:
Use “Test Batch Runner” tool or using AOM Script or ALM/QC etc…

In Selenium WebDriver: Using Programming and using Testing Framework

Using Programming and using Testing Framework

In Selenium IDE: Using Test Suite feature

Debug Test Cases

Note: Debugging feature is NA for Manual Testing and It is only for Automated Testing

What is Debugging?

Locating and isolating errors through step by step execution

Application Life Cycle

Development Testing Production

Error Fault Failure
Mistake Defect

Bug

When debugging is required?

Scenario 1: Test Case is not showing any error and providing desired result – Not required

Scenario 2: Test Case is showing errors – Optional

Scenario 3: Test Case is not showing any error and not providing desired result – Required

Whenever Test case is not showing any error and not providing desired result there debugging is required.

v) Analyze Test Result and Report Defects

a) Analyze Test Result:

Selenium WebDriver doesn’t have built-in Result Report facility, using Programming control Flow statements or Testing Framework verification methods we can generate Test Results

Status of Test Results in Software Testing
1) Pass (if expected == actual)
2) Fail (if expected != actual)
3) Warning (Whenever Test Case is not executing properly)
4) Done (if there is no verification point in the Test case)

b) Reporting Defects:

After analyzing the test Results, if we find any deviation from expected then report defects….

Functional Test Automation Defect Management

Selenium Excel

Selenium Bugzilla or Jira…

Introduction to Automated Testing

1) Drawbacks of Manual Testing
2) Advantages of Test Automation
3) Disadvantages of Test Automation

1) Drawbacks of Manual Testing

• Manual Testing requires more time or more resources (Human resources and Environmental Resources), sometimes both.

• Performance testing is impractical in Manual Testing (Organizing thousands of machines and human users is not possible).

• Less Accuracy (Human Users may make mistakes)

• Executing same tests again and again is time taking process as well as Tedious.

• Verifying GUI Objects Size differences and Color combinations are not easy in Manual Testing.

• Not Suitable for Large scale projects and time bounded projects.

• Batch Testing is not possible, but for each and every test case execution Human user interaction is mandatory.

• Manual Test Case scope is very limited (Human user can concentrate on one or two verification points only), if it is Automated test, scope is unlimited (Tool is software it can concentrate on multiple verification points at a time).

• Comparing large amount of data is impractical (If we want compare Thousands of Records, it is not possible, but Test Tool can compare thousands of records).

• Checking relevance of search of operation is difficult

• Processing change requests during software maintenance takes more time.

2) Advantages of Test Automation

a) Fast:
Automated tests are significantly faster than human users.

Test Tools are faster in Test execution than human users, In Software Testing two important tasks,

i) Test Design ii) Test Execution or Test Run

In case of Test design Test Tools are not faster, for Test Design human user interaction is mandatory. Test Tools provide IDE (Integrated Environment) for designing Tests.
In case of Test Execution Test Tools are faster than human users, Tool can execute series of Tests quickly without user interaction. Anyhow Test Design one time activity but Test execution multiple times, so defiantly we can save Time.

b) Reliable
Tests perform precisely the same operations each time they are run, thereby eliminating human error. Human Users may make mistakes, if you provide proper logic Test Tool can provide correct output every time.

c) Repeatable
We can test how the application reacts after repeated execution of the same operations. We can execute same operations (Data Driven Testing) using multiple sets of Test Data. If it is Manual Testing, takes more time.

Why we need to execute same operations multiple times?

For Positive and Negative Testing we conduct Data Driven Testing.

d) Programmable
We can program sophisticated tests that bring out hidden information. We can apply programming features to our tests (Ex: Flow control statements, Functions etc…) We can insert multiple verification points in an Automated Test, Test Tool is software it can concentrate on multiple verification points at a time, but in Manual testing human user can concentrate on one or two verification. points at a time, So Automated Test scope is very high than Manual Test case.

e) Comprehensive
We can build a suite of tests (Batch Testing) that covers every feature in our Application. Software Test Tools support Batch Testing (Executing Series of Tests), we can create test batches, without human user interaction Tools can execute test batches, if it is manual testing, each and every test case execution user interaction is mandatory.

f) Reusable
We can reuse tests on different versions of an application, even if the user interface changes.
Ex: Sanity Tests, Regression Tests

3) Disadvantages of Test Automation

a) 100% test automation is impractical, generally we try to automate maximum test scenarios.

b) All types of testing is not possible (Ex: Usability Testing)

c) More Efforts required at initial stage of Test Automation.

d) Not suitable for dynamically changing UI designs

e) Debugging issues

f) Tools may have their own defects, so we may not get desired benefits.

g) Lack of knowledge

h) Environment limitations (In UFT, if you want test Java Application Java Add in required, SAP Application SAP Add in required, UFT is not providing Add ins for All Environments.)

If it is manual testing no Environment limitations, irrespective of the Application Environment you can apply manual testing methods.