Software Testing

Software Testing


• 2008-Oct-7 - Test Case Design using Keywords - Part 1

Test Case Design using Keywords

 

 Abstract

 

The document details the various keyword test case design techniques and their pros and cons. The document will be of help to you if you are planning to use keyword driven approach for manual testing in your organization.

 

 

What is a Keyword?

 

Keyword is a short name for an event in an application with an associated parameter value. A keyword also can be considered as a test case with reusable navigation steps.

Keyword Example:

 

Most of the application requires the users to login to access the application. The business function “Login” can be implemented as a keyword where the user name and the password can be parameterized.

 

 

 

Window

Object

Action

Parameter

Login

User Name  Field

Input Text in Text Box

“User Id "

Login

Password Field

Input Password in Password Field

"Password"

Login

OK  Button

Click

N/A

                                               

                                    Table 1: Sample Keyword Test Case

 

 

Types of Keywords:

 

Generic keywords:

 

Test Cases developed for events performed on an object present in any window can be considered as a generic keyword.

 

 

Product specific keywords: -

 

Test Cases developed for functions performed in a product can be considered as a product specific keyword. This type of keywords can be divided broadly into two categories.

 

                                      I.      Workflow based: -

 

Reusable test cases are developed for a product workflow for example a keyword “Customer_Inquiry” can be used for searching for a customer in an Inquiry Application.

                                    II.      Window based: -

 

Reusable test cases are developed for each event performed in a window. For example an Inquiry window may have a large number of keywords. Selecting a search option can be a keyword and entering the search value in a text field can be another keyword.

 

 

Design of Keyword:-

 

Given below are the steps involved in developing a keyword driven approach for manual testing: -

 

a)       Identification

 

b)       Design

 

c)       Review

 

d)       Development of Test Cases.

 

e)       Maintenance          

 

 

 

Keyword Maintenance:

 

 

v      Keywords should be maintained by single person.

 

v      Keyword maintenance occurs whenever a :

 

Ø       Defect is detected in a keyword

 

Ø       Business workflow changes.

 

Ø       Keyword standards are modified.

 

 

Keyword Standards:

           

v      Each keyword should have a Name, Description, Parameter and Expected Result.

 

v      Number multiple parameters in a single keyword to retain order.

 

 

v      Change font color of the parameter for better readability.

 

Example: - Enter <<<1.User_ID>>> in the User ID field.

 

v      Make parameter a single word and use underscores to separate words if needed.

 

v      If a value is not needed in a field, then please enter “accept default value” in the test case.

 

 

v      Do not insert nested calls to Keyword test cases.

 

v      Mark the hard coded values inside a keyword using [].

 

Example: Click on the [OK] button.

 

 

Advantages:

 

v      Significantly reduces the effort for test case development and reviews.

 

v      Test cases will be easier to automate.

 

v      Modifying only the Keyword can modify change to the object in AUT in all the test cases.

 

v      Navigational Steps will be easy to execute, as the navigational test steps will be consistent across test plans.

 

 

Disadvantages:

 

v      Large numbers of keywords are difficult to maintain.

 

v      Training new team members requires more time.

 

v      Testing procedures may require modification to suit the approach.

 

 

 

 

 

Post A Comment! :: Send to a Friend!