Subscribe

RSS Feed (xml)



Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, June 2, 2008

Choosing Automation tool for your organization

I am working on Search engine project for last 6 months and now I understood most of the functionality and search engine strategies.

When you work as a Manual tester then somewhere you feel to automate your work. Sometimes doing routine manual work bores you. So here comes the need of Automation.
So Automation is very helpful for the regression type of work, to avoid repeated manual work. Now I understood the need of Automation and I want to start with it, but from where shall I start is the big question.

Before starting the Automation of your project work you need to remember following points:

1. What is the type of my project? Is it a stand-alone project or a client – server project?
2. What is the size of my project? You can find size on various metrics like kilo line of code. 3. Is there repeated work in my project?
4. Time taken for My current Manual project testing
5. Error rate by Manual testing.

In next some posts I will discuss about the Advantage – Disadvantages of Manual and Automation testing, also the step-by-step process to automate your project work.

Tips you should read before automating your testing work

I was getting too many questions on when and how to automate testing process. Instead of answering them individually I thought it would be better to have some discussion here. I will put my thoughts about when to automate, how to automate or should we automate our testing work? I know there some of our readers are smarter than me. So it would be always a good idea to start a meaningful discussion on such vast topic to get in-depth idea and thoughts from experts from different areas and their experience in automation testing.

Why Automation testing?
1) You have some new releases and bug fixes in working module. So how will you ensure that the new bug fixes have not introduced any new bug in previous working functionality? You need to test the previous functionality also. So will you test manually all the module functionality every time you have some bug fixes or new functionality addition? Well you might do it manually but then you are not doing testing effectively. Effective in terms of company cost, resources, Time etc. Here comes need of Automation.

2) You are testing a web application where there might be thousands of users interacting with your application simultaneously. How will you test such a web application? How will you create those many users manually and simultaneously? Well very difficult task if done manually.
- Automate your load testing work for creating virtual users to check load capacity of your application.

3) You are testing application where code is changing frequently. You have almost same GUI but functional changes are more so testing rework is more.
- Automate your testing work when your GUI is almost frozen but you have lot of frequently functional changes.

What are the Risks associated in Automation Testing?
There are some distinct situations where you can think of automating your testing work. I have covered some risks of automation testing here. If you have taken decision of automation or are going to take sooner then think of following scenarios first.

1) Do you have skilled resources?
For automation you need to have persons having some programming knowledge. Think of your resources. Do they have sufficient programming knowledge for automation testing? If not do they have technical capabilities or programming background that they can easily adapt to the new technologies? Are you going to invest money to build a good automation team? If your answer is yes then only think to automate your work.

2) Initial cost for Automation is very high:
I agree that manual testing has too much cost associated to hire skilled manual testers. And if you are thinking automation will be the solution for you, Think twice. Automation cost is too high for initial setup i.e. cost associated to automation tool purchase, training and maintenance of test scripts is very high.
There are many unsatisfied customers regretting on their decision to automate their work. If you are spending too much and getting merely some good looking testing tools and some basic automation scripts then what is the use of automation?

3) Do not think to automate your UI if it is not fixed:
Beware before automating user interface. If user interface is changing extensively, cost associated with script maintenance will be very high. Basic UI automation is sufficient in such cases.

4) Is your application is stable enough to automate further testing work?
It would be bad idea to automate testing work in early development cycle (Unless it is agile environment). Script maintenance cost will be very high in such cases.

5) Are you thinking of 100% automation?
Please stop dreaming. You cannot 100% automate your testing work. Certainly you have areas like performance testing, regression testing, load/stress testing where you can have chance of reaching near to 100% automation. Areas like User interface, documentation, installation, compatibility and recovery where testing must be done manually.

6) Do not automate tests that run once:
Identify application areas and test cases that might be running once and not included in regression. Avoid automating such modules or test cases.

