22
Test Automation For Web-Based Test Automation For Web-Based Applications Applications Portnov Computer School Portnov Computer School 1 Selenium Selenium HP Web Test Tool HP Web Test Tool Training Training

Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Embed Size (px)

DESCRIPTION

3 Test Case List View Menu List Record/Review Test Cases View Table/Source Test Case View Log/ Reference/ UI-Element/ Rollup View

Citation preview

Page 1: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Test Automation For Web-Based Test Automation For Web-Based ApplicationsApplications

Portnov Computer SchoolPortnov Computer School

1

Selenium Selenium HP Web Test Tool TrainingHP Web Test Tool Training

Page 2: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

2

Quick Tour of Selenium IDE

Simple Features

Page 3: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

3

Test Case List View

Menu List

Record/Review Test Cases View

Table/SourceTest Case View

Log/Reference/UI-Element/Rollup View

Page 4: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

4

To Run a Test Suite Click Here

Displays all the test cases

available in a test suite

To Run a Single Test Case Click

Here

Test Case List View

Displays the test run results

Page 5: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

5

Light Green indicates the step is executed successfully

Dark Green indicates the step

command is verified

successfully

Red indicates the step is

failed during execution

Table/Source Test Case View

Displays command, Target

and Value

Allows editing of a specific step

Allows you to find the log or reference

information of that step.

Page 6: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

6

Pink color denotes it is a

comment

You can toggle breakpoint by pressing B or selecting from the right click menu

You can insert a new command

Right Click to insert a comment

Cut, Copy, Paste, Delete commands

Clears current test case (Be careful!)

You can set a new starting point for test execution

You can execute a specific test step by pressing X

Page 7: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

7

To set the speed of the test cases

Click to Pause/Resume

playback

To Apply Rollup roles

To Play the test suite

To Play the current test case

Switch between Table and Source View

To step through the test cases

To view the test execution in Test

Runner

Page 8: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Provides current test case execution Provides current test case execution detailsdetails

Contains each step processed resultContains each step processed result Failed step will have a red textFailed step will have a red text Log is filtered into 4 different categoriesLog is filtered into 4 different categories

Debug – Debugging informationDebug – Debugging information Info – Execution informationInfo – Execution information Error – Error Information (for failed test Error – Error Information (for failed test

steps)steps) Warn – Any warningsWarn – Any warnings 8

Page 9: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

9

To view the test execution in Test

Runner

Filters only on Error

Error is displayed in Red Color

Filter Info only for Warn or Error

Press Clear to remove the existing log

Log View

Page 10: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

10

You can toggle between Log, Reference, UI-Element and Rollup

Arguments required for this command

Displays comprehensive information about the current test case step command

Reference ViewExplanation

about the command

Page 11: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Contains the following menus:Contains the following menus: File, Edit, Options, HelpFile, Edit, Options, Help

Test Running IDE Provides:Test Running IDE Provides: Test Case List ViewTest Case List View Record/Review Test Case ViewRecord/Review Test Case View Table/Source Test Case ViewTable/Source Test Case View Log/Reference/UI-Element/Rollup ViewLog/Reference/UI-Element/Rollup View

11

Page 12: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

12

Allows you to create, open,

save, export and to view recent

test cases

Allows you to create, open,

save and to view recent test

suites

Save/discard last changes

before closing the current

test case/suite

Page 13: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Available for the following languages:Available for the following languages: HTMLHTML JavaJava C#C# PerlPerl PHPPHP PythonPython RubyRuby

13

Page 14: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Redo or undo the Redo or undo the performed actionsperformed actions

Select All or Partial Test Select All or Partial Test cases then cut, copy, paste cases then cut, copy, paste and delete them.and delete them.

When the clipboard format is When the clipboard format is set to a specific language - set to a specific language - will copy in that specific will copy in that specific language format.language format.

14

Page 15: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Customize default values under General Customize default values under General OptionsOptions

Add new test case formatsAdd new test case formats

Set a default test case format to use in the Set a default test case format to use in the Selenium IDESelenium IDE

Set a default clipboard format to copy Set a default clipboard format to copy from Selenium IDE from Selenium IDE

15

Page 16: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

16

Test File encoding format (UTF-8, UTF-16)

Default time-out value

Allows you add extensions•Selenium IDE extensions•Selenium Core •(user-extensions.js)

Other commonly used settings: •Base URL•Record assertTitle automatically•Record absolute URL•Enable UI-Element

Page 17: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

17

For each command table entry the regular expression to set it up

Selenium IDE currently available language formats for

test cases

Template for new test html files (Applied when you use File New

Test Case

Template for command entries test html files (You can see while

recording and reviewing test cases

Add a new / view the existing language format for test cases

Page 18: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

18

Allows user to switch the test

case source view from one language format to another

Allows you to select a specific

format for copying into Clipboard

Page 19: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

UI Element Documentation is the only UI Element Documentation is the only menu item related to Seleniummenu item related to Selenium

All other menu items belong to Firefox All other menu items belong to Firefox browserbrowser

UI Element Documentation is a Selenium UI Element Documentation is a Selenium reference materialreference material

19

Page 20: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Add an employee and verify that a new Add an employee and verify that a new employee was added to the employee list.employee was added to the employee list.

20

Page 21: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

Test-Case Objective:Test-Case Objective: Ensure new employee Ensure new employee is added to employee is added to employee listlist

Steps Steps 1.1. LoginLogin2.2. Select Add Employee Select Add Employee

menu itemmenu item3.3. Provide First and Last Provide First and Last

name for the new name for the new employee and click Save employee and click Save buttonbutton

4.4. View the Employee ListView the Employee List5.5. Verify that the added Verify that the added

employee First and Last employee First and Last name has been added to name has been added to the employee list.the employee list.

6.6. Log outLog out

Expected ResultExpected ResultNew employee name New employee name has been added to the has been added to the employee listemployee list

Page 22: Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training

MANUAL TEST-CASEMANUAL TEST-CASE

Test-Case ObjectiveTest-Case Objective : :Ensure new employee is Ensure new employee is added to employee listadded to employee list

Steps:Steps:1)1) LoginLogin2)2) Select Add Employee menu Select Add Employee menu

itemitem3)3) Provide First and Last name Provide First and Last name

for the new employee and for the new employee and click Save buttonclick Save button

4)4) View the Employee ListView the Employee List5)5) Verify that the added Verify that the added

employee First and Last name employee First and Last name has been added to the has been added to the employee list.employee list.

6)6) Log outLog outExpected ResultExpected Result1)1) New employee name has New employee name has

been added to the employee been added to the employee listlist

22

MANUAL TEST-CASEMANUAL TEST-CASE AUTOMATED TEST-CASE