Automated Software Testing With Macro Scheduler



Similar documents
Using Macro Scheduler For Load Testing

Support Desk Help Manual. v 1, May 2014

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

YOUR GUIDE TO THE iphone MOBILE APP WITH 1st SOURCE

Log-in to the patient booking website

Macro s for EIS Using IBM 3270 Personal Communications Emulation Software

Sitecore is a trademark of Sitecore A/S. All other brand and product names are the property of their respective holders.

Specific Information for installation and use of the database Report Tool used with FTSW100 software.

CHAPTER 12: DOCUMENT LOGGING

Using a Digital Recorder with Dragon NaturallySpeaking

Event Center (rev b) EVENT CENTER. VPI 160 Camino Ruiz, Camarillo, CA (Voice) (Fax)

ImageNow Document Scanning and QA Created on 8/15/ :38:00 AM

ENHANCE. The Style Sheet Tool for Microsoft Dynamics NAV. Microsoft Dynamics NAV 5.0. User s Guide

Using InstallAware 7. To Patch Software Products. August 2007

DiskBoss. File & Disk Manager. Version 2.0. Dec Flexense Ltd. info@flexense.com. File Integrity Monitor

Storage and Playback Getting Started Guide

Payroll. 4. Print Checks. Table of Contents Print Checks...2 All...3 Department...4 Print Single Posting...5

SafeGuard PrivateCrypto 2.40 help

Chapter 24: Creating Reports and Extracting Data

educ Office Remove & create new Outlook profile

Create a PDF File. Tip. In this lesson, you will learn how to:

As your financial institution completes its system conversion, you

Active Directory Syncing

webmethods Certificate Toolkit

Version 8.4 Nvision Tips. Contents

CRM 2013 Workflows. Description

Multisim 7 Tutorial Creating Macros for Sub-circuits

File Server Migration

Installation of ADS SiMKit startup script and designkit on Windows for SiMKit version 4.4

FAQ and troubleshooting Guide

Co-Presented by Mr. Bill Rinko-Gay and Dr. Constantin Stanca 9/28/2011

TakeMySelfie ios App Documentation

Arena Tutorial 1. Installation STUDENT 2. Overall Features of Arena

To access the QA Lead area of the site, click on the QA module link on the home page. Click here to access the QA module

Oracle Fusion Middleware

Database Assistant. Once Database Assistant is installed you must login to gain access to the database. Copyright 2009

Payment Processing Frequently Asked Questions. Microsoft Dynamics RMS

Continuous???? Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

OASIS Bill Pay Service

WA2262 Applied Data Science and Big Data Analytics Boot Camp for Business Analysts. Classroom Setup Guide. Web Age Solutions Inc.

This means that any user from the testing domain can now logon to Cognos 8 (and therefore Controller 8 etc.).

Vanguard Knowledge Automation System

Rational Quality Manager. Quick Start Tutorial

Operational Decision Manager Worklight Integration

WinTask x64 Scheduler for Windows 7 64 bit, Windows 8/ bit and Windows 2008 R2 64 bit. Scheduler Quick Start Guide

Add a Bank Account. Set Up Recurring Payments

VNC User Guide. Version 5.0. June 2012

Tufts University Human Resources New Hire Benefits Enrollment

6th Grade ipad Setup. APS Personalized Learning Devices

TestTrack Test Case Management Quick Start Guide

Programming in Access VBA

How To Understand The Error Codes On A Crystal Reports Print Engine

Specops Command. Installation Guide

BusinessObjects Enterprise XI Release 2

How To Use Spss

Troubleshooting with the Nodus Scheduler

Desktop, Web and Mobile Testing Tutorials

Reporting and Analysis Using Vivid Reports Flex

How to output SpoolFlex files directly to your Windows server

Web based training for field technicians can be arranged by calling These Documents are required for a successful install:

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

FSW QA Testing Levels Definitions

Yale Software Library

Cuba for Remedy Avaya TSAPI Quick Start Guide Cuba Version 1.3

16.1 REQUIREMENTS AND INSTALLATION

EDI Insight Manual. Training Manual. Presented By

Jolly Server Getting Started Guide

Outlook Web App User Guide

smarshencrypt User s Guide

Important Notes for WinConnect Server ES Software Installation:

Using the Bulk Export/Import Feature

Perform this procedure when you need to add a recurring payment option, or when you need to change or withdraw it.

Online Banking Upgrade FAQs

Job Board Integration with eempact

Basics Series Basics Version 9.0

WorldShip Export Shipment Data

ERserver. iseries. Work management

Netwatch Installation For Windows

Contents 1 Overview 2 Steps to run an Excel Add-In Setup: 3 Add-Ins 4 LOGIN 5 SEND SMS 5.1 Send Text or Flash Sms 5.2 Select Range 5.

MSSQL quick start guide

Scribe Demonstration Script Web Leads to Dynamics CRM. October 4,

CANON FAX L360 SOFTWARE MANUAL

Latest Trends in Testing. Ajay K Chhokra

Using UMCmarket to make micro-donations to our church!

Transcription:

Automated Software Testing With Macro Scheduler Copyright 2005 MJT Net Ltd