7) Will your automation suite be having long lifetime?
Every automation script suite should have enough life time that its building cost should be definitely less than that of manual execution cost. This is bit difficult to analyze the effective cost of each automation script suite. Approximately your automation suite should be used or run at least 15 to 20 times for separate builds (General assumption. depends on specific application complexity) to have good ROI.

Here is the conclusion:

Automation testing is the best way to accomplish most of the testing goals and effective use of resources and time. But you should be cautious before choosing the automation tool. Be sure to have skilled staff before deciding to automate your testing work. Otherwise your tool will remain on the shelf giving you no ROI. Handing over the expensive automation tools to unskilled staff will lead to frustration. Before purchasing the automation tools make sure that tool is a best fit to your requirements. You cannot have the tool that will 100% match with your requirements. So find out the limitations of the tool that is best match with your requirements and then use manual testing techniques to overcome those testing tool limitations. Open source tool is also a good option to start with automation.

Instead of relying 100% on either manual or automation use the best combination of manual and automation testing. This is the best solution (I think) for every project. Automation suite will not find all the bugs and cannot be a replacement for real testers. Ad-hoc testing is also necessary in many cases.

Over to you. I would like to here your experience about automation testing. Any practical experience will always be helpful for our readers.



QuickTest Pro - QTP Functional testing tool review

QTP is widely used test automation tool mainly for functional testing. QTP has many more advanced options and HP recommends that all existing and new users should begin with QTP instead of WinRunner.

Features of QTP:
  • Ease of use.
  • Simple interface.
  • Presents the test case as a business workflow to the tester (simpler to understand).
  • Uses a real programming language (Microsoft’s VBScript) with numerous resources available.
  • QuickTest Pro is significantly easier for a non-technical person to adapt to and create working test cases, compared to WinRunner.
  • Data table integration better and easier to use than WinRunner.
  • Test Run Iterations/Data driving a test is easier and better implement with QuickTest.
  • Parameterization easier than WinRunner.
  • Can enhance existing QuickTest scripts without the “Application Under Test” being available; by using the ActiveScreen.
  • Can create and implement the Microsoft Object Model (Outlook objects, ADO objects, FileSystem objects, supports DOM, WSH, etc.).
  • Better object identification mechanism.
  • Numerous existing functions available for implementation - both from within QuickTest Pro and VBScript.
  • QTP supports .NET development environment
  • XML support
  • The Test Report is more robust in QuickTest compared to WinRunner.
  • Integrates with TestDirector and WinRunner (can kick off WinRunner scripts from QuickTest).

I am getting more and more questions on QTP. So I have approached some QTP experts to answer all our readers questions. If you have any query related to QTP implementation or execution you can comment it below. All questions will be answered in coming posts.

Learning basics of QTP automation tool and preparation of QTP interview questions

This post is in continuation with QTP interview questions series. Following questions will help for preparing interview as well as learning the QTP basics.

Quick Test Professional: Interview Questions and answers.

1. What are the features and benefits of Quick Test Pro(QTP)?

1. Key word driven testing
2. Suitable for both client server and web based application
3. VB script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features

BVT types

New Build is checked mainly for two things:
  • Build validation
  • Build acceptance

Some BVT basics:

  • It is a subset of tests that verify main functionalities.
  • The BVT’s are typically run on daily builds and if the BVT fails the build is rejected and a new build is released after the fixes are done.
  • The advantage of BVT is it saves the efforts of a test team to setup and test a build when major functionality is broken.
  • Design BVTs carefully enough to cover basic functionality.
  • Typically BVT should not run more than 30 minutes.
  • BVT is a type of regression tesing, done on each and every new build.

BVT primarily checks for the project integrity and checks whether all the modules are integrated properly or not. Module integration testing is very important when different teams develop project modules. I heard many cases of application failure due to improper module integration. Even in worst cases complete project gets scraped due to failure in module integration.

