Using Silk Test as a Automation tool

In general I am not a huge fan of the Prepackaged Test Automation Suites, however if you are going to use one I find that with a few exceptions Silk is the best one to have.

As far the best approach, Use a Keyword driven Test Methodology.

This is one step beyond a data driven approach and truly minimizes the maintenance overhead of the test automation infrastructure.

With Data Driven testing you have a test case which is a series of steps which are set by the code, but the data entered at each step is parameterized so that you can run the same test multiple times with different data.

Keyword driven testing takes the sequence of the steps themselves and removes them from the code the same way that data driven tests removes the data from the code.

In Silk you do this by controlling the names of the objects in the frame file. Come up with a naming convention so that you can predict the name of any object based on the window it is in, it's object class, and the user understandable name of the object.

You then "teach" your code how to associate keywords to specific objects, then you build a database or spreadsheet format that lists keywords that instruct the script what steps to take.

So for example, a simple login screen, that has a Username field, a Password Field, and a Submit Button, the objects would be named

Login_TextField_Username
Login_TextField_Password
Login_Button_Submit

One "row" of data in the test data would define one step in the testcase, it requires 5 pieces of information, The screen name, the object class, the name of the object in the screen, the action you which to take (generall this will correspond to a method available to that class, however it can be something custom too), and the data to apply.

The data for logging into the system would be


Row1

Screen - Login
Class - TextField
ObjectName - Username
Action - SetText
Data - ABC123

Row2

Screen - Login
Class - TextField
ObjectName - Password
Action - SetText
Data - "Passw0rd"


Row3

Screen - Login
Class - Button
ObjectName - Submit
Action - Click
Data -


The Automation code will then read your test data repository to not only get the data to use but also the sequence of steps to follow.

No comments:

TopOfBlogs Technology Blogs - Blog Catalog Blog Directory Software blogs feeds2read