Introduction Software testing can be a time consuming task. Traditionally QA technicians and/or programmers would sit in front of applications manually going through checklists to verify that the requirements of the software were met correctly. Automated Testing using Macro Scheduler saves considerable time and resources. Macro Scheduler excels at testing software at the GUI level through its high level GUI functions and its ability to simulate user input. Building a Test Script This article will demonstrate how Macro Scheduler can be used for automated testing by way of a simple example. We will write an automated testing routine to test a small sample program, which converts inches to centimetres. Here s the example application: Our basic test plan is this: Action Click Convert with no data entered Enter non numeric data, click Convert Enter 1 in Inches, Click Convert Enter 20 in Inches, Click Convert Expected Outcome Should get an error box Should get an error box Should get 2.54 in CMs box Should get 50.8 in CMs box To automate this test, the first step is to click the Convert button: //Focus the app //check we get an error if we click Convert without entering a number

This produces the following error box with caption Error : So we now want to wait for the error box to appear. We ll wait for the error box to appear, or 5 seconds, whichever is soonest and then see if the window appeared or not: //wait for error box Let>WW_TIMEOUT=5 WaitWindowOpen>Error If>WW_RESULT=TRUE //ok, the Error window appeared TimeStamp>logfile,No data Error: Success //cancel the error box Wait>1 Press Esc //No error window TimeStamp>logfile,No data Error: Fail Note that we write the outcome to a log file using the TimeStamp command. This is a convenient way to write data to a log file. The TimeStamp command outputs time information so you can also see how long the process took. Alternatively you could use WriteLn, or output directly to an ODBC database, or send data to Excel using DDE, or whatever else suits your needs best. For the second step in the test plan we use the same approach we used in the first step. The full script is presented later. For now let s look at how we achieve the third and fourth steps where we want to get the value in the result box to see if it is what we expect. To do this we use the GetControlText function: GetControlText takes the window title, a class name and an index and returns the text in the result variable. Use the View System Windows Tool (from the Tools menu in Macro Scheduler) to find out the class name of objects on a window. Our sample application has two edit boxes of class TEdit.

Note that the second TEdit in the list is the Inch box and the first is the CM box. Objects are often created in reverse order to how they appear on a form. So we use index 2 to refer to the Inch edit and index 1 to refer to the CM edit. Before pressing the Convert button we want to refocus the Inches box, clear it out and then send the data. So this whole section becomes: //Send some valid data //clear inches box SetControlText>Imperial - Metric Conversion,TEdit,2, //focus inches box and send value (we could just use SetControlText!) Send>i Send>1 We then want to click the Convert button and extract the outcome to see if it is what we expect: //Click Convert //result should be 2.54 If>result=2.54 TimeStamp>logfile,1inch=2.54cm: Success TimeStamp>logfile,1inch=2.54cm: Fail We do the same thing for the fourth step in the test plan only we send 20 to the inch box instead of 1.

The Results Let s look at the results of the test. The log file looks like this: 13:20:51:750 - No data Error: Success 13:20:52:765 - Bad data Error: Success 13:20:53:765-1inch=2.54cm: Success 13:20:53:781-20inch=50.8cm: Success Adding Test Cases As software products grow the need for more test cases arises. We can simply add more steps to the script, or add new test scripts and chain them together. For example, we may add another button to our sample application to reverse the conversion to convert from centimetres to inches. We use the same methods described here but working with a different button and checking the inches field rather than the centimetres field for the outcome. Testing Web Applications Web pages and web applications introduce a different kind of problem. Web pages are dynamic in nature and objects do not have absolute positions. The best way to build automated test scripts for web applications is to use MacroScript WebRecorder, which builds scripts automatically by recording web activity. These scripts can then be edited to add the validation, outcome and range checks and result output needed for the test plan. For more information on WebRecorder see: http://www.mjtnet.com/webrecorder.htm Conclusion Automated testing streamlines the QA process and saves precious resources, time and money. As the project continues along it s life cycle it is easy to run previously created test scripts and add new test cases. The time saved by running test scripts over manual checklists is enormous and bugs can be found more quickly. Test scenarios can easily be run repeatedly for added confidence in your product. Developers, QA engineers and customers all benefit. With Macro Scheduler s powerful GUI automation routines, output functions, VBScript capability and complex expressions it is easy to build advanced test scenarios for all applications.

The Complete Script //set up our log file here Let>logfile=d:\testresults.log //Focus the app //check we get an error if we click Convert without entering a number //wait for error box Let>WW_TIMEOUT=5 WaitWindowOpen>Error If>WW_RESULT=TRUE //ok, the Error window appeared TimeStamp>logfile,No data Error: Success //cancel the error box Wait>1 Press Esc //No error window TimeStamp>logfile,No data Error: Fail //Enter some invalid data Send>i Send>abc //Click Convert //wait for error box Let>WW_TIMEOUT=5 WaitWindowOpen>Error If>WW_RESULT=TRUE //ok, the Error window appeared TimeStamp>logfile,Bad data Error: Success //cancel the error box Wait>1 Press Esc //No error window TimeStamp>logfile,Bad data Error: Fail //Send some valid data //clear inches box SetControlText>Imperial - Metric Conversion,TEdit,2, //focus inches box and send value (we could just use SetControlText!)

Send>i Send>1 //Click Convert //result should be 2.54 If>result=2.54 TimeStamp>logfile,1inch=2.54cm: Success TimeStamp>logfile,1inch=2.54cm: Fail //try another value - this time we'll use SetControlText... SetControlText>Imperial - Metric Conversion,TEdit,2,20 If>result=50.8 TimeStamp>logfile,20inch=50.8cm: Success TimeStamp>logfile,20inch=50.8cm: Fail