What is the main task in build release? Obviously file ‘check in’ i.e. to include all the new and modified project files associated with respective builds. BVT was primarily introduced to check initial build health i.e. to check whether - all the new and modified files are included in release, all file formats are correct, every file version and language, flags associated with each file.
These basic checks are worth before build release to test team for testing. You will save time and money by discovering the build flaws at the very beginning using BVT.

Which test cases should be included in BVT?

This is very tricky decision to take before automating the BVT task. Keep in mind that success of BVT depends on which test cases you include in BVT.

Here are some simple tips to include test cases in your BVT automation suite:

  • Include only critical test cases in BVT.
  • All test cases included in BVT should be stable.
  • All the test cases should have known expected result.
  • Make sure all included critical functionality test cases are sufficient for application test coverage.

Also do not includes modules in BVT, which are not yet stable. For some under-development features you can’t predict expected behavior as these modules are unstable and you might know some known failures before testing for these incomplete modules. There is no point using such modules or test cases in BVT.

You can make this critical functionality test cases inclusion task simple by communicating with all those involved in project development and testing life cycle. Such process should negotiate BVT test cases, which ultimately ensure BVT success. Set some BVT quality standards and these standards can be met only by analyzing major project features and scenarios.

Example: Test cases to be included in BVT for Text editor application (Some sample tests only):
1) Test case for creating text file.
2) Test cases for writing something into text editor
3) Test case for copy, cut, paste functionality of text editor
4) Test case for opening, saving, deleting text file.

These are some sample test cases, which can be marked as ‘critical’ and for every minor or major changes in application these basic critical test cases should be executed. This task can be easily accomplished by BVT.

BVT automation suits needs to be maintained and modified time-to-time. E.g. include test cases in BVT when there are new stable project modules available.

What happens when BVT suite run:
Say Build verification automation test suite executed after any new build.
1) The result of BVT execution is sent to all the email ID’s associated with that project.
2) The BVT owner (person executing and maintaining the BVT suite) inspects the result of BVT.
3) If BVT fails then BVT owner diagnose the cause of failure.
4) If the failure cause is defect in build, all the relevant information with failure logs is sent to respective developers.
5) Developer on his initial diagnostic replies to team about the failure cause. Whether this is really a bug? And if it’s a bug then what will be his bug-fixing scenario.
6) On bug fix once again BVT test suite is executed and if build passes BVT, the build is passed to test team for further detail functionality, performance and other testes.

This process gets repeated for every new build.

Why BVT or build fails?
BVT breaks sometimes. This doesn’t mean that there is always bug in the build. There are some other reasons to build fail like test case coding error, automation suite error, infrastructure error, hardware failures etc.
You need to troubleshoot the cause for the BVT break and need to take proper action after diagnosis.

Tips for BVT success:
1) Spend considerable time writing BVT test cases scripts.
2) Log as much detailed info as possible to diagnose the BVT pass or fail result. This will help developer team to debug and quickly know the failure cause.
3) Select stable test cases to include in BVT. For new features if new critical test case passes consistently on different configuration then promote this test case in your BVT suite. This will reduce the probability of frequent build failure due to new unstable modules and test cases.
4) Automate BVT process as much as possible. Right from build release process to BVT result - automate everything.
5) Have some penalties for breaking the build Some chocolates or team coffee party from developer who breaks the build will do.

Conclusion:
BVT is nothing but a set of regression test cases that are executed each time for new build. This is also called as smoke test. Build is not assigned to test team unless and until the BVT passes. BVT can be run by developer or tester and BVT result is communicated throughout the team and immediate action is taken to fix the bug if BVT fails. BVT process is typically automated by writing scripts for test cases. Only critical test cases are included in BVT. These test cases should ensure application test coverage. BVT is very effective for daily as well as long term builds. This saves significant time, cost, resources and after all no frustration of test team for incomplete build.



What you need to know about BVT (Build Verification Testing)

What is BVT?

Build Verification test is a set of tests run on every new build to verify that build is testable before it is released to test team for further testing. These test cases are core functionality test cases that ensure application is stable and can be tested thoroughly. Typically BVT process is automated. If BVT fails that build is again get assigned to developer for fix.

BVT is also called smoke testing or build acceptance testing (BAT)

Manual and Automation testing Challenges

Software Testing has lot of challenges both in manual as well as in automation. Generally in manual testing scenario developers through the build to test team assuming the responsible test team or tester will pick the build and will come to ask what the build is about? This is the case in organizations not following so-called ‘processes’. Tester is the middleman between developing team and the customers, handling the pressure from both the sides. And I assume most of our readers are smart enough to handle this pressure. Aren’t you?

This is not the case always. Some times testers may add complications in testing process due to their unskilled way of working. In this post I have added most of the testing challenges created due to testing staff, developing staff, testing processes and wrong management decisions.

So here we go with the top challenges:

WinRunner automation tool Preparation

This is part of Winrunner Interview question series post. I have previously wrote posts on some

These are some important winrunner interview questions frequently asked in automation testing interview. If you are unclear of any answer ask me for clarification. I will continue this winrunner tutorials posting series on weekends as a testing interview preparation series for you.

How do you analyze test results in Winrunner tool and report the defects?

When you finish any test in WinRunner, WinRunner displays the results in a report format. The report logs the general information about the test run I.e date, operator mode and total run time. Also the report details all the major events that occurred during the run, such as checkpoints, error messages, system messages, or user messages. Mismatch can be found in the report panel by seeing the actual result and the expected result. If a test run fails due to a defect in the application being tested, you can report information about the defect directly from the Test Results window. This information is sent via e-mail to the quality assurance manager, who tracks the defect until it is fixed.

What is the use of Test Director testing tool?

TestDirector is Mercury Interactive’s software test management tool. It helps quality assurance personnel plan and organize the testing process. With TestDirector you can create a database of manual and automated tests, build test cycles, run tests, and report and track defects. You can also create reports and graphs to help review the progress of planning tests, running tests, and tracking defects before a software release.

How to integrate automated scripts from TestDirector to Winrunner Scripts?

When you work in WinRunner and create any test script you have option to save it directly to Test Director test repository.
Or while creating a test case in the TestDirector we can specify whether the script in automated or manual. And if it is automated script then TestDirector will build a skeleton for the script like TSL(Test Script language) of winrunner that can be later modified into one which could be used to test the application.

What are the different modes of recording in WinRunner?

Two type of recording in WinRunner.
1. Context Sensitive recording records the operations you perform on your application by identifying Graphical User Interface (GUI) objects. Winrunner identifies all the objects in your window you click like menus, windows, lists, buttons and the type of operation you perform such as enable, move, select etc.
2. Analog recording records keyboard input, mouse clicks, and the precise x- and y-coordinates traveled by the mouse pointer across the screen i.e Winrunner records exact co-ordinates traveled by mouse.

What is the purpose of loading WinRunner Add-Ins?

Add-Ins are used in WinRunner to load functions specific to the particular add-in to the memory. While creating a script only those functions in the add-in selected will be listed in the function generator and while executing the script only those functions in the loaded add-in will be executed else WinRunner will give an error message saying it does not recognize the function.

What are the reasons that WinRunner fails to identify GUI object?

WinRunner fails to identify an object in a GUI due to various reasons.
1. The object is not a standard windows object.
2. If the browser used is not compatible with the WinRunner version, GUI Map Editor will not be able to learn any of the objects displayed in the browser window.

What do you mean by the logical name of the object.

When you click an object, WinRunner assigns the object a logical name, which is
usually the object’s text label. The logical name makes it easy for you to read the
test script. For example, when you selected the Order No. check box,
WinRunner recorded the following statement in WinRunner TSL:
button_set (”Order No.”, ON);
“Order No.” is the object’s logical name.

An object’s logical name is determined by its class. In most cases, the logical name is the label that appears on an object.

If the object does not have a name then what will be the logical name?
If the object does not have a name then the logical name could be the attached text.

What is the different between GUI map and GUI map files?

The GUI map is actually the sum of one or more GUI map files. There are two modes for organizing GUI map files.
i. Global GUI Map file: a single GUI Map file for the entire application
ii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.

GUI Map file is a file which contains the windows and the objects learned by the WinRunner with its logical name and their physical description.

WinRunner® Automation Framework Support

What is WRAFS?

WRAFS is an acronym for WinRunner® Automation Framework Support. This framework is built on top of WinRunner. Physically it is a collection of generic scripts, which can be used to test any application. This is a keyword-driven testing or table-driven testing automation framework. Refer the following link for the basic understanding of the Table Driven Automation Framework.

http://safsdev.sourceforge.net/FRAMESDataDrivenTestAutomationFrameworks.htm.

Which type of applications can be tested using WRAFS?

WRAFS can be used for any of the following types of applications -

Ø Web based applications

Ø Java based applications

Ø Windows based applications

Ø C/C++/C# Applications

Ø VB Applications

Ø .NET Applications

Ø COM (with enhancements)

Ø Oracle (with enhancements)

Ø Delphi (with enhancements)

(In general, all applications that can be tested by WinRunner can be tested by WRAFS also).

What are the characteristics of WRAFS?

The following are the characteristics of WRAFS,

Ø It is an Application independent framework

Ø It is a Keyword Driven (or Table Driven) Test Automation Framework

Ø The test assets that we develop are Tool Independent

What is the advantage of using WRAFS?

The following are the benefits that we can achieve using WRAFS,

Ø Tester need not spend time on creating the test scripts, instead he/she can spend much efforts on other aspects like test plan, design, etc.,

Ø Run automated test cases more reliably.

Ø Reduce maintenance of scripts and increase productivity.

Ø Test cases are tool-independent.

Ø The frame work is application independent, so any application can be tested without changing the scripts in the framework.

Ø In the perspective of an organization, the efficiency of test automation can be improved,

How to achieve Application Independency?

At present we develop separate Automation Scripts for testing each component of ZENWorks using the Data driven automation strategy. It has its own pros and cons. When WinRunner Automation Framework (as mentioned earlier WinRunner Automation Framework is just a collection of scripts that are generic, so that it could be used for all applications) is used we need not write scripts separately for each component. The WinRunner Automation Framework is rich and is generic so that any application can be tested using this framework.

How to achieve reusability?

By using the WinRunner Automation Framework (a collection of generic scripts) for several applications we can achieve the concept of reusability. We achieve reusability in two levels one is

  1. Script Level à Application Independency
  2. Test Table Level à Tool Independency

What does WRAFS Framework comprises of?

The WRAFS framework is a collection of generic TSL scripts. The framework is void of any information about the Application Under Test. The framework has two parts, they are.

1. The Driver Part

2. The Engine Part

These scripts are compiled modules (Refer the complied modules section in the WinRunner Tutorial).

What do you mean by void of any information about the application under test?

By, this it means that, the collection of scripts that comprises the framework does not contain any information about the Application Under Test. So we could achieve application independency. To be still precise, the framework does not embed any details about what application to test and what test cases to execute.

The information about which application to test and what test case to execute is given as the input to the framework.

How does the framework understand about the application under test?

Hope you may be aware how WinRunner recognizes the components in the application under test (by means of GUI). Since this framework is also going to be run on WinRunner, the same means of recognition is used. The same .gui file is given as the input to the framework.

Where it can be obtained and what about licensing/fees?

The web page of WRAFS is located at

http://safsdev.sourceforge.net

It is an open source under the GPL license:

http://www.opensource.org/licenses/gpl-license.php

What is the latest release and from where can I download the same?

The latest release is always available for download from Source Forge –

http://sourceforge.net/project/showfiles.php?group_id=56751

Which platforms does it support?

Currently it supports only Windows platforms.

Which tools and technologies are associated with WRAFS?

Ø Tools:

o WinRunner 7.5 and later

Ø Technologies:

o STAF (optional)

o SAFS (optional)

o Java tools and utilities (optional)

Which newsgroups are associated with it?

http://sourceforge.net/mailarchive/forum.php?forum_id=18295

How do I decide whether I can automate an application using WRAFS?

One can think WRAFS as a layer on top of WinRunner which does not cost in terms of licenses. However, until the tool-independent multi-platform engines are available, one has to invest by just installation and usage of WinRunner to get benefit. User need not understand the TSL to implement test cases. This increases productivity many fold.

What are the overheads of using it?

The overhead of using is one has to install and learn usage of the functions/actions provided by WRAFS. J

Where can I get information about internals of WRAFS?

Refer the WRAFS Tutorial

What is advantage of using WRAFS rather than TSL in WinRunner®?

WRAFS being a keyword-driven framework, one does not need to script using TSL. Testers can develop tests without learning the underlying automation tool. The tests are easier to understand, easier to maintain, and provide maximum code reuse.

What is the difference between WRAFS and SAFS?

The SAFS Framework contains Java-based, vendor-independent tools and services available to all existing and future SAFS Engines. It is also the foundation for multi-platform test execution--which is currently in development. WRAFS is a specific SAFS Engine built with WinRunner®. WRAFS can run standalone without any of the SAFS Framework tools and services, but it can also take advantage of SAFS for added functionality (once complete SAFS is ready).

What language is the WRAFS written?

The core of the WRAFS engine is developed using TSL available with WinRunner®. In addition, WRAFS uses Windows DLLs coded in C/C++ and COM objects coded in Visual Basic 6.0. WRAFS can also interface with and take advantage of our newer engines, tools, and services coded in Java.

When a new version of the underlying testing tool is released, is the framework engine also upgraded?

WRAFS engine has worked with each new release without modification. Of course, we cannot guarantee that a new release of WinRunner will not cause problems, just as any new release of WinRunner can break any WinRunner script or test. If a new release were to cause such a problem, we have every intention of fixing what WinRunner breaks and providing that as quickly as possible. This is a rare case, as it could appear only when the newer WinRunner version is not backward compatible. (This incompatibility is almost impossible).

WINRUNNER AUTOMATION

CHAPTER 2

WINRUNNER AUTOMATION FRAMEWORK SUPPORT - WRAFS

The WinRunner Automation Framework Support (WRAFS), which in conversation called as WinRunner Automation Framework, is a tool-dependent, application-independent framework. This is the only available (at present) Hybrid Test Automation Framework for WinRunner. The main components in the WinRunner Automation Framework are as follows,

Ø WRAFS GUI Map

Ø Test Tables

Ø WRAFS Engine and Driver

The following figure represents the WRAFS architecture

2.1 WRAFS GUI MAP

For the WinRunner tool to interact with the Application Under Test, it first learns the application. It does this through the use of its "GUI Map editor”. WinRunner learns each window or screen in the application, and every object within each window or screen. It does this by identifying classes of objects and their attributes. WinRunner identifies the windows, screens, objects, & fields by their physical descriptions (for example, class, attached text, label, x/y coordinates, height, width, location, etc.), and assigns each window/object a logical name. The logical name generated by the WinRunner GUI Map Editor is based on the attached text of the window or the label in the components. The logical name can be changed by the tester.

These logical names are used in test tables, and hence WinRunner identifies the objects using these names. Usually GUI Map is created by the WinRunner automatically when the Application Under Test is just explored when the WinRunner is in the Record Mode.

The logical and the physical description of the Notepad window are listed in the following table.

Logical and Physical Description of Notepad Window

Logical Name

Physical Description

“Untitled - Notepad”

{

class: window,

label: "Untitled - Notepad",

MSW_class: Notepad

}

It is to be noted that the first step in running the test is to load the GUI Map into WinRunner GUI Map editor. This is accomplished by the DriverCommand Function SetApplicationMap which takes the GUI file name and path as input parameters. All available DriverCommands could be found in the link

http://safsdev.sourceforge.net/sqabasic2000/RRAFSReference.htm

The DriverCommand SetApplicationMap unloads all the GUI Maps from the current GUI Map editor; it also unloads the temporary GUI Map, and then loads the GUI Map Specific to the application. In WinRunner the GUI Map is stored with the extension “.GUI”. The GUI Map for the Run Dialog box & Notepad window is shown in following figure.

2.2 TEST TABLES

The test cases that are to be executed are transformed into test tables. In WinRunner Automation Framework, the test tables are organized as three levels. They are as follows,

Ø Cycle Table

Ø Suite Table

Ø Step Table

These tables are formulated in spread sheets with the knowledge of the application under test, the vocabulary followed in the WinRunner Automation Framework (Record Types, Action Command, Arguments to be passed). The most important thing while designing the tables is to design these test tables (Suite Tables and Step Tables) with the capability of reusability. The design of test Tables is to be done in such a manner that Cycle and Suite table define the complete test case and how to do that, but actual implementation and interaction with GUI happens only in Step Tables. The detailed description of the Test Tables are given in the chapter

2.3 WRAFS DRIVER AND ENGINE

The WinRunner Automation Framework has two important components they are as follows,

Ø WRAFS Driver

Ø WRAFS Engine

In reality there is no clear demarcation between these two modules, because these are not easily separated. So such self-contained, full implementations will likely always be casually referred as “engines”. But here, the three scripts namely CycleDriver.CDD, SuiteDriver.CDD, StepDriver.SDD are together referred as the WRAFS Driver. The remaining scripts are considered as the WRAFS Engine. The other modules in the Engine are listed in the following table.

WRAFS ENGINE

WIN32.SBH
CycleDriverSTACK
SuiteDriverSTACK
StepDriverSTACK
LogUtilities
StringUtilities
DDVariableStore
GenericFunctions
EditBoxFunctions
LabelFunctions
ApplicationUtilities
PushButtonFunctions
RadioButtonFunctions
ListBoxFunctions
ListViewFunctions
ComboEditBoxFunctions
MenuUtilities

TableViewFunctions

TabControlFunctions
PopUpMenuFunctions

CustomDriverCommands
HTMLImageFunctions
HTMLLinkFunctions
HTMLTableFunctions
GenericMasterFunctions
GenericObjectFunctions

WindowFunctions

DDriverCommands
DDUtilities
DDGUIUtilities
TreeViewFunctions
CheckBoxFunctions
GraphicControlFunctions
FileUtilities

These modules in WRAFS are nothing but the wrapper around the WinRunner TSL functions with some additional logic in it. These wrapper functions are called from the Cycle, Suite and Step Tables to perform the desired operations.

WRAFS CONTROL FLOW

The program execution starts with the StartCycleTest script. This test script is to be started from the WinRunner. There are a lot of information to be passed between the scripts while execution, so there are many global variables which are defined in various files. There are three key variables

Ø CycleDriverState

Ø SuiteDriverState

Ø StepDriverState

They are key value pair sort of arrays, which consists of many keys and their corresponding values assigned it. Theses values are extracted and set throughout the execution as and when needed. Two important paths to be set are the path to the Framework Libraries and the path to the Cycle, Suite and Step tables. These are set in two variables named TDPATH and PROJECTDIR inside the StartCycleTest script.

Then DDEngine Script is called which will load all other libraries of the framework. All the libraries are stored as the Compiled modules. If there is any syntax error present in the libraries then it will be detected here and execution will be interrupted. After loading all the libraries then flow returns to StartCycleTest script, it calls CDCycleDriver function in the CycleDriver script. The CDCycleDriver function takes the five parameters, which are listed in the following table,

Arguments to CycleDriver

Arg #

Argument Name

Description of the Argument

1

Separator

The field Separator usually “\t”

2

CycleDriverState

The global array with the details of the Cycle Table

3

SuiteDriverState

The global array with the details of the current Suite Table

4

StepDriverState

The global array with the details of the current Step Table

5

CycleDrivenMode

CDStandAlonemode à Outputs additional information

CycleDrivenMode à Output No additional information

In the CDCycleDriver function, the Cycle Table file is opened, its name is fixed in WinRunner Automation Framework as CycleDriver.CDD. The file is read record by record, as it is read the key value pair array is populated with the available values. The variables specified in the test record are replaced by their actual value. This is done by two functions DDVSubstitueVariables and DDVExtractVariables which are defined in DDVariabeStore library. Then the first field of the record is extracted, this is the record type and based upon this the execution flow changes, which is described under the record type section.

If the record Type(in Cycle Table) is “C”, the DDDriverCommand script is called. Inside that function there is a switch case where all the driver commands are defined. If the requested driver command is found it is executed and correspondingly status codes are set. The execution go back to cycleDriver script for CycleDriver.CDD file and read the next record and this process continues till all the records of CycleTable are processed.

If the record type (in Cycle Table) is “T”, the second field is extracted, which gives the name of the Suite Table. This is appended with .STD extension now it become the complete name of the Suite File. A function defined in SuiteDriver script is called for executing Suite Table. It reads the record from the Suite Table, substitute all the variables with their actual values present in the global Store. Then it extracts the second field of the record similarly as it is done for CycleTable.

If the record Type (in Suite Table) is “C”, the DDDriverCommand script is called. Inside that function there is a switch case where all the driver commands are defined. If the requested driver command is found it is executed and correspondingly status codes are set.

The execution go back to SuiteDriver script for the same Suite Table file and read the next record and this process continues till all the records of that Suite Table are processed. After that the control goes back to the CycleTable and its next record is read. The process continues till all the records in Cycle Tables are processed.

If the record type (in Suite Table) is “T”, the second field is extracted, which gives the name of the Step Table. This is appended with .SDD extension now it become the complete name of the Step File. A function defined in StepDriver script is called for executing Step Table. It reads the record from the Step Table, substitute all the variables with their actual values present in the global Store. Then it extracts the second field of the record similarly as it is done for CycleTable and Suite Table.

If the record Type (in Step Table) is “C”, the DDDriverCommand script is called. Inside that function there is a switch case where all the driver commands are defined. If the requested driver command is found it is executed and correspondingly status codes are set. The execution go back to StepDriver script for the same Step Table file and read the next record and this process continues till all the records of that Step Table are processed. After that the control goes back to the Suite Table and next Record is read. The process continues till all the records in that Suite Tables are processed.After that control goes back to CycleTable and its next record is read. The process continues till all the records in Cycle Tables are processed.

If the record type (in Step Table) is “T”, then the window name, component name and action to be performed are extracted from the record of the Step Table. GetObjectType function is called, based upon these information type of the component is obtained. After that there is a switch case in the StepDriver script, where all the component class functions libraries main function are present. Based on the component type the corresponding main function is called.

For example :-

If the component type is a PushButton then the PushButtonMain () defined in PushButtonFunction Script is called. Inside that main function of PushButton class, a switch case is there which contains all the functions for that class that are implemented. The action field of StepTable is compared with these cases and if found any match, the wrapper function is called.

After the execution of the component functions, the Status Code is set to pass or fail based upon the execution results and then the control is passed to the Step Driver. The execution go back to StepDriver script for the same Step Table file and read the next record and this process continues till all the records of that Step Table are processed. After that the control goes back to the Suite Table and next Record is read. The process continues till all the records in that Suite Tables are processed.After that control goes back to CycleTable and its next record is read. The process continues till all the records in Cycle Tables are processed.

After every function the corresponding result is logged using the LogMessage () function which is defined in LogUtilities library. Finally the results of the execution cycle are logged. We can also see the output on WinRunner Test Result Window.