27.04.2013 Views

Getting Started With Automated Build Studio 5 - KESSLER Software

Getting Started With Automated Build Studio 5 - KESSLER Software

Getting Started With Automated Build Studio 5 - KESSLER Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Copyright Notice<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, as described in this on-line help system, is licensed under the software license<br />

agreement distributed with the product. The software may be used or copied only in accordance with the<br />

terms of its license.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is Copyright © 2002-2008 <strong>Automated</strong>QA Corporation.<br />

ALL RIGHTS RESERVED.<br />

No part of this help can be reproduced, stored in any retrieval system, copied or modified, transmitted in<br />

any form or by any means electronic or mechanical, including photocopying and recording for purposes<br />

others than the purchaser’s personal use.<br />

All <strong>Automated</strong>QA product names are trademarks or registered trademarks of <strong>Automated</strong>QA<br />

Corporation. All other trademarks, service marks and trade names mentioned in this Help system or<br />

elsewhere in the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> software package are the property of their respective owners.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes the UnzDll.dll library that is supplied by Info-Zip. This library is<br />

copyright © 1990-2005 Info-ZIP. This software is provided “as is”, without warranty of any kind, expressed<br />

or implied. In no event shall Info-ZIP or its contributors be held liable for any direct, indirect, incidental,<br />

special or consequential damages arising from the use of or inability to use this software.


Table of Contents<br />

Table of Contents<br />

INTRODUCTION......................................................................................................................................7<br />

Overview..................................................................................................................................................7<br />

System Requirements.............................................................................................................................10<br />

Supported Tools .....................................................................................................................................11<br />

What’s New in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5 ............................................................................................16<br />

<strong>Getting</strong> Support......................................................................................................................................21<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Samples ..........................................................................................................22<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and Windows Firewall ...................................................................................23<br />

GETTING STARTED .............................................................................................................................26<br />

Basic Concepts.......................................................................................................................................26<br />

User Interface – Overview .....................................................................................................................31<br />

Creating a Macro....................................................................................................................................37<br />

Adding, Removing and Arranging Operations in a Macro ....................................................................40<br />

Modifying Operation Properties ............................................................................................................43<br />

Saving and Loading Macros ..................................................................................................................47<br />

Using Macro Configurations..................................................................................................................47<br />

Running Macros.....................................................................................................................................55<br />

Logging Macro Runs .............................................................................................................................56<br />

Analyzing Results of Macro Runs .........................................................................................................57<br />

<strong>Getting</strong> <strong>Started</strong> – Further Steps..............................................................................................................58<br />

Sending Notifications .........................................................................................................................58<br />

Exporting Results of Macro Runs ......................................................................................................59<br />

Handling Errors in Macros................................................................................................................60<br />

Incrementing the <strong>Build</strong> Version Number............................................................................................65<br />

Scheduling Macro Runs .....................................................................................................................67<br />

BUILD STRATEGIES ............................................................................................................................70<br />

Continuous Integration...........................................................................................................................70<br />

Continuous Integration Support.........................................................................................................70<br />

Tracing Task Triggers........................................................................................................................74<br />

Distributed <strong>Build</strong>s ..................................................................................................................................77<br />

Distributed <strong>Build</strong>s – Overview...........................................................................................................77<br />

Distributed <strong>Build</strong> Scenarios...............................................................................................................78<br />

Creating Distributed <strong>Build</strong>s...............................................................................................................79<br />

Operation Dependencies ........................................................................................................................85<br />

About Dependent Groups...................................................................................................................86<br />

Dependent Groups Usage Example ...................................................................................................87<br />

Concurrent Execution of Operations......................................................................................................91<br />

USING VARIABLES AND CONSTANTS IN MACROS ...................................................................94<br />

About Variables .....................................................................................................................................94<br />

About Constants.....................................................................................................................................96<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

3


4<br />

Table of Contents<br />

Creating Variables and Constants and Modifying Their Attributes.......................................................97<br />

Using Variables and Constants in Operation Properties ........................................................................99<br />

Using Variables and Constants in Script Operations ...........................................................................101<br />

Initializing Variables via Command Line............................................................................................102<br />

MACRO LIBRARIES ...........................................................................................................................104<br />

Macro Libraries....................................................................................................................................104<br />

Using a Library – Example ..................................................................................................................105<br />

INTEGRATION WITH MICROSOFT VISUAL STUDIO AND MSBUILD .................................111<br />

Overview..............................................................................................................................................111<br />

Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong>............................................................................................111<br />

Running <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Macros From MS<strong>Build</strong> Projects....................................................113<br />

Running <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Macros From Visual <strong>Studio</strong> Team Explorer .................................114<br />

AUTOMATED BUILD STUDIO CLIENT/SERVER AND WEB INTERFACE ...........................119<br />

Overview..............................................................................................................................................119<br />

Using the Client/Server Functionality..................................................................................................119<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server – User Permissions ................................................................125<br />

Connection Parameters ........................................................................................................................127<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server Web Interface.........................................................................133<br />

Automatic <strong>Build</strong> Notifications.............................................................................................................135<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Gadget for Windows Sidebar.......................................................................139<br />

About absControl .................................................................................................................................142<br />

<strong>Build</strong> Requests .....................................................................................................................................154<br />

About <strong>Build</strong> Requests .......................................................................................................................155<br />

Preparing Macros for Request Processing......................................................................................155<br />

Submitting, Editing and Deleting Requests......................................................................................157<br />

Types of Request Triggers................................................................................................................160<br />

Description of the Requests Section.................................................................................................161<br />

Managing <strong>Build</strong> Nodes.....................................................................................................................162<br />

Viewing Reports on <strong>Build</strong> Requests .................................................................................................164<br />

CHARTS.................................................................................................................................................165<br />

Charts – Overview ...............................................................................................................................165<br />

Charts Panel .........................................................................................................................................165<br />

Chart Types..........................................................................................................................................168<br />

Viewing Charts Data Stored on Another Computer ............................................................................169<br />

Moving Charts Data From One Computer to Another.........................................................................169<br />

DEBUGGING MACROS......................................................................................................................170<br />

Debugging Macros in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>...................................................................................170<br />

Stepping Through the Macro ...............................................................................................................172<br />

Running Macros Partially ....................................................................................................................172<br />

Running to the Cursor..........................................................................................................................173<br />

Using Breakpoints................................................................................................................................173<br />

Conditional Breakpoints ......................................................................................................................174<br />

Watches Panel......................................................................................................................................175<br />

Breakpoints Panel ................................................................................................................................176<br />

Evaluating Expressions........................................................................................................................177<br />

SCRIPT WRITING ...............................................................................................................................179<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Table of Contents<br />

Script Writing – Basics ........................................................................................................................179<br />

Object Model .......................................................................................................................................180<br />

Handling Exceptions in Scripts............................................................................................................181<br />

Working <strong>With</strong> Operations in Scripts....................................................................................................183<br />

AUTOMATED BUILD STUDIO COMMAND-LINE INTERFACE...............................................189<br />

Command-Line Arguments..................................................................................................................189<br />

Exit Codes............................................................................................................................................191<br />

MISCELLANEOUS ..............................................................................................................................193<br />

Working <strong>With</strong> Source Control Systems...............................................................................................193<br />

Working <strong>With</strong> <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> via COM ..............................................................................195<br />

Sounds for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Events ........................................................................................202<br />

OPERATIONS REFERENCE..............................................................................................................204<br />

Operation Categories............................................................................................................................204<br />

.NET Tools Category ...........................................................................................................................207<br />

Archivers Category ..............................................................................................................................208<br />

Authenticode Category ........................................................................................................................208<br />

<strong>Automated</strong>QA Tools Category ............................................................................................................209<br />

Borland Compilers Category ...............................................................................................................210<br />

<strong>Build</strong> Tools Category...........................................................................................................................211<br />

Burn CD/DVD Category......................................................................................................................211<br />

Communication Category ....................................................................................................................212<br />

Concurrent Versions System Category ................................................................................................212<br />

Execute Category .................................................................................................................................213<br />

Files and Directories Category.............................................................................................................213<br />

Frequently Used Category ...................................................................................................................214<br />

FTP Category .......................................................................................................................................214<br />

Help Compilers Category.....................................................................................................................215<br />

HTTP Category....................................................................................................................................216<br />

Installers Category ...............................................................................................................................216<br />

Interactive Category.............................................................................................................................217<br />

Internet Information Services (IIS) Category ......................................................................................217<br />

Issue Tracking Category ......................................................................................................................218<br />

JediVCS Category................................................................................................................................219<br />

Logging Category ................................................................................................................................220<br />

Microsoft Compilers Category.............................................................................................................220<br />

Microsoft Compilers for Smart Device Category ................................................................................221<br />

Microsoft Source Server Category.......................................................................................................221<br />

Microsoft Virtual PC Category ............................................................................................................222<br />

Microsoft Virtual Server Category ......................................................................................................222<br />

Microsoft Visual SourceSafe Category................................................................................................223<br />

Misc Category......................................................................................................................................224<br />

MySQL Category.................................................................................................................................224<br />

Oracle Category ...................................................................................................................................225<br />

Other Compilers Category ...................................................................................................................225<br />

Patch Management Category ...............................................................................................................226<br />

Perforce Category ................................................................................................................................226<br />

Prepare Code Category ........................................................................................................................227<br />

PsTools Category .................................................................................................................................227<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

5


6<br />

Table of Contents<br />

PVCS Category....................................................................................................................................228<br />

Rational ClearCase Category...............................................................................................................228<br />

Read/Write Category............................................................................................................................229<br />

Remote Macro Execution Category.....................................................................................................229<br />

Source Code Tools Category ...............................................................................................................230<br />

SourceGear Vault Category .................................................................................................................230<br />

SourceOffSite Category .......................................................................................................................231<br />

SQL Category ......................................................................................................................................232<br />

Standard Category................................................................................................................................232<br />

StarTeam Category ..............................................................................................................................234<br />

String Manipulation Category..............................................................................................................234<br />

Subversion Category............................................................................................................................235<br />

Surround SCM Category......................................................................................................................236<br />

Team Coherence Category...................................................................................................................236<br />

Team Foundation Version Control Category.......................................................................................237<br />

Unit Tests Category .............................................................................................................................238<br />

VMware Server Category ....................................................................................................................238<br />

VMware Workstation Category ...........................................................................................................239<br />

Wait Category ......................................................................................................................................240<br />

WMI Category .....................................................................................................................................241<br />

XML Category .....................................................................................................................................242<br />

INDEX.....................................................................................................................................................243<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Overview<br />

Introduction<br />

Overview<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corp.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is a powerful build and release management system that provides an easy<br />

way to automate the build, test and release processes of software projects. Its intuitive interface and<br />

unprecedented flexibility allows even inexperienced users to create complex visual macros which can<br />

automate repetitive or day-to-day tasks with the single click of a button.<br />

This topic is devoted to the main functions of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. It provides you with a simple<br />

conceptual map of the product. To learn how to use these functions, see <strong>Getting</strong> <strong>Started</strong>. A good way to learn<br />

how to use the product is to explore samples that come with <strong>Build</strong> <strong>Studio</strong>. See <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Samples for more information on them.<br />

Why <strong>Automated</strong> <strong>Build</strong>s?<br />

In the current state of software development, with projects becoming more and more complex, building,<br />

testing and releasing of software projects consumes an ever-increasing amount of time and resources.<br />

<strong>Build</strong>ing the application manually quite often becomes tedious, prone to errors and inefficient both in terms<br />

of time and money. A typical build process includes a number of steps:<br />

• <strong>Getting</strong> latest versions of source files from a version control system,<br />

• Specifying build options,<br />

• Recompiling libraries and packages that are used by the application,<br />

• <strong>Build</strong>ing the application,<br />

• <strong>Build</strong>ing the installation,<br />

• Notifying co-workers that a new build is available,<br />

• Starting the testing process, and so forth.<br />

It is quite easy to make a mistake when performing these steps. For example, you may specify wrong<br />

build version number or compile the application using inappropriate options.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> lets you optimize the build, test and release processes and allows you to focus<br />

on more important issues. Using <strong>Build</strong> <strong>Studio</strong>, you spend a certain amount of time on a task only once: on<br />

creating a macro for that task. A macro unifies elementary operations, for example, Copy File(s), Get Latest<br />

Version From VSS, Compile Visual C# 2005 Project, Send E-Mail, etc., that let you perform each step of the<br />

process you are automating. After the macro is ready, you can run it either manually, or at certain points in<br />

time. That is, you commission <strong>Build</strong> <strong>Studio</strong> with all the work and responsibility: it will automatically run the<br />

macro whenever you need.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

7


8<br />

Major Features<br />

Introduction<br />

Among the many features that make <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> the ultimate build and release management<br />

tool are:<br />

• Visually constructed macros. As we have said above, a macro includes operations each of<br />

which is responsible for a separate step of the process you want to automate. Even if you are not<br />

familiar with programming, you will find creating macros very easy with the visual macro<br />

designer of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

• Support of popular modern compilers, installation building tools, testing tools, version<br />

control systems, etc. See Supported Tools.<br />

• Wide range of available operations. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes over 450 built-in<br />

operations that let you automate almost any task. You can extend the functionality available with<br />

the standard operations by writing scripts or by creating new custom operations (see Creating<br />

Custom Operations in on-line help).<br />

• Distributed builds. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> provides you with the ability to distribute the<br />

execution of macro operations among multiple computers. Using this feature, you can<br />

dramatically reduce the project build time, perform multi-platform builds, start automated tests<br />

on multiple computers in parallel and so on. See Distributed <strong>Build</strong>s - Overview.<br />

• Concurrent execution of operations. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> lets you organize concurrent<br />

execution of macro operations and thus performs different tasks at the same time. This can<br />

greatly reduce the macro execution time, especially on computers with more than one CPU. For<br />

complete information, see Concurrent Execution of Operations.<br />

• Operation dependencies. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> lets you configure the macro execution flow<br />

similar to makefiles: you can specify dependencies between macro parts that correspond to<br />

different build tasks, and <strong>Build</strong> <strong>Studio</strong> will determine their execution order on the fly and, where<br />

possible, execute macro parts concurrently. See Operation Dependencies.<br />

• Scheduled macro runs. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes the Task Scheduler that lets you<br />

schedule macro runs at your desire. This is a key feature for creation of automated daily builds.<br />

<strong>With</strong> the Task Scheduler you can schedule and control macro runs not only on your computer,<br />

but also on other computers in your local network.<br />

• Continuous integration support (event-triggered macro runs). You can configure <strong>Build</strong><br />

<strong>Studio</strong> so that it automatically runs an appropriate macro (say, the macro that builds your project<br />

and tests it) not only at specified time, but also when a definite event occurs, for instance, when a<br />

source file of your project is changed under source code control (Visual SourceSafe, CVS, etc.).<br />

This will ensure that you always have a thoroughly tested build that is compiled with the latest<br />

versions of source files and decrease the number of errors that may arise upon integrating source<br />

code modifications made by different team members. See Continuous Integration Support.<br />

• Macro configurations. Quite often, it is needed to build several versions of an application from<br />

the same sources; for example, the debug, demo and release versions of the product. Using<br />

macro configurations, you can have a single macro that will generate all the desired versions.<br />

There is no need to create three macros. You can create only one macro and choose the desired<br />

configuration before the run. See Using Macro Configurations.<br />

• Automatic notifications. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can automatically notify you about the build<br />

results. You can specify which users should be notified of which events (for example, successful<br />

or failed builds) and via e-mail, MSN or ICQ.<br />

Your build macros can also inform you about the results of their execution. <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> offers several operations that can be used for sending notifications. These operations can<br />

notify the users via e-mail, newsgroups, Windows Messenger, MSN Messenger, Windows Live<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Overview<br />

Messenger, ICQ or the “net send” command. You can also attach execution logs to e-mail or<br />

news messages to help the developers quickly identify and fix build issues. See Sending<br />

Notifications.<br />

• Macro debugger. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes a macro debugger that supports breakpoints,<br />

stepping over operations, watches, expression evaluation and other debugging features. Using<br />

the macro debugger you can trace errors in your macros and fix them. See Debugging Macros.<br />

• Scripts in VBScript, JScript and DelphiScript. Even though the built-in <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> operations are enough to perform most of the steps for building your applications, you<br />

may need to perform some specific actions, which cannot be accomplished using the standard<br />

operations. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes a Script operation that allows you to create<br />

powerful custom script routines using one of the supported scripting languages - VBScript,<br />

JScript or DelphiScript. You can use custom scripts to perform actions that can not be performed<br />

using the existing standard operations. For more information on creating scripts, see Script<br />

Writing - Basics.<br />

• Macro libraries. You can create libraries of commonly used submacros and easily reuse these<br />

submacros in different macros. Libraries help you reduce the complexity of your build macros<br />

and simplify the maintenance of common submacros. Libraries can be shared between the team<br />

members, so you can work on them together with your colleagues. For more information, see<br />

Macro Libraries.<br />

• Remote Macro Execution Control. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes special features that let<br />

you easily run macros located on remote computers and monitor such macro runs. No other<br />

third-party tools needed to control macros located on remote computers. Using <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> Web Interface you can control the remote macros through your web browser, even<br />

without installing <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on your workstation. See <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Client/Server for complete information.<br />

You can also control remote builds from your macros. The Remote Macro Execution category<br />

provides operations that let you start, pause and stop macro runs on remote computers and<br />

control the state of remote macros directly from your macro.<br />

• Advanced monitoring of macro runs. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> generates detailed logs of<br />

macro runs. These logs help you isolate errors that occur during the macro execution. <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> automatically compares results of the current macro run with the last successful<br />

run, thus letting you know if something is going wrong. See Logging Macro Runs.<br />

• Charts. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> collects information about macro runs performed on your<br />

computer or other computers within your network, and displays this information in a graphical<br />

form within the Charts panel. Charts can help you analyze the ratio of successful and failed runs,<br />

the duration of macro runs and the frequency of macro runs over a desired period of time (day,<br />

week, month or other). For more information, see Charts - Overview.<br />

• Integration with Microsoft Visual <strong>Studio</strong>. For developers who use Microsoft Visual <strong>Studio</strong><br />

.NET, Microsoft Visual <strong>Studio</strong> 2005 and Microsoft Visual <strong>Studio</strong> 2008, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

can be tightly integrated into the Microsoft Visual <strong>Studio</strong> IDE. This integration offers developers<br />

full control over <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> from within the Visual <strong>Studio</strong> IDE. You can also run<br />

<strong>Build</strong> <strong>Studio</strong> macros directly from MS<strong>Build</strong> projects and Visual <strong>Studio</strong> Team Explorer.<br />

• Access to operation properties from scripts. Using scripts you can read and change operation<br />

properties. For instance, you can write a script that will increase the build version number in<br />

options of a Compile Delphi Project operation. See Working <strong>With</strong> Operations in Scripts.<br />

• Tight integration with TestComplete, AQtime, AQtime .NET Edition and AQdevTeam.<br />

Imagine if you could take your project source files from a version control system, build the<br />

project and its installation package, test it for memory leaks and performance bottlenecks,<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

9


10<br />

Introduction<br />

perform a comprehensive regression test across the entire application, log all defects and issues,<br />

and send an e-mail notification to all relevant teams within your company in relation to new<br />

issues discovered since the previous build. Sounds outrageous? It is not - with <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> you can. <strong>Build</strong> <strong>Studio</strong> offers native integration with <strong>Automated</strong>QA’s Testing, Profiling<br />

and Team Collaboration products, including AQtime, AQtime .NET Edition, TestComplete,<br />

TestExecute and AQdevTeam, thus allowing you to fully automate your organization’s build,<br />

profile, test and deploy processes.<br />

• Assistant. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes a context-sensitive Assistant that displays<br />

commands, hints and links to help topics. If you are new to <strong>Build</strong> <strong>Studio</strong> and not quite sure how<br />

to get started, the Assistant is the perfect place to begin. If you are experienced with <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>, the Assistant panel is still helpful since it groups important links in one easily<br />

accessible location.<br />

• Source Code Control integration. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is tightly integrated with any source<br />

control system that is compatible with the Microsoft Source Code Control API specification (for<br />

example, Microsoft Visual SourceSafe, CVS, Borland StarTeam, and many others). This lets you<br />

add the current macro to a source control system installed on your computer, check out or check<br />

in the macro, and so on, without leaving <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. See Working <strong>With</strong> Source<br />

Control Systems.<br />

• Command-line arguments. A file that holds a macro can be specified on the command line<br />

when calling <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. By default, <strong>Build</strong> <strong>Studio</strong> will simply open on this macro,<br />

but other arguments can make the <strong>Studio</strong> run the macro, and close after that. Through the<br />

command line, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can be executed in a completely hands-off fashion,<br />

inside a make file, a batch file, etc. In addition, the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> installation includes<br />

a console executable, <strong>Automated</strong>MacroPlayer.exe that simply runs macros constructed with<br />

the help of <strong>Build</strong> <strong>Studio</strong>’s user interface. When your macros are complete, you can play them<br />

back using this simple and resource efficient executable.<br />

• Using as a COM server. Due to the fact that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is an OLE server, you can<br />

run it and its macros via OLE/COM interfaces, for instance, from scripts defined in other<br />

<strong>Automated</strong>QA’s tools, thus making the integration between <strong>Build</strong> <strong>Studio</strong> and these tools even<br />

closer.<br />

Plug-Ins<br />

Like other <strong>Automated</strong>QA products, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> has an open, COM-based architecture. Most<br />

of the features you see in the product are supported through plug-ins. When the plug-in is meant to remain<br />

for the life of the current version, it is made an internal part of the product executable. When it is possible<br />

that the plug-in could be updated, it is left external (such as the database-access plug-ins). Others will be<br />

added to <strong>Automated</strong>QA Web site (http://www.automatedqa.com), and users can write their own plug-ins<br />

using the supplied interface documentation and libraries (for instance, user can create plug-ins that will add<br />

certain operations to <strong>Build</strong> <strong>Studio</strong>).<br />

System Requirements<br />

Minimal System Requirements<br />

• Intel Pentium II 450 MHz or higher (Pentium III 800 MHz recommended).<br />

• Microsoft Windows Vista, Windows XP, Windows Server 2003, Windows 2000 with Service<br />

Pack 4 or later, or Windows NT 4.0 with Service Pack 6 or later.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Supported Tools<br />

• Microsoft Internet Explorer 5.0 or later.<br />

• 128 MB of RAM (256 MB or more recommended).<br />

• 100MB hard disk space.<br />

• VGA or higher resolution monitor.<br />

• Mouse or other pointing device.<br />

Web Interface Requirements<br />

To install <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface, the following software need to be installed on the<br />

computer:<br />

• Microsoft Windows 2000 Professional with Service Pack 4, Microsoft Windows 2000 Server<br />

with Service Pack 3, Microsoft Windows XP Professional, Microsoft Windows Server 2003 or<br />

Microsoft Windows Vista.<br />

• Microsoft Internet Information Services ver. 5.0 or later.<br />

• Microsoft Data Access Components 2.8 or later.<br />

• Microsoft .NET Framework 2.0.<br />

• Adobe Flash Player 8 or later.<br />

Microsoft Internet Information Services should be installed prior to Microsoft .NET Framework 2.0.<br />

The demo version of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes all the features available in the registered version<br />

but has a 30 operations per macro limit and can be used only during a 30 day trial period.<br />

Supported Tools<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> supports the most popular modern compilers, installation building tools, testing<br />

tools, version control systems, etc.<br />

Supported compilers<br />

• All compilers that are included in Microsoft Visual <strong>Studio</strong> 2008, Microsoft Visual <strong>Studio</strong> 2005<br />

and Microsoft Visual <strong>Studio</strong> .NET 7.x: Visual C# .NET<br />

Visual Basic .NET<br />

Visual C++ (both managed and unmanaged projects and modules)<br />

Visual J# .NET<br />

Compiler operations for Smart Devices are also supported.<br />

• ASP.NET compiler<br />

• Microsoft Visual C++ 6.0<br />

• Microsoft Visual Basic 6.0<br />

• CodeGear RAD <strong>Studio</strong> 2009 (CodeGear Delphi 2009, CodeGear C++<strong>Build</strong>er 2009, CodeGear<br />

C# 2009)<br />

• CodeGear RAD <strong>Studio</strong> 2007 (CodeGear Delphi 2007 for Microsoft Windows, CodeGear<br />

C++<strong>Build</strong>er 2007)<br />

• Borland Developer <strong>Studio</strong> 2006 (Borland Delphi 2006, Borland C++<strong>Build</strong>er 2006, Borland C#<br />

2006, Borland VB.NET 2006)<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

11


12<br />

Introduction<br />

• Borland Developer <strong>Studio</strong> 2005 (Borland Delphi 2005, Borland C# 2005, Borland VB.NET<br />

2005)<br />

• Borland Delphi 8 for Microsoft .NET Framework<br />

• Borland Delphi ver. 3 - 7<br />

• CodeGear C++<strong>Build</strong>er 2007<br />

• Borland C++<strong>Build</strong>er ver. 3 - 6<br />

• Borland J<strong>Build</strong>er ver. 6.0 and later<br />

• GCC<br />

• Intel C++ Compiler ver. 7.0 - 9.1 for Windows<br />

• Intel C++ Compiler ver. 2.0 for Windows CE<br />

• Intel Fortran Compiler ver. 8.0 and later for Windows<br />

• Java Compiler<br />

• MSIL Assembler<br />

• RemObjects <strong>Software</strong> Chrome<br />

• Resource compilers by CodeGear and Borland<br />

Supported build tools<br />

• Apache Ant<br />

• Incredi<strong>Build</strong> by Xoreax <strong>Software</strong> Ltd.<br />

• Microsoft MS<strong>Build</strong><br />

• NAnt (Gerry Shaw and others)<br />

Supported version control systems<br />

• Borland StarTeam<br />

• Concurrent Versions System (open-source network-transparent version control system)<br />

• Jedi Version Control System<br />

• Merant PVCS Version Manager<br />

• Microsoft Visual SourceSafe ver. 6.x and 8.0<br />

• Microsoft Team Foundation Version Control<br />

• Perforce by Perforce <strong>Software</strong> Inc.<br />

• Rational ClearCase ver. 2002.05.00 or later<br />

• Seapine Surround SCM<br />

• SourceGear Vault<br />

• SourceOffSite by SourceGear<br />

• Subversion by Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato.<br />

• Surround SCM<br />

• Team Coherence by Quality <strong>Software</strong> Components<br />

Supported installation building tools<br />

• Advanced Installer by Caphyon Ltd.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Supported Tools<br />

• ExpertInstall v. 3.7 by Tarma <strong>Software</strong> Research<br />

• Ghost Installer <strong>Studio</strong><br />

• Inno Setup<br />

• InstallAnywhere.Net by Zero G <strong>Software</strong>, Inc<br />

• InstallAnywhere Enterprise by Zero G <strong>Software</strong>, Inc<br />

• InstallAware <strong>Studio</strong> 2005 by InstallAware <strong>Software</strong> Corporation<br />

• InstallShield ver. 7 - 2009 of Professional, Enterprise or Express edition<br />

• InstallShield Express Borland Limited Edition ver. 3.0 or later<br />

• InstallShield Professional ver. 6.1 - 7.x<br />

• InstallShield Universal<br />

• Microsoft Setup Project (from Visual <strong>Studio</strong> 7.0, 7.1, 2005 and 2008)<br />

• MSI<strong>Studio</strong> ver. 4.0 by Avatar <strong>Software</strong> GmbH<br />

• Nullsoft Scriptable Install System 2.0 or later<br />

• Setup<strong>Build</strong>er ver. 6 by Lindersoft<br />

• Setup Factory ver 1.1 by Indigo Rose <strong>Software</strong> Corporation<br />

• Installation authoring tools by Wise Solutions, Inc.:<br />

Wise Installation <strong>Studio</strong> ver. 7.0<br />

Wise Installation System ver. 9.0 or later<br />

Wise for Windows Installer ver. 5.0 or later<br />

Wise Package <strong>Studio</strong> ver. 5.0 or later<br />

• WiX Compiler<br />

• WiX Decompiler<br />

• WiX Linker<br />

Supported virtual machines<br />

• Microsoft Virtual PC 2004 and 2007<br />

• Microsoft Virtual Server 2005<br />

• VMware Server 1.0 or later<br />

• VMware Workstation 5.5 or later<br />

Supported testing, profiling and issue-tracking tools<br />

• Aivosto Project Analyzer<br />

• AQdevTeam ver. 1.x by <strong>Automated</strong>QA<br />

• AQtime .NET Edition ver. 1.x by <strong>Automated</strong>QA<br />

• AQtime ver. 3 - 5 by <strong>Automated</strong>QA<br />

• Borland CaliberRM ver. 5.0 or later<br />

• Borland StarTeam<br />

• Bugzilla<br />

• CodeHealer by SOCK <strong>Software</strong><br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

13


14<br />

• JUnit<br />

• Microsoft Application Center Test scripts<br />

• Microsoft Visual <strong>Studio</strong> 2005 Team System<br />

• MSTest<br />

• NUnit (James W. Newkirk and others)<br />

• Peganza Pascal Analyzer ver. 3.0 or later<br />

• Perforce by Perforce <strong>Software</strong> Inc.<br />

• Team Coherence by Quality <strong>Software</strong> Components<br />

• TestComplete ver. 2 - 6 by <strong>Automated</strong>QA<br />

• TestExecute ver. 2 - 6 by <strong>Automated</strong>QA<br />

Supported help compilers<br />

• Doc-O-Matic ver. 4-6 by ToolsFactory <strong>Software</strong>, Inc.<br />

• Doc-To-Help 2008 by ComponentOne<br />

• Fast-Help v.4.4.5.6 by DevHost Ltd.<br />

• Help & Manual 3 and 4 by EC <strong>Software</strong><br />

• HelpScribble v.7.7.4 by Just Great <strong>Software</strong><br />

• Microsoft Help Compiler<br />

• Microsoft HTML Help Compiler<br />

• NDoc<br />

• RoboHelp ver. 7 and later<br />

• Sandcastle by Microsoft<br />

Supported .NET-specific tools<br />

• ASP.NET IIS Registration Tool (aspenet_regiis.exe) by Microsoft<br />

• Assembly Linker (al.exe) by Microsoft<br />

• Assembly Registration Tool (regasm.exe) by Microsoft<br />

• CLRxLint by <strong>Software</strong>4net, Inc.<br />

• Demeanor by WiseOwl, Inc.<br />

• Dotfuscator by PreEmptive Solutions<br />

• FxCop by Microsoft<br />

• Global Assembly Cache Tool (gacutil.exe) by Microsoft<br />

• ILMerge by Microsoft<br />

• Installer Tool (installutil.exe) by Microsoft<br />

• Manifest Generation and Editing Tool (mage.exe) by Microsoft<br />

• Native Image Generator (ngen.exe) by Microsoft<br />

• Resource File Generator (resgen.exe) by Microsoft<br />

• Strong Name Tool (sn.exe) by Microsoft<br />

• XenoCode by Code Systems Corporation.<br />

Introduction<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Supported Tools<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also supports AQtime, AQtime .NET Edition, NUnit and TestComplete. These<br />

.NET-supporting tools are mentioned in the section Supported testing, profiling and issue-tracking tools.<br />

Supported database management systems<br />

• Microsoft SQL Server 2000 with Service Pack 3<br />

• MySQL Server 5.0<br />

• Oracle Database 10g<br />

Supported archivers<br />

• 7-Zip<br />

• WinRAR by Eugene Roshal<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can also compress files to and extract them from ZIP and ZLib archives. To<br />

work with these archives, no external tools are needed.<br />

Supported messaging tools<br />

• ICQ by Mirabilis <strong>Software</strong><br />

• MSN Messenger by Microsoft<br />

• Windows Messenger by Microsoft<br />

• Windows Live Messenger by Microsoft<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also supports notifications via e-mail and NNTP newsgroups. This functionality<br />

is not dependent on the default mail client registered in the system.<br />

Other supported tools<br />

• AQtrace ver. 1.x by <strong>Automated</strong>QA<br />

• Armadillo by Silicon Realms Toolworks<br />

• ASPack<br />

• ASProtect<br />

• Beyond Compare 2.0 or later by Scooter <strong>Software</strong><br />

• EurekaLog ver. 4 - 6 by Fabio Dell'Aria<br />

• IncUpdate <strong>Build</strong>er ver. 2.53 and later by Sunisoft<br />

• madExcept ver. 2 and 3 by Mathias Rauen<br />

• Microsoft Robust File Copy (Robocopy)<br />

• Microsoft Source Server<br />

• Microsoft SQL Server Best Practices Analyzer<br />

• PsTools utilities by Mark Russinovich & Bryce Cogswell<br />

• Smart device emulators by Microsoft<br />

• SQLMaint<br />

• Themida ver. 1.0 or later by Oreands Technologies<br />

• UPX by Markus F.X.J. Oberhumer & László Molnár<br />

• Visual Patch 2.0 and later by Indigo Rose Corp.<br />

• WinLicense ver. 1.0 or later by Oreands Technologies<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

15


16<br />

• XCopy by Microsoft<br />

What’s New in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5<br />

Introduction<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5 includes a great number of new operations, introduces new functionality and<br />

supports more software tools. Below is a complete list of changes.<br />

Overall Improvements<br />

• Macro libraries. You can now organize your common submacros into libraries, and call these<br />

submacros from other macros by using the new Run Library Submacro operation. Libraries can<br />

be stored on a local computer, or in a shared network folder, so that they can be used by macros<br />

running on different computers in your network. See Macro Libraries for details.<br />

• Operation dependencies. In earlier versions, macro operations were executed in their sequence<br />

order in the macro. You had to manually arrange the operations in the needed order, specify<br />

which operations should be run concurrently (if any), and so on. Now, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

can determine the operations’ execution order and parallelize operations for you, based on the<br />

operation dependencies.<br />

Using the new Dependent Group operation, you can divide your macros into several parts, each<br />

of which can be a prerequisite or dependant of another part. For each Dependent Group<br />

operation, you can specify the list of groups that need to be completed in order for the given<br />

group to start. <strong>Build</strong> <strong>Studio</strong> analyzes dependencies between the groups when you launch the<br />

macro, and runs the groups in the order that follows from the dependencies. To learn more, see<br />

Operation Dependencies.<br />

Also, <strong>Build</strong> <strong>Studio</strong> macros now contain two additional properties - Check dependencies and run<br />

macro and Maximum thread count, which let you control execution of dependent groups in the<br />

current macro.<br />

• Improved support for virtual machines. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5 includes three new<br />

operation categories – Microsoft Virtual PC, VMware Server and VMware Workstation that let<br />

you manage virtual machines from macros: run and stop virtual machines, capture and release<br />

devices, create and restore virtual machine snapshots, enumerate through virtual machines<br />

installed on the host and perform other tasks.<br />

The Microsoft Virtual Server category also has two new operations for working with virtual<br />

machine devices – Capture/Release Virtual Machine’s Device (Virtual Server) and If Virtual<br />

Machine’s Device Is ... (Virtual Server).<br />

• Local variables. A new type of macro variable has been added - local variables. These variables<br />

can be defined in the Group, Dependent Group and Submacro operations, and only exist at the<br />

scope of this group or submacro. For example, you can define variables used in a submacro, such<br />

as loop counters or variables storing enumerator results, as local to this submacro. This way, you<br />

will make it easier and more convenient to manage these variables, and will also eliminate them<br />

from the available variables list in other macro operations, where they are not supposed to be<br />

used. See Using Variables and Constants in Macros for more information.<br />

• Remote macro execution under interactive desktop. The Remote Execution Stack, Remote<br />

Group and Remote Macro Command operations include a new option – Run Interactive. It<br />

enables you to run macro operations on the remote computers in the interactive mode. So, you<br />

can now easily run interactive operations, for example, operations that run GUI tests or dialog<br />

with the user, on the remote computers.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


What’s New in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5<br />

• Support for CodeGear RAD <strong>Studio</strong> 2009. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5 adds support for<br />

CodeGear RAD <strong>Studio</strong> 2009. The Borland Compilers category now includes five new operations<br />

for compiling CodeGear RAD <strong>Studio</strong> 2009 projects and project groups directly from <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> macros:<br />

Compile Delphi 2009 for Win32 Project<br />

Compile Delphi 2009 for .NET Project<br />

Compile C++<strong>Build</strong>er 2009 Project<br />

Compile CodeGear C# 2009 Project<br />

Compile CodeGear RAD <strong>Studio</strong> 2009 Project Group<br />

• Secure connections to E-mail, news and FTP servers. The e-mail, news and FTP operations<br />

can now establish secure connections to the servers using SSL and TSL protocols. The<br />

operations have an additional set of properties that let you select the security mode to be used,<br />

specify digital certificates to be used for the server and client authentication and other security<br />

settings.<br />

Client/Server and Web Interface Improvements<br />

• <strong>Build</strong> requests. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface now lets the users request builds instead<br />

of starting them directly. This feature enables the users who are not authorized to run builds<br />

trigger builds on demand. You can set up special build triggers that will process the submitted<br />

requests and run builds upon certain conditions (for example, after a specific number of requests<br />

have been received). You can monitor and manage the submitted requests directly in the Web<br />

Interface, and quickly determine which requests triggered which builds. See <strong>Build</strong> Requests.<br />

• Information on users who started builds. The Server now collects information about the way<br />

the build macros were started - manually by the user, via the Web Interface, by the scheduler,<br />

and so on. This information is displayed in the Launched By column in the Client panel, the<br />

Web Interface and <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s Vista gadget. When the build was initiated by the<br />

user, the Server remembers the user name, so you can see exactly which user started the build.<br />

• Client/Server API. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> now provides a special ActiveX control,<br />

asbControl, that lets you develop custom client applications for managing <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> Servers. This control lets you connect to the build server from your application, list all<br />

registered macros, check the macro status, run, pause, resume and stop macros, as well as<br />

retrieve the history of macro runs. See About absControl.<br />

• Automatic build notifications. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server can now automatically notify<br />

the users when the macros’ status is changed. Notifications can be sent via e-mail, MSN or ICQ.<br />

For more information, see Automatic <strong>Build</strong> Notifications.<br />

• <strong>Build</strong> scheduling via Web Interface. The Web Interface includes the new Tasks section that<br />

can be used to schedule server macros and manage scheduled tasks.<br />

• <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s Windows Vista gadget can now be used not only to monitor server<br />

macros, but also to run them as well as pause and stop them.<br />

• In addition to the EVERYONE group, the Server now includes the pre-defined WINDOWS<br />

USERS group, which contains all unregistered users logged on using Windows authentication.<br />

The EVERYONE group, in its turn, now contains all other user accounts that are not registered<br />

on the server.<br />

• Also, it is now impossible to directly add users to the EVERYONE group as well as to the<br />

WINDOWS USERS one.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

17


18<br />

Introduction<br />

The users’ property set has been extended. Now you can specify the user’s display name that<br />

will be shown among other information in the Client panel, the Web Interface and the gadget.<br />

Also, you can now specify the user’s contact information, such as e-mail address, MSN address<br />

and ICQ identifier. This information is needed for the user to receive automatic build<br />

notifications from the server.<br />

Changes in Operations<br />

• Easy string manipulation. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5 provides an easy way for you to<br />

manipulate string values in macros. A new String Manipulation category includes eleven<br />

operations to perform various actions over strings: concatenate strings, replace characters in a<br />

string, extract substrings, change letter case, manipulate path strings and so on.<br />

• Enhanced support for XML files. Using eleven operations of the new XML category, you can<br />

easily work with XML files: create and merge XML files, create and delete nodes and attributes,<br />

enumerate through nodes and attributes, apply XSL transformations to XML files and so on.<br />

The Get XML Value, Set XML Value and Validate XML File operations were moved to the new<br />

XML category from other categories.<br />

Also, the Wait category include a new Wait For XML File operation, which lets you delay the<br />

macro execution until an XML file is changed or the timeout elapses.<br />

• MySQL Server support. A new MySQL category contains five operations to execute queries<br />

and scripts over MySQL databases, back up and import data and check the databases for errors.<br />

• Improved Subversion support. Support for the Subversion version control system has been<br />

improved:<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5 adds support for Subversion 1.4.6.<br />

The Subversion category includes three new operations:<br />

- Subversion Copy – Copies folders between the Subversion repository and the working<br />

copy.<br />

- Subversion Info – Iterates through the specified files or folders and get information about<br />

each item.<br />

- Subversion Version – Obtains the version information for a folder in a working copy.<br />

The Subversion Export operation includes a new Recursive property that controls whether to<br />

export the specified directory only or its subdirectories as well.<br />

You can now specify custom switches to be used for the Subversion Status operation using<br />

its new Switches property.<br />

• Enhanced support for installation build tools. The Installers category includes five new<br />

operations for building installation packages with the following tools:<br />

ExpertInstall<br />

MSI Factory<br />

MSI<strong>Studio</strong><br />

Setup Factory<br />

Setup<strong>Build</strong>er<br />

In addition, the Wise operation now supports Wise Installation <strong>Studio</strong> ver. 7.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


What’s New in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5<br />

• Better support for help compilers. The Help Compilers category includes four new operations<br />

for compiling help projects created in the following help authoring tools:<br />

Doc-To-Help 2008<br />

Fast-Help<br />

HelpScribble<br />

Help<strong>Studio</strong><br />

• Xenocode Postbuild support. A new Xenocode Postbuild 2008 operation has been added to the<br />

.NET Tools category. This operation enables you to obfuscate and optimize your .NET<br />

assemblies with Xenocode Postbuild directly from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros.<br />

• Improved support for Team Foundation. The Issue Tracking category includes two new<br />

operations for working with work items stored in a Microsoft Visual <strong>Studio</strong> Team Foundation<br />

database:<br />

Team Foundation Work Item Enumerator – Enumerates work items in a Team Foundation<br />

database.<br />

Team Foundation Work Item State Change Filter – Enumerates work items whose state was<br />

changed during the specified time period.<br />

• Bugzilla support. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> 5 introduces support for Bugzilla and adds three<br />

operations for managing items stored in a Bugzilla database:<br />

Bugzilla Create Item – Creates a new item in a Bugzilla database.<br />

Bugzilla Edit Item – Modifies an item stored in a Bugzilla database.<br />

Bugzilla Item Enumerator – Iterates through items in a Bugzilla database.<br />

• Enhanced support for AQdevTeam. Four new operations have been added to make it easy to<br />

manage items stored in an AQdevTeam database. These operations are:<br />

AQdevTeam Create Item – Creates a new item in an AQdevTeam database. This operation is<br />

a re-designed and improved version of the AQdevTeam Create Issue operation, which now<br />

became obsolete.<br />

AQdevTeam Edit Item – Modifies an item stored in an AQdevTeam database.<br />

AQdevTeam Item Enumerator – Iterates through items in an AQdevTeam database.<br />

AQdevTeam History Enumerator – Iterates though items whose state was changed during the<br />

specified time period.<br />

• Enhanced support for archivers. The Archivers category includes four new operations for<br />

creating and unpacking archivers using ZLib and 7-Zip.<br />

• Microsoft Source Server support. A new Microsoft Source Server category provides seven<br />

operations for indexing PDB files for various source control systems, reading index streams from<br />

and writing them to PDB files.<br />

• Improved CD/DVD burning. Two new operations have been added to the Burn CD/DVD<br />

category:<br />

Check CD/DVD Ready – Checks whether your CD/DVD drive is ready for burning.<br />

Erase CD/DVD – Erases a rewritable CD or DVD disk.<br />

• Resource compiler support. A new Compile Resource Script operation added to the Borland<br />

Compilers category lets you compile resource script files directly from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

macros.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

19


20<br />

Introduction<br />

• Disk mapping support. Using three new operations, Map Network Drive, Unmap Network<br />

Drive and Substitute Drive, which have been added to the Misc category, you can easily manage<br />

mapped virtual drives on your computer directly from <strong>Build</strong> <strong>Studio</strong> macros.<br />

• Better macro control flow support. A new Break operation enables you to exit loop and<br />

enumerator operations, for example, if a condition is met.<br />

• Support for Microsoft Visual <strong>Studio</strong> Express Edition. Operations for compiling Visual <strong>Studio</strong><br />

2005 and 2008 projects have a new property – Express edition. You should check this property if<br />

you use Microsoft Visual <strong>Studio</strong> Express Edition.<br />

• The TestComplete 6 and TestExecute 6 operations have been enhanced. Now they allow you to<br />

specify multiple test projects to be run.<br />

• The Advanced Installer operation now has the option to directly specify the commands to be<br />

executed by Advanced Installer.<br />

• Operations of the Interactive category now show the time remaining until the end of the<br />

operation timeout in the dialog caption.<br />

Also, if <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro Player) is running in silent mode, the<br />

Interactive operations do not display any dialog boxes. In this mode, the operations simply store<br />

the default response to the resulting variable.<br />

• The E-mail Enumerator, Receive E-mail Message and Receive News Message operations now<br />

have the Replace existing files option. You can use it to specify whether the operation should<br />

replace existing files when saving the message attachments.<br />

• You can now specify files to be included to or excluded from synchronization performed by the<br />

Synchronize Directories operation.<br />

• The File Enumerator operation can now sort the files before iterating through them.<br />

• The Connect to HTTP operation has a new Proxy type property. It allows you to specify the type<br />

of proxy server that the operation uses to access the Internet.<br />

• The Remote Execution Stack operation now lets you specify the priority of remote build servers.<br />

At run time, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will choose the remote computers to run operations on<br />

according to their priority rather than their order in the list.<br />

• The Connections page of the Setup Connections operation properties dialog now contains the<br />

Test Connection button, which can be used to verify the connection parameters.<br />

• The source file adding interface in the Java Compiler operation was improved.<br />

Changes in Programming Objects<br />

• The ABSUtils object has new methods and properties:<br />

The GetToolPath and SetToolPath methods let you get or set the path to third-party<br />

tools used by your macros from scripts. This way, for example, you can choose which tool<br />

version among those installed on your computer should be used by the macro.<br />

The SetVariableValue and ResetVariableValue methods let you set and reset values<br />

of macro variables from scripts. These methods differ from ordinary assignment operations<br />

in that they let you modify stored variables in the current macro configuration as well as in<br />

all macro configurations at once.<br />

The Macro property provides a scripting interface to the hierarchy of macro operations and<br />

lets you access properties of any operation.<br />

• Using a new BuiltIn.Delay method, you can pause the macro execution from scripts.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Getting</strong> Support<br />

• Objects that provide scripting access to operation properties holding an array of values, have a<br />

new Insert method. This method lets you insert a new item at a specific position in the array. In<br />

earlier versions, you could only append items at the end of the array using the Add method. For<br />

more information about configuring operations from scripts, see Working <strong>With</strong> Operations in<br />

Scripts.<br />

Miscellaneous<br />

• The logic of the File Change and FTP File Change triggers has been changed. When working in<br />

the recursive mode, these triggers now monitor not only the files in the specified folder and its<br />

subfolders, but the subfolders themselves as well. This means that the triggers will fire when a<br />

new subfolder is created in the folder being monitored, or when an empty subfolder is removed<br />

from it.<br />

• The File Change trigger now lets you specify the user account to be used for accessing the folder<br />

or files to be traced. This lets you monitor network resources that require different login<br />

credentials.<br />

• <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes a new group of settings – Source Control Options. Macros can<br />

now be automatically checked out from or checked in to a version control system when you open<br />

or close them in <strong>Build</strong> <strong>Studio</strong>.<br />

• In earlier versions, you could only set the timeout value for the macro operations in seconds.<br />

Now you can specify the timeout in seconds as well as in minutes or hours. The same applies to<br />

the common timeout value, which is set in the Macro Properties dialog.<br />

• A new system constant, LAUNCHEDBY, has been added to let you determine the launch type of<br />

your macros. During the macro run, this constant holds a value that indicates the way the given<br />

macro was launched - by a particular user, by the scheduler, by a continuous integration trigger,<br />

and so on. You can utilize the value of this constant, for example, in notifications sent by your<br />

build macros (see Sending Notifications).<br />

• <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can now be registered in the system as the default editor for MS<strong>Build</strong><br />

projects. So, you can now open MS<strong>Build</strong> project files in <strong>Build</strong> <strong>Studio</strong> by double-clicking them in<br />

Explorer or your favorite file manager.<br />

• Now, when the macro is run in <strong>Automated</strong> Macro Player, error messages are output to the<br />

console in red, warning messages – in yellow.<br />

<strong>Getting</strong> Support<br />

If you have questions, problems or just need help with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, contact our support<br />

team. You can submit your question on-line at:<br />

http://www.automatedqa.com/support/message.asp<br />

Or you can send an e-mail message to our support team at:<br />

support@automatedqa.com<br />

For information on our support policies, please visit our web site www.automatedqa.com/support.<br />

You can also ask questions, search for answers, exchange comments and suggestions on our newsgroup<br />

and on the Community web site:<br />

news://forums.automatedqa.com/automatedqa.public.automatedbuildstudio<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

21


22<br />

http://www.automatedqa.com/community<br />

All your comments and suggestions will be greatly appreciated.<br />

Introduction<br />

You may find answers to your question in the list of the frequently asked questions which is available at:<br />

http://www.automatedqa.com/products/abs_faq.asp<br />

Make sure you regularly visit the <strong>Automated</strong>QA Web site, http://www.automatedqa.com, where you<br />

will find:<br />

• News<br />

• More recent support options including frequently asked questions on our products<br />

• Technical papers from <strong>Automated</strong>QA<br />

• Downloads, such as plug-ins and free tools, from <strong>Automated</strong>QA<br />

• Hot Stuff contributed by experienced users and the AQA team (hands-on solutions, code, plugins,<br />

etc.)<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Samples<br />

A good way to get started using <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is to explore sample macros that are included<br />

with the <strong>Build</strong> <strong>Studio</strong> installation. Here is a list of all samples:<br />

CompileDelphiProject.bxp<br />

\Samples\Macros\CompileDelphiProject<br />

Demonstrates how you can perform typical major steps when building an application (in this instance, it<br />

is a Delphi application):<br />

• <strong>Getting</strong> source files from a version control system (in this macro it is Visual SourceSafe)<br />

• Opening the project in the development tool<br />

• Compiling the project<br />

• Incrementing the version number (it will be used for the further builds)<br />

• Sending notifications that the application has build successfully<br />

In addition, the sample macro demonstrates how to handle errors in the macro.<br />

CompileCPPProject.bxp<br />

\Samples\Macros\CompileCPPProject<br />

Does the same as CompileDelphiProject.bxp, though it builds a Visual C++ .NET application.<br />

Integration.bxp<br />

\Samples\Macros\Integration<br />

Resembles the CompileDelphiProject.bxp macro but upon compiling the Delphi project it also runs the<br />

VCL Class profiler of AQtime 3 for the compiled application and then runs a TestComplete script to simulate<br />

user action in the application.<br />

<strong>Build</strong>Logic.bxp<br />

\Samples\Macros\<strong>Build</strong>Logic<br />

Is similar to CompileDelphiProject.bxp but its main purpose is to demonstrate how you can control the<br />

logic of macro execution by initializing macro variables via the command line.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and Windows Firewall<br />

Notifications.bxp<br />

\Samples\Macros\Notifications<br />

Demonstrates how you can send a notification if an operation failed to execute successfully. To send<br />

notifications, the macro uses submacros which run when an operation fails.<br />

ReadWriteFile.bxp<br />

\Samples\Macros\ReadWriteFile<br />

Demonstres how you can write and read data to or from text files using Windows File System Object<br />

(FSO).<br />

ReadWriteXMLFile.bxp<br />

\Samples\Macros\ReadWriteXMLFile<br />

Demonstrates how you can write and read data to or from XML files using MS XML.<br />

ABS_RSS_Demo.bxp<br />

\Samples\Macros\RSS<br />

Demonstrates how you can create an RSS feed from ABS log summaries.<br />

MakeSample.bxp and DelphiSamples.bxp<br />

\Samples\Operations\Delphi<br />

The first of these macros compiles a sample <strong>Build</strong> <strong>Studio</strong> operation written in Delphi. The second macro<br />

demonstrates how to use this operation, Text File Iterator (Delphi), in macros. For more information on<br />

how to create custom operations for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, see Creating Custom Operations in on-line<br />

help.<br />

MakeSample.bxp and DotNetSamples.bxp<br />

\Samples\Operations\DotNet<br />

The first of these macros compiles a sample <strong>Build</strong> <strong>Studio</strong> operation written in Visual C# .NET. The<br />

second macro demonstrates how to use this operation, Text File Iterator (.NET), in macros. For more<br />

information on how to create custom operations for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, see Creating Custom<br />

Operations in on-line help.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and Windows Firewall<br />

The latest versions of the Windows operating system (Windows XP Service Pack 2, Windows Server<br />

2003 and Windows Vista) include a Windows Firewall. It is special software that controls data transfers<br />

between your computer and other computers. Using Windows Firewall you can allow only certain programs<br />

and services to exchange data with certain computers only; requests that are sent by other applications or to<br />

other computers will be blocked.<br />

There are several operations in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> that require that your computer be connected to<br />

the network. For instance, operations that work with source control systems or operations that send e-mail<br />

messages. In order for these operations to execute successfully, you may need to modify Windows Firewall<br />

settings.<br />

To modify Windows Firewall settings:<br />

• Open Control Panel and select Windows Firewall there. This will open the following dialog:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

23


24<br />

Introduction<br />

• If the Off setting is selected, Windows Firewall is inactive and it does not block any network<br />

requests. In this case, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will be able to connect to the network.<br />

• If the On setting is selected, Windows Firewall is active and it controls data transfers. In this<br />

case, you should modify Windows Firewall settings to enable <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to<br />

connect to the network. Namely, you should add <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to the list of<br />

application that will not be blocked by Windows Firewall. To do this:<br />

Uncheck the Don’t allow exceptions box. In this case, Windows Firewall will block any<br />

network requests from all the programs and services except for those that are mentioned on<br />

the Exceptions tabbed page.<br />

Switch to the Exceptions tabbed page.<br />

Press Add Program. This will call the Add a Program dialog in which you can specify the<br />

application to be added to the exceptions list. Use this dialog to add <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>.exe (\bin\<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe) to the exceptions list.<br />

If you use <strong>Automated</strong> Macro Player, add it to the exceptions list as well<br />

(\bin\<strong>Automated</strong>MacroPlayer.exe).<br />

In the Add a Program dialog, you can also specify IP addresses of computers, with which<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can exchange data. To do this, press Change scope and use the<br />

subsequent dialog.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and Windows Firewall<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can run applications from macros. If the application launched from<br />

a macro<br />

receives data fro m other computers in the network, you should modify Windows Firewall settings for this<br />

application. You can do this in the same manner as you would for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

25


26<br />

<strong>Getting</strong> <strong>Started</strong><br />

<strong>Getting</strong> <strong>Started</strong><br />

The <strong>Getting</strong> <strong>Started</strong> topics describe actions you may need to perform to create macros with <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>.<br />

General Information<br />

Basic Concepts<br />

User Interface - Overview<br />

Creating Macros<br />

Creating a Macro<br />

Adding, Removing and Arranging Operations in a Macro<br />

Modifying Operation Properties<br />

Saving and Loading Macros<br />

Using Macro Configurations<br />

Running Macros<br />

Logging Macro Runs<br />

Analyzing Results of Macro Runs<br />

Further Steps<br />

Sending Notifications<br />

Exporting Results of Macro Runs<br />

Handling Errors in Macros<br />

Incrementing the <strong>Build</strong> Version Number<br />

Scheduling Macro Runs<br />

Basic Concepts<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is a tool that is used to create macros. A macro includes a sequence of<br />

operations to be executed as well as variables and constants that can be used by operations. A macro is an<br />

analogue of a project in development tools like Microsoft Visual <strong>Studio</strong><br />

or Borland Delphi. You can save and<br />

load macros into <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, insert one macro into another, run macros, debug them, check the<br />

results and perform other actions.<br />

Note: Besides editing macros, you can also use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to modify MS<strong>Build</strong> projects.<br />

When you open an MS<strong>Build</strong> project in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, the latter switches into a<br />

special edit mode. This mode only supports MS<strong>Build</strong>-related features; it disables all other<br />

features. This special mode is used because the differences between the tools are significant,<br />

and some of the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> features cannot be implemented in MS<strong>Build</strong> projects.<br />

For information on editing MS<strong>Build</strong> projects, see the Working<br />

<strong>With</strong> MS<strong>Build</strong> Projects<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Basic Concepts<br />

document or the Working <strong>With</strong> MS<strong>Build</strong> Projects section in on-line help.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> – Basic Concepts<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros consist of operations.An operation performs an elementary action, such<br />

as copying files or compiling a project. We use the word “operation” as a general term. For some operations,<br />

it would be better to use the term “statement”, for others – the term “function” or “procedure”. All the<br />

operations<br />

that you can use in your scripts are displayed in the Operations panel. (In <strong>Build</strong> <strong>Studio</strong> running as<br />

a standalone application, this panel is displayed on the left of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s main window by<br />

default. In <strong>Build</strong><br />

<strong>Studio</strong> integrated into Visual <strong>Studio</strong> .NET, this panel is docked to Visual <strong>Studio</strong>’s Toolbox<br />

panel by default.<br />

If Toolbox is auto-hidden, the Operations panel is also hidden. To make it visible, press the<br />

button.)<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> standalone<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

27


28<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrated into Visual <strong>Studio</strong> .NET<br />

<strong>Getting</strong> <strong>Started</strong><br />

All of the operations displayed in the Operations panel are organized into categories. For instance, the<br />

Microsoft Visual SourceSafe, PVCS and Concurrent Version System categories include operations that deal<br />

with version control systems. Among<br />

operation categories, there is a special Frequently Used category that<br />

holds the top 20 operations that you have most frequently used when creating your macros. For more<br />

information<br />

about categories and operations they hold, see List of Operations.<br />

<strong>Build</strong> <strong>Studio</strong> includes a lot of operations, so some categories can be invisible within the Operations<br />

panel. You can reach them by scrolling the panel or by using the Categories item at the top of the<br />

Ope rations panel. You can hide or display operations and categories in the Operations panel, change the<br />

categories order, move operations between categories, create custom categories and perform other<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Basic Concepts<br />

customizing actions over operations in the Operations panel. For more information on this, see Customize<br />

Operations Palette Dialog.<br />

Note: We would like to point out the Script operation of the Standard category. This operation allows<br />

you to create custom script routines in one of the supported scripting languages - VBScript,<br />

JScript or DelphiScript. Custom scripts extend the functionality provided by standard<br />

operations. They can perform certain actions that could not be done by existing operations. For<br />

more information on creating scripts,<br />

see Script Writing - Basics.<br />

To find an operation quickly, you can type the operation name in the edit box at the top of the Operation<br />

panel. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will search for the operation while you are typing and display operations that<br />

match the search criterion in the Operation panel. To cancel th e search, select the Cancel Search item at<br />

the panel toolbar.<br />

Besides Operations, <strong>Build</strong> <strong>Studio</strong>’s main window holds six more panels: Macro, Log, Summary, Charts,<br />

Client and Assistant (<strong>Build</strong> <strong>Studio</strong> Assistant in Visual <strong>Studio</strong>).<br />

• The top-right panel, Macro, holds operations that you added to the macro. For each operation,<br />

it<br />

displays the operation name, description and two check boxes: the left box specifies if <strong>Build</strong><br />

<strong>Studio</strong> will execute the operation; the right check box specifies whether the macro stops running<br />

if an error occurs during execution of this operation.<br />

Some operations can have child operations. For example, child operations of the For Loop<br />

operation will be executed as the loop “body”. Child operations are displayed as child nodes of<br />

their parent operation. Child operations can also have child operations, which, in turn, can also<br />

have their child operations, etc. That is, the operation list in the macro has a tree-like structure.<br />

When running a macro, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

executes the operations in the order of their<br />

appearance in the Macro panel, from top to bottom.<br />

For more information on how to add, remove and<br />

arrange operations in the macro, see Adding,<br />

Removing and Arranging Operations in a Macro.<br />

By default, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

executes the operations in the same order as they appear in<br />

the Macro panel, from top to bottom.<br />

This is called serial execution. But you can also configure<br />

the macro so that <strong>Build</strong> <strong>Studio</strong> executes some<br />

operations or groups of operations concurrently.<br />

This lets you perform different tasks<br />

at the same time (for example, one group of operations<br />

uploads files to an FTP server, whereas at the same time another group of operations cleans<br />

working folders). For more information on how to run macro operations concurrently, see<br />

Concurrent Operations<br />

Execution.<br />

• The Log panel displays results of the macro execution. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> monitors every<br />

macro run and logs the name of every operation that was executed (the Message column) as well<br />

as the time spent on executing each operation along with all of its child operations (the Time<br />

with Children column). Besides the results of the operation execution, the log can also contain<br />

custom messages. The Standard category includes the Log Message operation that lets you post a<br />

custom message to the log. See Logging Macro Runs for more information.<br />

• Like the Log panel, the Summary panel displays results of the macro execution but in the<br />

comparative form: you can simultaneously view results both of the current macro run and of the<br />

previous run that was finished without failures in the macro. Thus if the macro fails or an error<br />

(warning) occurs in an operation, you can quickly see what caused this malfunction in<br />

comparison with the run where there were no such problems.<br />

• The Charts panel displays statistics on macro runs performed on your computer. For<br />

more<br />

information on this, see Charts - Overview.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

29


30<br />

<strong>Getting</strong> <strong>Started</strong><br />

• The Client panel is used to control the macro run on remote computers. See <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> Client/Server – Overview for more information on this.<br />

• The Assistant panel (in Visual <strong>Studio</strong> .NET,<br />

this panel is called <strong>Build</strong> <strong>Studio</strong> Assistant) helps<br />

you get started with <strong>Build</strong> <strong>Studio</strong>'s user interface and provides a quick way to perform common<br />

tasks that arise when you are working with <strong>Build</strong> <strong>Studio</strong>.<br />

As we have said above, a macro can also hold variables and constants that you can use to set<br />

values for<br />

operations properties. Variables, for instance, can store values that should be shared between several<br />

operations: one of the operations can store its result to a variable and another operation can use this variable<br />

as a parameter.<br />

This topic contains only brief overview of variables and constants. For complete information,<br />

see Using Variables<br />

and Constants in Macros.<br />

To create or check values of variables and constants, use items of the Variables menu.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> standalone<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrated into Visual <strong>Studio</strong> . NET<br />

There are three types of macro variables: global variables, local variables and stored variables. Global<br />

variables and stored variables are available to all macro operations, while local variables are defined only<br />

for a particular group of operations. Global and local variables are reset once the macro run is over. Stored<br />

variables, on the contrary, store their values between subsequent macro runs. A common task for stored<br />

variables, for example, is to store the build version number.<br />

Global and stored variables have the environment attribute. If it is set for a variable, this variable<br />

becomes an environment variable for the processes launched by the macro. For instance, such variables are<br />

passed as environment variables to the process that is started by the Execute Program operation.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


User Interface – Overview<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also provides easy access to the operating system’s environment variables.<br />

However, these variables cannot be changed in macros. They are used as constants.<br />

As for constants, they can be used in macros similarly to variables. A constant can be user-defined or<br />

system. User-defined constants are ordinary constants, which you create and which value you specify.<br />

System constants hold predefined values such as paths to compilers, archivers, etc.<br />

Note that both variables and constants can be used in scripts. For more information on this, see Using<br />

Variables and Constants in Macros.<br />

Editing MS<strong>Build</strong> Projects<br />

You can use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to modify MS<strong>Build</strong> projects. The MS<strong>Build</strong> editing feature only<br />

works if you use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> as a stand-alone application. It does not work when <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> is integrated into Microsoft Visual <strong>Studio</strong>.<br />

Editing MS<strong>Build</strong> projects is similar<br />

to editing macros.<br />

When you are editing MS<strong>Build</strong> projects, the Operations panel displays<br />

the elements that can be added to<br />

the project. Note that since there are not a lot of elements, the panel’ s search functionality is turned off.<br />

You add an element to your project by selecting this element<br />

in the Operations panel and then clicking<br />

on the element that you would like to be<br />

its parent, in the Macro panel.<br />

The Macro panel displays the project elements in the same order, in which they are in the project file.<br />

You can change the order, if needed, by using the<br />

disabled if the element’s<br />

position cannot be changed.<br />

, , and toolbar items. These items can be<br />

The Macro panel contains two columns that specify the element’s name and the contents of the element’s<br />

Condition property. If the Show Details item in the context menu of the Macro<br />

panel is checked, the panel<br />

also displays elements’ properties<br />

under the elements’ names.<br />

To modify an element's properties, right-click this element in the Macro panel<br />

and select Properties<br />

from the context menu, or double-click the element in the Macro panel. This displays the Properties dialog,<br />

where you can modify the properties of the element. For more information on properties, see MS<strong>Build</strong><br />

Project Elements Reference in the Working <strong>With</strong> MS<strong>Build</strong> Projects document or in on-line<br />

help.<br />

When yo u are editing MS<strong>Build</strong> projects, many <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> features are turned off. This<br />

happens because the differences between the tools are significant, and some <strong>Build</strong><br />

<strong>Studio</strong> features cannot be<br />

used in MS<strong>Build</strong> projects. For instance, the concept of configurations and stored variables does<br />

not work for<br />

MS<strong>Build</strong>, so the appropria te <strong>Build</strong> <strong>Studio</strong> dialogs are disabled. Also, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> does not allow<br />

running and debugging of MS<strong>Build</strong> projects, so all of the run and debug specific menu items<br />

are disabled.<br />

Note that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> only turns off those features that cannot be used in MS<strong>Build</strong> projects.<br />

Non-specific features are available. For instance, you can use the Client panel to manage remote macro runs<br />

and you can use the Charts panel to view build statistics.<br />

For more information on editing MS<strong>Build</strong> projects, see the Working <strong>With</strong> MS<strong>Build</strong> Projects document or<br />

the Working <strong>With</strong> MS<strong>Build</strong> Projects section in on-line help.<br />

User Interface – Overview<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Standalone<br />

The user interface of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> consists of panels, the main menu and toolbars. The<br />

general layout is as follows:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

31


32<br />

<strong>Getting</strong> <strong>Started</strong><br />

Most of <strong>Build</strong> <strong>Studio</strong>’s screen area is occupied by panels: Operations, Macro, Log, Summary and<br />

Assistant. Each panel serves a separate purpose in your work<br />

with <strong>Build</strong> <strong>Studio</strong>. The purpose of panels and<br />

how they work together is explained in a separate topic which you should read: Basic Concepts.<br />

The size and layout of panels are not fixed. You can change panel sizes by dragging the separator<br />

between them. But the most important point about handling panels is how they can be moved around -<br />

docking. Panels are where you do your actual work and get your results in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. Docking<br />

is our way of providing you with the most flexible workspace for the particular task you are interested in. It<br />

means that the entire work area can be reconfigured at will, even beyond what is possible with toolbars<br />

(moving, hiding, etc.). Docking of panels in <strong>Build</strong> <strong>Studio</strong> is similar to docking windows in Microsoft Visual<br />

<strong>Studio</strong>. For instance, you can hide panels by clicking the button in the panel caption. This will minimize<br />

the panel along one of the sides of <strong>Build</strong> <strong>Studio</strong>'s window, so only the panel caption remains visible:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


User Interface – Overview<br />

The panel pops up when you move the mouse over the caption. For more information on auto-hiding and<br />

docking panels, see Docking in on-line help.<br />

In the Macro, Log and Summary panels, you can –<br />

• Resize columns by dragging the separator between column headers.<br />

• Swap columns by dragging<br />

their headers from one location to another.<br />

• Add and remove columns to the panel:<br />

Select the Field Chooser menu item from the panel's context menu. The Columns dialog<br />

will appear. To add a column, drag it from the Columns dialog onto the panel. To remove a<br />

column from the panel, drag it from the panel and drop onto the Columns dialog:<br />

The Macro, Log, Summary and Assistant panels have a number of options that can be modified via the<br />

Options dialog. The general view and behavior of panels can be modified in the User Interface dialog.<br />

To save the current panel layout to a file, select Options | Desktop | Save Docking to File from <strong>Build</strong><br />

<strong>Studio</strong>’s main menu (by default, these files have the .qtdock extension). To load the panel layout from a file,<br />

select Options | Desktop | Load Docking from File. To restore the default panel layout, select Options |<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

33


34<br />

<strong>Getting</strong> <strong>Started</strong><br />

Desktop | Restore Default Docking. The Save Desktop As and Load Desktop items of the Options |<br />

Desktop su bmenu will save and load the panel layout along with the toolbar settings.<br />

The <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> interface receives commands in four ways:<br />

• through<br />

menus<br />

• through popup<br />

menus (right-click, context-dependent)<br />

• through toolbars • through keyboard<br />

shortcuts<br />

Keyboard shortcuts can be customized via the Customize<br />

Keyboard dialog. You can define your own<br />

shortcuts or select one of the predefined key mapping schemes: MS Visual <strong>Studio</strong> IDE or Borland IDE.<br />

As in Microsoft Word or Excel, menus are a type of toolbar, and<br />

both can be customized at will. You can<br />

also create your own toolbars. By default, toolbars are docked at the top of <strong>Build</strong> <strong>Studio</strong>’s window. You can<br />

easily dock them to any other edge by dragging them to the left, right or bottom edge of the window. To<br />

remove or add buttons, you can either call the Toolbar Customization window or use the Quick<br />

Customization feature.<br />

For complete overview, see Toolbars Customization in on-line help.<br />

To save or load the current layout of toolbars and toolbar items, use the Options | Desktop | Save<br />

Toolbars to File and Options | Desktop | Load Toolbars from File menu items. To restore the default<br />

toolbar layout, select Options | Desktop | Restore Default Toolbars. To save and load the layout of panels,<br />

menus and toolbars, use the Options | Desktop | Save Desktop As and Options | Desktop | Load Desktop<br />

menu items.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Integrated Into Visual <strong>Studio</strong> .NET<br />

<strong>Build</strong> <strong>Studio</strong>’s user interface consists of panels, the main menu and toolbars. Once <strong>Build</strong> <strong>Studio</strong> has been<br />

integrated into Visual <strong>Studio</strong>, the <strong>Build</strong> <strong>Studio</strong> project node appears in the Solution Explorer under the<br />

solution node; the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> panels - Macro, Operations, Log, Summary and Assistant -<br />

become comp onents of Visual <strong>Studio</strong> (the Assistant panel is called <strong>Build</strong> <strong>Studio</strong> Assistant in Visual <strong>Studio</strong>):<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


User Interface – Overview<br />

Pan els are where you do your actual work in <strong>Build</strong> <strong>Studio</strong>. Every panel serves a different purpose. For<br />

more detailed<br />

information on the different purposes and on how the panels work together, see Basic<br />

Concepts.<br />

You can<br />

change the panel size and location in the same way you do other Visual <strong>Studio</strong> windows. To<br />

bring up a panel,<br />

select <strong>Build</strong> <strong>Studio</strong> | Panel List from Visual <strong>Studio</strong>’s menu and then choose the panel from<br />

the ensuing Select Panel dialog.<br />

Panels have a number of options that can be modified via the Options dialog.<br />

The <strong>Build</strong> <strong>Studio</strong> panels have a toolbar at the top. The toolbar items allow you to perform certain<br />

operations over data displayed in panels. For instance, the Show Operation Details item of the Macro<br />

toolbar let you preview the operation properties directly in the Macro panel:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

35


36<br />

<strong>Getting</strong> <strong>Started</strong><br />

Even more operations are available in the context menu for each panel. For instance, the context menu of<br />

the Log panel holds the Export item that can be used for exporting the results of a macro run to text, html or<br />

xml files:<br />

You can dock a “panel” toolbar to any side of the panel that holds this toolbar. There is also a way to<br />

hide or display items of these toolbars. For more information, see Toolbars Customization in on-line help.<br />

Unlike toolbars, the panel’s context menu is not customizable.<br />

Besides the “panel” toolbars, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also adds a toolbar, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, to<br />

Visual <strong>Studio</strong>. You can display this toolbar by right-clicking somewhere in the toolbar area and checking the<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> item in the subsequent context menu. The toolbar holds the following items:<br />

The toolbar items are displayed or hidden depending on the current context. For instance, the Sto p<br />

item will not be visible until you start the macro execution.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also adds the <strong>Build</strong> <strong>Studio</strong> item to Visual <strong>Studio</strong>’s main menu:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Creating a Macro<br />

The menu holds the same items as the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> toolbar does plus the following extra<br />

items: Batch Run, Append Macro From, Options, Tasks (Windows Scheduler), Tasks (Continuous<br />

Integrat ion ) and Tools. Batch Run lets you run the macro using several macro configurations at once. Using<br />

the Append Macro From item, you can add operations stored in another macro to your macro. The Options<br />

item provides access to <strong>Build</strong> <strong>Studio</strong> options, to the Install Extensions dialog and to the properties of the<br />

<strong>Build</strong> <strong>Studio</strong> project. The Tasks (Windows Scheduler) item allows you to schedule the macro execution.<br />

The Tasks (Continuous Integration) lets you create time- and event-triggered tasks that run your macro; an<br />

example of such a task is running a macro that builds your project when the project files are modified under<br />

source code control. The Tools item provides access to the Tools dialog.<br />

You can manage the <strong>Build</strong> <strong>Studio</strong> menu and the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar in the same manner as<br />

you manage other Visual <strong>Studio</strong> menus and toolbars.<br />

Creating a Macro<br />

Your macro is simply your current “work site” in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. It unifies operations to be<br />

executed and variables and constants that will be used by the operations.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> supports creating and editing of two types of files:<br />

•<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros<br />

• MS<strong>Build</strong> projects<br />

If you use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> as a standalone application, then to create a new macro or an<br />

MSBUild project, simply use the corresponding command of the File | New:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

37


38<br />

<strong>Getting</strong> <strong>Started</strong><br />

If you want to modify a file that<br />

already exists, you should open it in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> first. To do<br />

this, select File | Open from the main menu. This will call the standard Open File dialog where you can<br />

select the desired file.<br />

After the macro is created (opened),<br />

you can add operations to it and modify their properties, and create<br />

and modify macro constants and variables, and so on. You can edit MS<strong>Build</strong> projects in a similar way, by<br />

adding targets, tasks and other elements<br />

and configuring their properties.<br />

In <strong>Build</strong> <strong>Studio</strong> integrated into Visual <strong>Studio</strong> .NET, you can only work with <strong>Build</strong> <strong>Studio</strong><br />

macros – the<br />

integrated version does not support<br />

editing of MS<strong>Build</strong> projects.<br />

You can create a new macro in<br />

the same way as you create new projects in Visual <strong>Studio</strong>:<br />

• Select File | New | Project from Visual <strong>Studio</strong>’s<br />

menu or press the New Project button on the<br />

Start page.<br />

This will call the New Project dialog.<br />

• In the dialog:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Creating a Macro<br />

Select <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Projects from the list on the left of the dialog and then select<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Project or <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Project (XML Format) on the<br />

right.<br />

Note: The difference<br />

between these options is the format the macro file will have. (A<br />

macro<br />

can be stored either in binary or xml format. For more information, see<br />

Saving<br />

and Loading Macros).<br />

Specify the project name, location and solution.<br />

Press OK.<br />

Also, the New Project<br />

dialog appears when you select <strong>Build</strong> <strong>Studio</strong> | Add ABS Project<br />

from Visual <strong>Studio</strong>'s menu, or press the Add ABS Project from the Solution<br />

Explorer:<br />

If a solution is open in Visual <strong>Studio</strong> .NET when you select Add ABS Project, upon pressing OK in the<br />

New Project dialog the new <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> project will be added to the solution. In addition, you<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

39


40<br />

<strong>Getting</strong> <strong>Started</strong><br />

will also be asked for which of the solution's projects you want to add the corresponding Compile operations<br />

to the macro. To do this, the Add Projects to ABS Project dialog is used.<br />

A macro added to a Visual <strong>Studio</strong> solution should not contain the Compile Visual <strong>Studio</strong> .NET<br />

Solution operation that compiles the parent solution itself. Such an operation causes a circular<br />

reference and leads to an error.<br />

You can open an existing <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro in the Visual <strong>Studio</strong> .NET in the same manner<br />

as you open any other Visual <strong>Studio</strong> project: just select File | Open Project.<br />

After the macro is created (opened), you can add operations to it and create and modify constants and<br />

variables.<br />

Adding, Removing and Arranging Operatio ns in a Macro<br />

Before adding an operation to the macro, locate that operation in the<br />

Operations panel (by default, this<br />

panel is on the left side of the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> window).<br />

The contents of the Operation panel depend<br />

on whether you are editing an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro or an MS<strong>Build</strong> project:<br />

• If you are editing an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro, the Operations panel displays a list of<br />

available operations grouped by their categories.<br />

• If you are editing an MS<strong>Build</strong> project, the Operations panel displays a list of elements that can<br />

be used in MS<strong>Build</strong> projects. For information on these elements and modifying MS<strong>Build</strong><br />

projects in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, see the Working <strong>With</strong> MS<strong>Build</strong> Projects document or the<br />

Working <strong>With</strong> MS<strong>Build</strong> Projects section in on-line help.<br />

This topic explains how you can work with macros’ operations in the Operations panel. Working with<br />

MS<strong>Build</strong> project elements in the panel is similar to working with operations. For information on adding<br />

elements to and removing them from MS<strong>Build</strong> projects, see the Working <strong>With</strong> MS<strong>Build</strong> Projects document or<br />

the Working <strong>With</strong> MS<strong>Build</strong> Projects section in on-line<br />

help.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> offers a lot of operations that can be used in macros. Before adding an operation<br />

to a macro, you should locate that operation in the Operations panel. You can do this in either of the<br />

following ways:<br />

• Expand the category holding the desired operation in the Operations panel. Some categories may<br />

be invisible within the panel, so to reach them, you should scroll the panel or press the<br />

Categories item from the toolbar of the Operations panel and then select the category from the<br />

ensuing popup list.<br />

– or –<br />

• Search for the operation by typing the operation name in the edit box at the top of the Operations<br />

panel. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will search for the operation while you are typing and display<br />

operation that match<br />

the search pattern in the Operations panel. For instance, the following<br />

imag e illustrates the situation when a user has typed Set and <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> has<br />

displayed<br />

all operations, which names include the substring Set:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Adding, Removing and Arranging Operations in a Macro<br />

To stop the search and restore normal categories display, select Cancel Search from<br />

the panel toolbar.<br />

Note: The search functionality is off when you are editing MS<strong>Build</strong> projects.<br />

There are not a lot of MS<strong>Build</strong> project<br />

elements, so you can quickly find<br />

the desired element within the Operations<br />

panel.<br />

Once yo u have located the desired operation in the Operation panel, you can add it to the macro in any of<br />

the following ways:<br />

•<br />

Double-click the desired operation in the Operations panel. The new operation will be added to<br />

the macro below the currently selected operation.<br />

• C lick the desired operation in the Operations panel, then switch to the Macro panel. If you place<br />

the mouse cursor over an operation<br />

in the macro, the cursor will include an arrow that points<br />

upwards or downwards depending upon over which part (upper or lower) of that operation the<br />

mouse cursor is currently located. If you click that operation, the new operation will be added<br />

before or after it according to the arrow direction in the mouse cursor. If you click below the list<br />

of operations, the new operation will be added to the end of the macro.<br />

Once you have added an operation to the macro, you can modify the operation’s properties. Property<br />

values are defined via the Operation Properties dialog. If the Show Properties dialog when adding a new item<br />

option is enabled in the macro options, this dialog is called automatically upon adding an operation.<br />

Otherwise you should call the dialog manually. To do this, either right-click the desired operation and select<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

41


42<br />

<strong>Getting</strong> <strong>Started</strong><br />

Properties<br />

from the context menu, or simply double-click the operation in the Macro panel, or press Enter<br />

when that operation is selected in the Macro panel. For instructions on how to specify operation properties<br />

see Modifying Operation Properties.<br />

Some operations may have child operations. For instance, While Loop, For Loop or If … Then. For loop<br />

operations it means that child operations will be run within the loop “body”. For If … Then, it means that<br />

child operations will be executed provided that the if condition is True. To make an operation a child one,<br />

simply drag the operation from the left (or right) panel and drop it over another<br />

operation you want to be the<br />

“parent”. To change operations’ “relationships”, you can also use the Indent and Un-Indent items of<br />

<strong>Build</strong> <strong>Studio</strong>’s Edit toolbar or Edit menu or of Visual <strong>Studio</strong>’s Macro panel toolbar. In addition, you can<br />

press Ctrl-Right or Ctrl-Left in <strong>Build</strong> <strong>Studio</strong> running as a standalone<br />

application (these shortcuts can be<br />

customized in the Customize Keyboard<br />

dialog).<br />

You can select operations within the macro and drag them along the tree: move the selected operation to<br />

another place, copy the operation, or make<br />

one operation a child of another.<br />

Once you have added an operation to the macro, you can modify<br />

the operation’s properties. To do this,<br />

either right-click the desired operation and select Properties from the context menu, or simply double-click<br />

the operation in the Macro panel, or press Enter when that operation is selected<br />

in the Macro panel. This will<br />

open the Operation Properties dialog where you can specify the property values. For more information<br />

about this, see Modifying Operation Properties.<br />

Note that by default, operations are executed in the same order they are displayed<br />

in the Macro panel of<br />

<strong>Build</strong> <strong>Studio</strong> – from top to bottom (except for Initialization, Finalization and Submacro operations). It is also<br />

possible to run certain operations or groups of operations concurrently.<br />

To learn more, see Concurrent<br />

Execution of Operations.<br />

Note that operations are executed in the same order they are displayed<br />

in the Macro panel of <strong>Build</strong><br />

<strong>Studio</strong> - from the top to bottom (the only exception is the Submacro<br />

operation). To change the order of<br />

operations in the macro, use the Move Up and Move Down items on <strong>Build</strong> <strong>Studio</strong>’s Edit toolbar or the<br />

Edit<br />

menu, press Ctrl-Up or Ctrl-Down (this is available only if <strong>Build</strong> <strong>Studio</strong> is running as a standalone<br />

application), on Visual <strong>Studio</strong>’s Macro panel toolbar or simply drag and drop an operation to<br />

the desired<br />

location.<br />

The operation being dragged is placed before or after the operation on which it is dropped: the exact<br />

new location of the dragged operation is indicated by an arrow in the mouse cursor which is displayed when<br />

you hover the cursor over an existing operation before dropping. You can copy the chosen operation to<br />

another location: just keep Ctrl pressed when dragging the operation.<br />

To remove the chosen operation from the macro, either select Remove Operation from the context<br />

menu, from <strong>Build</strong> <strong>Studio</strong>’s Edit menu or from Visual <strong>Studio</strong>’s Macro panel toolbar, or press Del. To delete<br />

all the operations at once, select Clear All from the context menu or from <strong>Build</strong> <strong>Studio</strong>’s Edit menu.<br />

To select several operations in the macro, hold down Shift or Ctrl when selecting the needed operations.<br />

If the selected operations meet all of the following conditions, you can change their position in the macro or<br />

remove them at once:<br />

• The selected operations belong to the same level in the tree.<br />

• There are no unselected operations between them at the same level.<br />

• The selected operations do not belong to different parents.<br />

You can copy or cut an operation to and paste<br />

it from the clipboard. To do this, use the Edit menu's<br />

Copy, Cut and Paste items of the Edit menu (or the Macro panel toolbar, if you use <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> integrated into Microsoft Visual <strong>Studio</strong>). You can also copy, cut and paste several operations located<br />

at the same level.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Modifying Operation Properties<br />

To undo or redo changes you made in the macro or in operation properties, either use the Undo and<br />

Redo items of the Edit menu (the Macro panel toolbar in Visual <strong>Studio</strong>) or press Ctrl-Z or Ctrl-Y<br />

respectively.<br />

You can also save the modified macro to a file and load it later (see Saving and Loading Macros).<br />

Modifying Operation Properties<br />

Each operation or MS<strong>Build</strong> project element has a number of properties that let you specify the actual<br />

actions that the operation (or element) performs. For instance, if you want your macro to compile a C#<br />

project, you should at least specify the project name in the operation properties. Therefore, once you have<br />

added an operation (or element) to your macro (or MS<strong>Build</strong> project) your next step is to modify the<br />

properties of this operation (or element).<br />

Note that editing MS<strong>Build</strong> projects is only supported in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Standalone. Editing of<br />

these<br />

projects is not supported by <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrated into Microsoft Visual <strong>Studio</strong>.<br />

Modifying Properties of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Macro Operations<br />

You can modify operation properties via <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s user interface or programmatically<br />

from scripts. In most cases you will change the operation properties via the user interface. For information on<br />

how to get or set property values in scripts, see Working <strong>With</strong> Operations in Scripts.<br />

The operation’s properties are set in the Operation Properties dialog. To call the dialog, do one of the<br />

following:<br />

• Right-click the desired operation in your macro and then select Properties from the context menu<br />

• Double-click the operation in the Macro panel.<br />

• Select the desired operation and press Enter.<br />

• If the Show Properties dialog when adding a new item option is enabled, <strong>Automated</strong><br />

<strong>Build</strong><br />

<strong>Studio</strong> automatically displays the dialog once you have added a new operation to your macro.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

43


44<br />

<strong>Getting</strong> <strong>Started</strong><br />

The dialog holds several tabbed pages. The first page holds properties common for all operations; other<br />

pages hold properties specific to the selected operation. The common properties are:<br />

Property Description<br />

Description Description of the operation. This property has no effect on macro<br />

execution. It is used for notes. This property is required if the Begin a<br />

progress group property is enabled.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> stores and displays descriptions using<br />

regional settings that are currently selected on your computer. If<br />

the description includes non-Latin characters, for instance,<br />

characters with diacritical marks, the description may be<br />

displayed incorrectly on other computers, which regional<br />

settings differ from regional settings selected on your machine.<br />

You can also comment the macro using the Comment operation.<br />

Enabled Specifies if the chosen operation is run when the macro is run using the<br />

active configuration. Otherwise, the operation is excluded from macro<br />

execution.<br />

Run submacro if operation fails Specifies the submacro which runs if an error occurs when executing the<br />

operation.<br />

You can either set the submacro specific for the operation, or use the<br />

default submacro, which is common for all operations (the latter can be set<br />

in the Macro Properties dialog). See Handling Errors in Macros.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Modifying Operation Properties<br />

Stop execution if operation fails Allows you to stop execution of parent operations or the entire macro if an<br />

error occurs during the execution of the operation or its child operations.<br />

For more information on this, see Handling Errors in Macros.<br />

If the Run submacro if operation fails property is not set to None,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> runs the submacro first and then handles an error<br />

according to the Stop execution if operation fails property.<br />

Unique name Identifier of the operation. This identifier can be used to address<br />

the<br />

operation from scripts. See Working <strong>With</strong> Operations in Scripts for more<br />

information on this.<br />

In addition, Unique Name cannot be empty for the Submacro<br />

and Label<br />

operations, because it is used by other operations to call these operations.<br />

The Unique Name must start with a letter or an underscore character<br />

and<br />

contain only alphanumeric characters and underscores.<br />

Begin a progress group Sets whether the operation is the first operation of a new progress group in<br />

the current macro. Progress groups let you organize your macros<br />

logically.<br />

A progress group is just a logical unit that includes several operations in<br />

the macro hierarchy, starting from the one for which this property is on. In<br />

other words, using progress groups you can divide your<br />

macros into<br />

several logical parts. For instance, if your macro is intended to<br />

build an<br />

installation, you can create one progress group for operations that prepare<br />

files for your build, another progress group for operations that com pile<br />

these files, and the third for operations that compile your installation<br />

program. A progress group's name is the value of the Description property<br />

of the first operation in this group. Currently, progress groups are used to<br />

indicate the macro execution progress: when running the macro, <strong>Build</strong><br />

<strong>Studio</strong>'s status bar displays the name of the progress group that is currently<br />

being executed. Therefore, you are informed which part of your macro is<br />

currently running.<br />

Log to summary Sets whether to collect statistics on this operation for the Summary panel.<br />

Timeout This property is common for operations that run a program (for instance,<br />

operations of the Execute category) or that use third-party applications (for<br />

example, operations of the Compilers or Installers categories). It specifies<br />

the maximum allowed execution time (in seconds, minutes or hours) for<br />

the operation. The timeout purpose is to stop the operation if the<br />

application which that operation has launched executes too long and<br />

probably hung: if the application execution time exceeds the timeout limit,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> terminates this application.<br />

You can either set the timeout specific for the operation, or use the default<br />

timeout, which is common for all operations (the latter can be set in the<br />

Macro Properties dialog). If the timeout is 0, it will be ignored (as when<br />

the Don’t check timeout option is selected).<br />

By enabling the timeout for macro operations, you can handle errors that<br />

occur during the macro run. For more information, see Handling Errors in<br />

Macros.<br />

For information on properties that are specific to an operation, see description of the desired operation.<br />

See also List of Operations.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

45


46<br />

<strong>Getting</strong> <strong>Started</strong><br />

You can modify the common properties on the Properties page of the Operation Properties dialog. Some<br />

of the common properties are displayed as columns of the Macro panel. As for the specific properties, if the<br />

Show Operation Details menu item is checked in the context menu or on the toolbar of the Macro panel,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> displays them under each operation in the Macro panel. If this menu item is<br />

unchecked, the properties are not visible. However, you can display these properties in a hint, which is<br />

available if the Show details in hint option is enabled.<br />

Note: When editing properties, you can either enter the property value or specify a constant or a<br />

variable as a value. If you use constants or variables, you should enclose the name of this<br />

constant (or variable) in the % signs. For instance, the file_name variable should be referred to<br />

as follows:<br />

%file_name%<br />

Otherwise, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will treat the name as an ordinary string.<br />

If a property requires that its value must be saved to a variable, you should specify the<br />

variable name without % signs. For complete information on macro variables and constants,<br />

see Using Variables and Constants in Macros.<br />

The toolbar at the top of the Operation Properties dialog holds the Previous and Next items that<br />

let you quickly switch to the properties of the operation that follows or precedes the currently selected<br />

operation in the macro.<br />

The toolbar also holds the Run Selected Operation and Run Selected Operation with Children<br />

items that let you execute the selected operation. For more information on this, see Running Macros.<br />

Additionally, the toolbar includes the Macro Properties button which allows you to call the Macro<br />

Properties dialog directly from the Operation Properties dialog.<br />

Whenever you change an operation's properties using either the Operation Properties dialog or the<br />

Macro<br />

panel, you apply the changes to the active macro configuration only. See Using Macro<br />

Configurations. The Operation Properties dialog lets you temporarily switch the active configuration of the<br />

current macro without leaving the dialog. To do this, use the Configuration dropdown list box at the top of<br />

the dialog. The active configuration will include all property values of the operation that is currently<br />

available in the dialog.<br />

After you finish editing operation properties, you can select Run | Check from the main menu of<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (if it is running as a standalone application) or <strong>Build</strong> <strong>Studio</strong> | Check from Visual<br />

<strong>Studio</strong>’s main menu (if <strong>Build</strong> <strong>Studio</strong> is integrated into Visual <strong>Studio</strong> .NET) to verify that the properties are<br />

set correctly. Note that this command checks the macro using the data of the active configuration only. To<br />

check the macro in a different configuration, you should first switch to that configuration. See Using Macro<br />

Configurations.<br />

Modifying Properties of MS<strong>Build</strong> Project Elements<br />

You modify properties of MS<strong>Build</strong> project elements via the special Properties dialog. To call it, do any<br />

of the following:<br />

• Right-click the desired element in your macro and then select Properties from the context menu.<br />

• Double-click the element in the Macro panel.<br />

• Select the desired element in the Macro panel and press Enter.<br />

• If the Show Properties dialog when adding a new item option is enabled, <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> automatically displays the dialog once you have added a new element to your MS<strong>Build</strong><br />

project.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Saving and Loading Macros<br />

The Properties dialog displays the properties of the selected element, so the dialog’s contents depend on<br />

the selected element. For information on elements and their properties, see MS<strong>Build</strong> Project Elements<br />

Reference in the Working <strong>With</strong> MS<strong>Build</strong> Projects document or in on-line help.<br />

To specify elements’ properties, you can refer to the Property, Item and Item Metadata elements of your<br />

MS<strong>Build</strong> project as well as to MS<strong>Build</strong> reserved properties and the operating system’s environment<br />

variables. For information on how to refer to them, see Specifying Element Properties in the Working <strong>With</strong><br />

MS<strong>Build</strong> Projects document or in on-line help.<br />

Saving and Loading Macros<br />

In <strong>Build</strong> <strong>Studio</strong> running as a standalone application, to save changes made to your macro, select File |<br />

Save from <strong>Build</strong> <strong>Studio</strong>’s main menu or press Ctrl-S (this shortcut can be changed via the Customize<br />

Keyboard dialog). To save the macro under another name, select File | Save As. In <strong>Build</strong> <strong>Studio</strong> integrated<br />

into Visual <strong>Studio</strong> .NET, you can save changes made to your macro in the same manner as you would save<br />

any other project in Visual <strong>Studio</strong>: select the File | Save menu item or press Ctrl-S. To save<br />

the macro under another name, select File | Save As . <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can save<br />

macros<br />

in one of the following formats:<br />

Format Description<br />

.bbp The <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> project file. Stores data in binary form.<br />

.bxp The <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> project file. Stores data in XML format.<br />

The MS<strong>Build</strong> project files are stored in the XML format and typically have one of the following<br />

extensions: .proj, .msbuild, .targets and .tasks.<br />

Note that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros cannot be saved in the MS<strong>Build</strong> project format and vice versa<br />

(that is, conversion of these files is impossible).<br />

To open a macro or MS<strong>Build</strong><br />

project that you have previously saved, select the File | Recent item in the<br />

main menu of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> (if it is running as a standalone application) or the File | Open |<br />

Project item in Visual <strong>Studio</strong>’s main menu (if <strong>Build</strong> <strong>Studio</strong> is integrated into Visual <strong>Studio</strong>). This will bring<br />

up the standard Open File dialog where you can select the desired file. After you have selected the file,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will replace the currently edited macro or MS<strong>Build</strong> project with that file. To append<br />

an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro from a file to the currently open macro, use File | Append item in the<br />

main menu<br />

of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (if it is running as a standalone application) or the <strong>Build</strong> <strong>Studio</strong> |<br />

Append Macro From item in Visual <strong>Studio</strong>’s main menu (if <strong>Build</strong> <strong>Studio</strong> is integrated<br />

into Visual<br />

<strong>Studio</strong>) ..Operations of the chosen macro will be added to the end of the current macro. Note that you may not<br />

append a macro to the currently<br />

open macro, but run it using the Execute Macro operation.<br />

In addit ion to .bbp and .bxp macro files, and MS<strong>Build</strong> projects, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can also open<br />

.vmp files. The .vmp format is used by Visual Macro <strong>Build</strong>er to store macros (The Visual Macro <strong>Build</strong>er<br />

is<br />

part of AQdevTeam Client – <strong>Automated</strong>QA’s<br />

bug tracking system). .vmp is an obsolete format. If you<br />

command <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to open a .vmp file, it will convert that file to a macro format that is<br />

currently used.<br />

Using Macro Configurations<br />

Often when you make a build or an installation by using <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, you need to create<br />

different versions of the same build (installation): for instance, a debug (checked) version,<br />

a demo version or<br />

a release version. Typically, macros that generate these versions slightly differ from each other: just some<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

47


48<br />

<strong>Getting</strong> <strong>Started</strong><br />

changes in the logic, operation properties and values of constants and stored variables. For example, when<br />

using the Compile<br />

Visual C++ 6.0 Project operation you may want to enable properties that will generate<br />

debug information<br />

and disable all optimizations for the debug version, but turn on all the needed<br />

optimizations<br />

and not generate debug info for the release version. You can create an individual macro to<br />

generate each version independently, but this is not an<br />

efficient approach because in these macros you will<br />

have lots o f identical parts. Of course, you could separate the reusable logic parts into submacros or external<br />

macros. But<br />

in this case, you would still have to manage several macros, which is not convenient either.<br />

Since all of these versions pertain to the same product, it would be reasonable to have a single macro that<br />

would generate all of the versions. However, this macro will inevitably have multiple conditional<br />

branches<br />

that are needed to ensure that your reusable macro parts are utilized as efficiently as possible.<br />

Use of macro configurations allows you to create<br />

a single macro and reuse it multiple times, changing<br />

its nature by simply selecting a different configuration.<br />

A configuration includes the following:<br />

• propert y values of all operations that exist in the macro;<br />

• values of all custom constants and stored variables that are defined in the macro (see Using<br />

Variables and Constants in Macros);<br />

• the Environment attributes of all custom constants and variables (including stored variables)<br />

that are defined in the macro.<br />

Note: The concept of macro configurations is used<br />

for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros. It cannot be<br />

applied to MS<strong>Build</strong> projects.<br />

A configuration (all the settings that are unified by a configuration) is part of a macro. By default, a<br />

macro holds at least one configuration. Each macro can have any number of configurations. Therefore, if a<br />

macro has N configurations, this means that the macro has N sets of operation properties and variable<br />

(constant)<br />

values and attributes. Using multiple configurations lets you have a single logic for all datasets. In<br />

our example with multiple build or installation versions, you can create as many configurations as the<br />

number of versions you want to get while the macro logic and the set of constants and variables will be the<br />

same for all versions. This is like passing different parameters to a function to get different results.<br />

As it was said above, the set of operations and their hierarchy as well as the set of variables and custom<br />

constants in a macro is identical for all configurations. Therefore, if you add an operation to or remove an<br />

operation from the macro in one configuration, this operation will appear or disappear in all the other<br />

configurations as well. Likewise, if you add a variable or a custom constant to or remove it from the macro in<br />

one configuration, this constant (variable) will also appear or disappear in all the other configurations.<br />

Therefore, you can also compare the macro with the class declaration, while each configuration resembles a<br />

class instance: a copy of the class structure populated<br />

with unique data.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Macro Configurations<br />

As a result, you create the operation hierarchy and the set of variables and custom constants only once<br />

and then, using individual configurations, work with data specific to a particular configuration.<br />

Using operation properties you can even change the operation hierarchy to some extent, without adding<br />

or removing operations. How is this possible? You can use the Enabled property to simply switch on or off a<br />

definite operation in the operation flow. For instance, in the Debug configuration you may need a specific<br />

check of assertions, which is not required in the Release configuration; so you can enable the corresponding<br />

operation branch in the Debug configuration and disable it in Release. To see in which configurations the<br />

given operation is enabled, refer to the Enabled in Configurations column that is displayed in the Macro<br />

panel.<br />

If the operation is enabled in all the configurations of the current macro, this column shows .<br />

If you need to set the needed value to a variable in all configurations, you can use either Set\Reset<br />

Variable Value, or Script operation<br />

and enable it in all configurations as described above. For stored<br />

variables, you can set their initial value in all configurations via the Stored Variables dialog.<br />

Alternatively,<br />

you can use the Set\Reset<br />

Variable Value operation that is enabled in at least one configuration and whose<br />

Set Value for All Configurations property is on. This is typically used to change the value of a stored variable<br />

in all<br />

configurations at once.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Standalone<br />

To manage configurations<br />

that belong to the given macro, use the Edit Macro Configurations dialog. To<br />

call it, press the Edit Configurations button on the Configurations toolbar. By default, a newly<br />

created<br />

macro holds one configuration called Release. The dialog lets you create new configurations<br />

as well as<br />

rename and delete existing ones. You cannot delete all the configurations<br />

from the macro; at least one<br />

configuration must always be present in the macro. Each configuration<br />

must have a unique name within the<br />

macro. When adding a new configuration to the m acro (press Add in the<br />

Edit Macro Configurations dialog),<br />

you can copy all of the data of an existing configuration to the new one. This will save you from having to<br />

pop ulating all the necessary properties as well as values and attributes of constants and variables in the new<br />

con figuration if these two configurations do not differ too much. To do this, in the Copy data from box of<br />

the New Configuration dialog, select the desired configuration whose data needs to be copied. If you select<br />

, no properties of the new configuration will be specified or<br />

set to their default values.<br />

All of the configurations that belong to the current macro are displayed in the Select Active<br />

Configuration dropdown list box on the Configurations toolbar.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

49


50<br />

<strong>Getting</strong> <strong>Started</strong><br />

When you select a configuration in this box, you make the chosen configuration the active configuration<br />

in the macro. This means that all of the changes you made in the operation properties will be applied to the<br />

active configuration only. When you save the macro to a file, the active configuration is also saved there. A<br />

similar dropdown list box, Configuration, is available in the Operation Properties, Constants, Variables and<br />

Stored Variables dialogs, in order to let you switch between configurations without leaving the dialog. Note<br />

however that the selection of the active configuration you make in any of these dialogs is temporary; it only<br />

has effect while the dialog is open. In other words, if using the dialog you switch the active configuration,<br />

when closing the dialog the active configuration selection will return to the configuration that was active<br />

before calling the dialog.<br />

If you want to see if the properties of the given operation have different or identical values in different<br />

configurations of the current macro, see if there is a tick in the Different Configuration Settings column<br />

of the<br />

Macro panel. As a result, you can quickly see which of your operations have configuration specific<br />

property values and which operations have the same property values in all the configurations.<br />

The item that is available in the Select Active Configuration or Configuration<br />

box lets you apply changes you made in the operation properties to all the available configurations at once.<br />

For instance, if you want to set the unique name of the operation, which should be the same in all the<br />

configurations, you can enter the desired name directly in the Macro panel grid or using the Operation<br />

Properties dialog. At that, only the properties whose values you are modifying when is<br />

selected will be applied to all configurations; the same concerns values and attributes of constants and<br />

variables.<br />

To illustrate this, imagine that you have the Get Latest Version From VSS operation where the<br />

property that specifies location of the working folder (Working Folder) has different values for the Release<br />

and Debug configurations,<br />

while the other properties (Login, Password, etc.) have the same values in all<br />

configurations.<br />

If you select , change the value of the Login property in this operation<br />

and then revert to a named configuration, only this property will be changed in all configurations. The other<br />

properties will stay untouched. Therefore, the Working Folder property will still have different values in<br />

different configurations.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Integrated Into Visual <strong>Studio</strong> .NET<br />

In Visual <strong>Studio</strong>, there are two types of configurations: project configurations and solution build<br />

configurations. A project configuration is a set of project properties that are specific for a particular build and<br />

possibly platfo rm. Since an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro<br />

is a special case of a Visual <strong>Studio</strong> project, a<br />

macro configuration is a project configuration too. A solution build configuration determines whic h<br />

configurations of the projects that are included in the solution should be used when building the entire<br />

solution. A solution's<br />

build configuration holds only references to configurations of its projects, while<br />

configuration<br />

settings themselves are stored within projects.<br />

To manage configurations that belong to the given macro, use Visual <strong>Studio</strong>'s Configuration Manager<br />

dialog. To call it, select Configuration Manager from the <strong>Build</strong> menu. Alternatively, you can select<br />

Configuration Manager from the Solution Configurations dropdown list box that is displayed on the<br />

Standard toolbar.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Macro Configurations<br />

The Configuration Manager dialog lists all the projects that are included in the current solution. The<br />

Active Solution Configuration dropdown list box displays all the build configurations stored in the<br />

solution. The configuration that is currently selected in<br />

the list is the active build configuration of the given<br />

solution.<br />

This is the configuration that will be used when you build or re-build the solution. You can also<br />

select the active<br />

solution build configuration from the Solution Configurations dropdown list box on the<br />

Standard toolbar.<br />

For each project listed in the Solution Manager dialog, you can specify the active project configuration.<br />

To do this, locate the desired project in the Configuration column, press the down arrow button and in the<br />

resulting dropdown list box select the needed configuration. The active project configuration is the<br />

configuration that will be used when you run or build the project. You can also specify the platform for<br />

which the project should be built and designate whether to build or deploy the project when using the given<br />

solution configuration. For <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros, the active project configuration is the active<br />

macro configuration. This means that all the changes you make in the operation properties will be applied to<br />

the active macro configuration only. The active macro configuration also determines which dataset will be<br />

used in the given macro run. Macros cannot be built, they can only be<br />

run. That's why there is no need to<br />

specify<br />

the target platform for the macro configuration.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

51


52<br />

<strong>Getting</strong> <strong>Started</strong><br />

When y ou save the macro to a file,<br />

the active macro configuration is also saved there. The Operation<br />

Properties, Constants,<br />

Variables and Stored Variables dialogs include the Configuration dropdown list box<br />

which lets you<br />

switch between macro configurations without leaving the dialog. Note however that the<br />

selection of t he active macro configuration you make in any of these dialogs is temporary; it has effect only<br />

while the dialog is open. In other words, if using the dialog you switch the active macro configuration, when<br />

closing<br />

the dialog the active macro configuration selection will return to the macro configuration which was<br />

active before calling the dialog.<br />

If y ou want to learn whether the properties of the given operation has different or identical values in<br />

different configurations<br />

of the current macro, check whether there is a tick in the Different Configuration<br />

Settings column<br />

of the Macro panel. As a result, you can quickly see which of your operations have<br />

configuration<br />

specific property values and which operations have the same property values in all the<br />

configurations.<br />

The item that is available in the Configuration box lets you apply changes you<br />

made in the operation properties to all the available macro configurations at once.<br />

For instance, if you want<br />

to set the unique name of the operation, which should be the same in all the macro configurations, you can<br />

enter the desired name directly in the Macro panel grid or using<br />

the Operation Properties dialog. At that, only<br />

the properties whose<br />

values you are modifying when is selected will be applied to all<br />

macro configurations; the same concerns values and attributes of constants and variables. To illustrate these<br />

words, imagine that you have the Get Latest Version From VSS operation where the property that specifies<br />

location of the working folder (Working Folder) has different values for the Release and Debug<br />

configurations, while the other properties (Login, Password, etc.) have the same values in all macro<br />

configurations. If you select , change the value of the Login property in this operation<br />

and then revert to a named configuration, only this property will be changed in all macro configurations. The<br />

other properties will stay untouched; thus, the Working<br />

Folder property will still have different values in<br />

different macro configurations.<br />

By default,<br />

a newly created solution holds only one solution build configuration whose name is Release.<br />

To create a new solution build configuration, open the Configuration Manager dialog and select <br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Macro Configurations<br />

from the Active Solution Configuration dropdown list box. This will call the New Solution Configuration<br />

dialog, where you can specify the configuration name. In addition,<br />

you can set whether to copy all data of an<br />

existing<br />

solution configuration to the new one. To do this, in the Copy Settings from box of the New<br />

Solution Configuration dialog, select the desired configuration whose data should be copied. If you select<br />

, all properties of the new configuration will be set to their default values. If you enable Also create<br />

new project configuration(s), the new configuration under the same name will become available for all<br />

projects that belong to the given solution. Otherwise, this configuration will be added to the solution only.<br />

To rename or remove an existing solution configuration, select from the Active Solution<br />

Configuration dropdown list box of the Configuration Manager dialog. This will call the Edit Solution<br />

Configurations dialog. In the dialog, select the configuration you want to rename or delete and press the<br />

Rename or Remove button correspondingly. Each configuration must have a unique name within the<br />

solution. You cannot delete all the configurations from the solution; at least one configuration must always<br />

be present in the solution.<br />

By default, a newly created macro holds the only macro configuration whose name is Release. To create<br />

a new macro configuration, open the Configuration Manager dialog, locate the desired macro in the<br />

Configuration column, press the down arrow button and select from the subsequent dropdown list<br />

box.<br />

This will call the New Project Configuration dialog, where you can specify the configuration name. In<br />

addition,<br />

you can set whether to copy all data of an existing macro configuration to the new one. This will<br />

save you<br />

populating all the necessary properties as well as values and attributes of constants and variables in<br />

the new configuration if these two configurations do not differ seriously. To do this, in the Copy Settings<br />

from b ox of the New Project Configuration dialog, select the desired configuration whose data should be<br />

copied. If you select , all properties of the new macro configuration will be not specified or set to<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

53


54<br />

<strong>Getting</strong> <strong>Started</strong><br />

their<br />

default values. If you enable Also create new solution configuration(s), the new configuration under<br />

the same name<br />

will become available for the solution to which the given macro belongs. Otherwise, this<br />

configuration will be added to the macro only.<br />

To rename of remove an existing macro configuration, open the Configuration Manager dialog, locate<br />

the desired macro in the Configuration column, press the down arrow button and select from the<br />

subsequent dropdown list box. This will call the Edit Project Configurations dialog. In the dialog, select<br />

the configuration you want to rename or delete and press the Rename or Remove button correspondingly.<br />

Each configuration must have a unique name within the macro. You cannot delete all the configurations from<br />

the macro; at least one configuration must always be present in the macro.<br />

Running a Macro with the Needed Configuration<br />

When you run the macro or some of its operations, or check the macro, you only run or check the macro<br />

in the active macro configuration. Therefore, if you need to run the macro in another configuration, first<br />

make this configuration active. However, if you have a long list of configurations within a macro, running<br />

them one by one is tedious. As you may recall, the idea of integrating multiple configurations within a macro<br />

implies<br />

that you must have the capability to run the macro in several configurations quickly. Of course, you<br />

can do this in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>: simply select Batch Run from <strong>Build</strong> <strong>Studio</strong>’s Run menu or from<br />

Visual <strong>Studio</strong>’s <strong>Build</strong> <strong>Studio</strong> menu and in the resulting Edit Batch Run dialog designate in which<br />

configurations you want to run the macro.<br />

Among the system constants that <strong>Build</strong> <strong>Studio</strong> adds to the system (see System Constants Dialog in online<br />

help), there are the RUNCONFIGURATIONCOUNT, RUNNINGCONFIGURATIONINDEX and<br />

RUNNINGCONFIGURATIONNAME constants. When running a macro, <strong>Build</strong> <strong>Studio</strong> dynamically changes<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Running Macros<br />

values of these constants. The RUNCONFIGURATIONCOUNT constant will hold the total number of<br />

configurations for which the macro has been run, while the RUNNINGCONFIGURATIONNAME and<br />

RUNNINGCONFIGURATIONINDEX constants will correspondingly hold the name and zero-based index<br />

of the configuration for which<br />

the macro is currently running.<br />

Running Macros<br />

Once you have created a macro, you can run it:<br />

• You can launch a macro at certain points in time by passing the macro name<br />

to <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> via the command line. See Scheduling Macro Runs for more information.<br />

• You can run your macro using the <strong>Automated</strong> Macro Player - a command-line utility<br />

that was<br />

specifically designed for running macros. See Command-Line Arguments.<br />

• You can run your macro right in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (if it is running<br />

as a standalone<br />

application).<br />

• You can run your macro right in Visual <strong>Studio</strong> .NET (if <strong>Build</strong> <strong>Studio</strong> is integrated into it).<br />

This topic describes how to run a macro from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or from Visual <strong>Studio</strong> .NET.<br />

<strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> does not support running and debugging MS<strong>Build</strong> projects. You can<br />

execute<br />

MS<strong>Build</strong> projects from Microsoft Visual <strong>Studio</strong> Team System, or using the MS<strong>Build</strong><br />

operation<br />

from your <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro.<br />

Bef ore running your macro, you may need to specify<br />

the options that affect the whole macro run. To<br />

modify them, selec t File | Properties from the main menu of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (if it is running as a<br />

standalone applicat ion) or right-click the <strong>Build</strong> <strong>Studio</strong> project node in the Solution Explorer and select<br />

Properties from the context menu (if <strong>Build</strong> <strong>Studio</strong> is integrated into Visual <strong>Studio</strong>). This will open the<br />

Macro Properties dialog.<br />

The options are on the General tabbed page of the dialog:<br />

• Common Timeout - Specifies the timeout (in seconds, minutes or hours) for operations that run<br />

external applications. An example of such operations is Execute Program, Pack Files with<br />

WinRA R or Compile Microsoft Visual C++<br />

6.0. If an operation is executed longer than the<br />

specified timeout, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will close the application, which that operation<br />

launched, and stop the macro execution.<br />

• Run submacro if macro fails - Specifies a submacro<br />

that runs if an error occurs during the macro<br />

execution.<br />

For more information on these options, see Macro Properties Dialog in on-line help.<br />

You can run your macro in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or in Visual <strong>Studio</strong> in one of the following manners:<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> standalone:<br />

• Press Run on the Standard toolbar.<br />

• Select Run from the Run menu.<br />

• Right-click within the Macro panel and select Run from the context menu.<br />

• Press F5 (the shortcut for running macros can be changed via the<br />

Customize Keyboard dialog).<br />

•<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrated into Visual <strong>Studio</strong> .NET:<br />

Press Run on the Macro panel toolbar.<br />

• Select Run from the <strong>Build</strong> <strong>Studio</strong> menu.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

55


56<br />

<strong>Getting</strong> <strong>Started</strong><br />

After that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will start executing the macro. Note that it will execute only those<br />

operations that are checked<br />

in the Macro panel. Unchecked operations will not be executed. If you uncheck a<br />

parent operation, its child operations will<br />

not be executed either.<br />

If the Highligh t Operation option of the Macro panel is enabled, the operation that is being executed at<br />

that moment will be selected in the Macro panel.<br />

Sometimes yo u may want to run only a part of macro rather that the whole macro. This may be useful,<br />

for instance, for testing<br />

or debugging purposes.<br />

To run your macro from the selected operatio n to the end of the macro, select Run From Selected<br />

from the context menu of the Macro panel, from <strong>Build</strong> <strong>Studio</strong>’s<br />

Run menu or from Visual <strong>Studio</strong>’s Macro<br />

panel<br />

toolbar, or press Ctrl-F5 (this shortcut can be changed with the Customize Keyboard dialog). We<br />

would like to note once again, that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will run only checked operations. Unchecked<br />

operations will be skipped. If the selected operation has a parent operation, you can run the macro only if the<br />

parent is either a Group or If … Then operation.<br />

You can also ru n only the operation currently selected in the Macro panel: choose Run Selected<br />

Op eration from the context menu, from <strong>Build</strong> <strong>Studio</strong>’s Run menu or from Visual <strong>Studio</strong>’s Macro panel<br />

tool bar, or press Alt-F5 (this shortcut can be changed with the Customize Keyboard dialog). If in addition to<br />

the selected operation itself, you also would like to run its checked child operations, press Shift-F5 or choose<br />

Run Selected Operation with Children from the context menu, from <strong>Build</strong> <strong>Studio</strong>’s Run menu or from<br />

Visual <strong>Studio</strong>’s Macro panel toolbar. Note that these commands will execute the selected operation even if it<br />

is unchecked.<br />

You can also run the selected operation using the Run Selected Operation and Run Selected<br />

Operation with Children items on the toolbar<br />

at the top of the Operation Properties dialog.<br />

Note:<br />

Note that if you run a macro or its operations, they will use the data of the active configuration<br />

only. To run the<br />

macro or its operations in a different configuration, you should switch to that<br />

configuration<br />

first. To run the macro in several configurations, select Batch Run from<br />

<strong>Build</strong> <strong>Studio</strong>’ s Run menu or Visual <strong>Studio</strong>’s <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar or <strong>Build</strong> <strong>Studio</strong><br />

menu, and in the subsequent Edit<br />

Batch Run dialog, select the configurations that should be<br />

used during the run. See Using Macro<br />

Configurations.<br />

To pause the macro execution, select Pause from <strong>Build</strong> <strong>Studio</strong>’s Standard toolbar or Run menu or<br />

from Visual <strong>Studio</strong>’s Macro panel toolbar or <strong>Build</strong> <strong>Studio</strong> menu. Pressing Stop will stop the macro<br />

execution. If you stop the macro run by pressing this button, the Summary panel "assumes" that the run is<br />

successful.<br />

You can stop execution from the macro. To do this either use the Stop Macro Execution operation or<br />

call the ABSUtils.AbortMacroExecution function in a script.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> logs each macro run and displays the results in the Log and Summary panels.<br />

For more information on this, see Logging Macro Runs.<br />

Logging Macro Runs<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> generates full-detail logs of macro runs. These logs help you isolate the errors<br />

that might arise during the macro execution.<br />

Note: The logging concept is only used for macros.<br />

It does not work for MS<strong>Build</strong> projects since these<br />

projects cannot be launched from within <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>’s IDE.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Analyzing Results of Macro Runs<br />

By default, when <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is executing a macro, it shows the name of each operation<br />

being executed in the Log panel. If an operation has child operations, they are logged as child nodes of their<br />

parent operation’s node. If an operation fails to execute, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will log information<br />

about<br />

the error that has occurred.<br />

You can disable the default logging,<br />

by adding the Disable Logging operation to your macro. A macro<br />

will not post messages to the log after it executed this operation. To enable the logging, use the Enable<br />

Logging operation. Note that error messages are posted to the Log<br />

panel even if the logging is disabled.<br />

You can post your custom messages to the log. To do this, use the Log Message operation. The<br />

operation’s properties let you specify what kind of message you would like to post: error, warning or an<br />

informativ e message (default).<br />

You can also post messages from the scripts. To do this, use methods of the Log object:<br />

[VBScript] Log.Message "Message text" ' Posts an informative message<br />

Log. Warning "Warning text" ' Posts a warning<br />

Log.Error "Error text" ' Posts an error<br />

[JScript]<br />

Log.Message("Message text"); // Posts an informative message<br />

Log.Warning("Warning text"); // Posts a warning<br />

Log.Error("Error text"); // Posts an error<br />

[DelphiScript]<br />

Log.Message('Message text'); // Posts an informative message<br />

Log.Warning('Warning text'); // Posts a warning<br />

Log.Error('Error text'); // Posts an error<br />

To save the currently displayed log to a text, HTML or XML<br />

file, select Export from the context menu<br />

and specify the name, location and format of the resulting file.<br />

<strong>Build</strong> <strong>Studio</strong> can also post messages about execution of particular operations to the Summary panel:<br />

simply enable the Log to summary property for all the operations you want to trace. The panel is used to<br />

compare logs. For this purpose, it displays the logs of two macro runs (the current run and the<br />

previous run<br />

during which the macro didn’t fail) and displays the differences between the two logs. In addition, this panel<br />

always log s all the errors and warnings that occur during the macro run. This lets you<br />

quickly find the cause<br />

of the problem. You ca n save the contents of the Summary<br />

panel to an HTML file like you do this in the Log panel. For<br />

this purpo se , select Export from the context menu or from the Summary panel’s toolbar and specify the<br />

nam e and location of the resulting file. You can also configure whether the file will include the log of the<br />

current run with or without the log of the previous successful run.<br />

Analyzing Results of Macro Runs<br />

When you run a macro in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, the results of the macro run are shown in the Log<br />

panel at runtime and after the run is over.<br />

The Number of recent logs to keep option determines how many logs<br />

of the recent macro runs (including<br />

the latest one) the Log panel stores. These logs are displayed in the Recent Logs list, which is displayed<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

57


58<br />

<strong>Getting</strong> <strong>Started</strong><br />

when the Show History button is pressed on the Log toolbar the Log panel toolbar. Once the Recent<br />

Logs list is displayed, you can switch between different logs. To load the contents of the focused log to the<br />

panel, select Load from the context menu, or simply double-click the log. Other items of the context menu<br />

let you rename the focused log (Rename), delete the selected logs (Remove) as well as remove all the logs at<br />

once (the Clear menu item). If you hide the Recent Logs list, the Log panel will display the log you have<br />

loaded last.<br />

You can save the currently displayed log to a text, HTML or XML file. To do this, select Export from<br />

the context menu and in the resulting dialog specify where to save the export file, under what name and in<br />

which format.<br />

By default, the Log panel shows all messages<br />

that were posted to the log during the given run. To view<br />

only messages of certain categories, use the Message Filter dialog. To call it, select Message Filter from<br />

the context menu or from the Log toolbar the Log panel toolbar.<br />

Using the Log Navigation toolbar<br />

the Log panel toolbar you can quickly locate messages of a particular<br />

type in the Log panel. This can be useful when the macro is complex and its log is extremely large. To do<br />

this, first select the desired type of messages in the Select Message<br />

dropdown list box on the toolbar (you<br />

can select among errors, warnings, informative messages or messages from operations of a particular type).<br />

Then, using<br />

the Go to First Message, Go to Previous Message, Go to Next Message and<br />

Go to Last Message buttons on the toolbar, navigate through messages of the chosen type until you find the<br />

message you<br />

need.<br />

Instead of investigating the contents of one log in the Log panel you can use a different approach when<br />

analyzing macro<br />

runs. To do this, switch to the Summary panel which displays logs on two different runs at<br />

the same time.<br />

The first run is the current run where the macro might fail or an operation might be executed<br />

with an error<br />

or warning. The second run displayed is the previous run of the same macro where there were<br />

no failures. <strong>Build</strong> <strong>Studio</strong> automatically compares the contents of the two logs and highlights the differences<br />

between them<br />

in the Summary panel. This lets you quickly find out why something went wrong in the macro.<br />

<strong>Getting</strong> <strong>Started</strong> – Further Steps<br />

Sending Notifications<br />

In an automated build environment, it is essential that the development team is continuously informed<br />

about the builds’<br />

status. This helps to ensure that the problems, if any, are fixed as soon as possible. For<br />

example,<br />

when developers are notified of broken builds immediately, it takes them less time and effort to fix<br />

the broken code.<br />

There are<br />

two ways to enable build notifications:<br />

•<br />

•<br />

Configure the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server so that it notifies the users each time the build<br />

status is changed. You can enable notifications for individual macros, and specify who, how and<br />

which events should have a notification. This approach is discussed in the Automatic <strong>Build</strong><br />

Notifications topic.<br />

– or –<br />

Include notification operations directly in your build macros. In certain cases this approach may<br />

be more convenient<br />

than using server notifications, because it lets you customize the notification<br />

text. The rest of this topic explains how this approach can be implemented.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Getting</strong> <strong>Started</strong> – Further Steps<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes the following operations to inform the users about the build state:<br />

• Send E-mail - Sends an e-mail message to one or several recipients.<br />

• Send Message via ICQ - Sends an instant message to one or several ICQ users.<br />

• Send Message via Windows Messenger - Sends an instant message to one or several Windows<br />

Messenger, MSN Messenger or Windows Live Messenger users.<br />

• Send News Message - Posts a message to an NNTP newsgroup.<br />

In addition, <strong>Build</strong> <strong>Studio</strong> includes the Execute DOS Command and Execute Program operations that can<br />

run external programs, which allows you to use custom notification tools as well. For example, you can use<br />

the Execute Program operation to notify the users via net send:<br />

You can insert notification operations in the appropriate places of your build macros - in the beginning,<br />

the end or into a group or submacro that runs when build errors occur.<br />

Note, that it is possible to attach macro execution logs to your e-mail or news messages in order to make<br />

notifications more informative. These logs are especially useful in build breakage notifications, because they<br />

can help the developers quickly identify the cause of errors. To attach a log to the e-mail (or news) message:<br />

• Save the execution log to a file using the Export Log or Export Errors From Log operation. To<br />

save the contents of the Summary panel to a file, use the Export Summary operation.<br />

• Set up properties of the Send E-mail (or Send News Message) operation, so that the log file is<br />

attached to the e-mail (news) message.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes a sample macro that demonstrates how you can send notification<br />

messages:<br />

< <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>>\Samples\Macros\Notifications\Notifications.bxp<br />

Another<br />

sample demonstrates how you can generate an RSS feed containing build log summaries, so that<br />

the users can<br />

be notified on the build status via their RSS readers:<br />

< <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>>\Samples\Macros\RSS\ABS_RSS_Demo.bxp<br />

Exporting<br />

Results of Macro Runs<br />

After running a macro, you can export the macro run results to a file. You can export<br />

the contents of both<br />

Log or Summary panels. To do this:<br />

•<br />

•<br />

Open the Log or Summary panel.<br />

Right-click somewhere within the panel and choose Export from the context menu.<br />

• In the ensuing Save File dialog, specify the file's location and name.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

59


60<br />

<strong>Getting</strong> <strong>Started</strong><br />

• If you export the contents of the Summary<br />

panel, the dialog also let you specify whether<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> should export results of the last run or results of the last run along with<br />

results of the last successful run.<br />

• After you specified the file name, location and export type, press Save. Built <strong>Studio</strong> will save<br />

results to the specified file.<br />

Note: Contents of the Log panel can be exported to a TXT, HTML or XML file. Contents of the<br />

Summary panel can be exported to an HTML file only.<br />

You can also export the log and summary data during the macro run. To do this, use the Export Log,<br />

Export Errors from Log and Export Summary operations.<br />

• The Export Log and Export Errors from Log operations save the contents of the Log panel to<br />

a file or variable specified by the operations' Export to property. The difference between these<br />

operations is that Export Log stores all messages posted to the log along with their execution<br />

time, while Export Errors From Log only stores information about<br />

errors. Both operations<br />

export only those messages that were posted before these operations are executed. You can<br />

export either the entire log or part of the log. Exporting the entire log does not need special<br />

preparation. If you want to export part of the log, follow these steps:<br />

Mark the part of the log you want to export by adding the Set Log Marker operation before<br />

and after the desired operations in the macro.<br />

Open the Operation Properties dialog for the Export Log (or Export Errors From Log)<br />

operation and specify the names of the marker operations in the From position and To<br />

position properties of the Export Log (or Export Errors From Log) operation. By<br />

default,<br />

these properties are empty and the operation will export the entire log.<br />

If your macro sets the same marker several times (this is possible,<br />

if you set the marker in a<br />

loop or execute the Set Log Marker operation from a script), <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will<br />

use the last marker for the export.<br />

• The Export Summary operation saves the contents of the Summary panel to a variable or a file<br />

specified by the operation's Export to operation property. Using the operation's Mode property<br />

you can specify whether <strong>Build</strong> <strong>Studio</strong> should export the summary of the current run with or<br />

without the summary of the last successful run.<br />

All three operations can save results to the file or variable. After you save the log or summary contents,<br />

you can, for example, include them into a notification message sent by your macro: to do this, include the<br />

variable in the message body or attach the file to the message (see Sending Notifications).<br />

Handling Errors in Macros<br />

During the macro run an error may occur. For instance, the Script operation may fail to execute<br />

successfully because<br />

of an error in the script, or the Copy File(s) operation may fail because of an invalid file<br />

path specifi ed in operation properties.<br />

The way<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> processes errors during the macro run depends on the properties of the<br />

macro operations and whether the macro contains error-handling operations. This topic describes how<br />

<strong>Automated</strong> Buil d <strong>Studio</strong> handles errors by default and explains how you can handle errors in a custom way:<br />

Common Error-Handling Mechanism<br />

If an error occurs d uring the macro run, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> posts an error message to the Log<br />

panel. Errors are posted to the log automatically. They are posted even if the logging was disabled by the<br />

Disable Logging operation.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Getting</strong> <strong>Started</strong> – Further Steps<br />

If an error occurs i n a child operation, <strong>Build</strong> <strong>Studio</strong> “thinks” that the parent operations also failed to<br />

execute successfully and posts an error message for the parent operations too. Then it walks up the operation<br />

tree and posts an error message<br />

for the grandparent operation, great-grandparent, etc. until it reaches the top-<br />

level operation.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> continues or stops running the macro according to the state of the Stop<br />

execution if<br />

operation fails property of the operation that failed (This is a common property that each<br />

operation co ntains. You can modify it on the Properties page of the Operation Properties dialog).<br />

Note:<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> handles errors in the following way:<br />

1. It checks<br />

the value of the Stop execution if operation fails property of the current operation:<br />

•<br />

If you use an error-handling sub-macro (see below), it will be run before <strong>Build</strong> <strong>Studio</strong><br />

analyzes the Stop execution if operation fails property.<br />

• If this property is enabled, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> reports that the current operation failed to<br />

execute correctly. Then it returns control to the parent operation of the current operation (step 2).<br />

If the property is disabled, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> reports that the current operation failed to<br />

execute successfully and then continues running the macro: it starts executing the next operation<br />

in the operation<br />

tree.<br />

2. Automate d <strong>Build</strong><br />

<strong>Studio</strong> checks the value of the Stop execution… property of the parent operation.<br />

• If the p roperty is enabled, <strong>Build</strong> <strong>Studio</strong> reports that the parent operation failed to execute<br />

correctly and control goes up to the parent operation of the current parent operation (step 3).<br />

• If the property is disabled, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> reports that the current operation failed and<br />

switches to the operation that follows the current parent operation in the operation tree.<br />

3. The process continues until <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> reaches the<br />

top-level operation. If the Stop<br />

execution if operation fails property of this top-level operation is enabled, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

stops macro execution. Otherwise, it continues running the macro: it starts executing the operation<br />

that follows the top-level operation in your macro.<br />

The following is an example for the described behavior. Suppose you have the following hierarchy of<br />

operations:<br />

If the Delete File(s) operation fails, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will post an error message to the log and<br />

then it will switch to the If … Then operation.<br />

Since the Stop execution if operation fails property of this operation is on, <strong>Build</strong> <strong>Studio</strong> will also report<br />

that the If … Then operation failed and will switch control to the For Loop operation.<br />

The Stop execution if operation fails property of the For Loop operation is disabled, so <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> will post a message to the log reporting that this operation failed to execute correctly and then will<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

61


62<br />

<strong>Getting</strong> <strong>Started</strong><br />

continue running the macro: it will start executing the operation that follows For Loop in the operation tree<br />

(in our example, this is the second Log Message operation).<br />

Checking if Previous Operations Succeed<br />

or Fail<br />

If an error occurred and the macro<br />

was not stopped, <strong>Build</strong> <strong>Studio</strong> runs other operations of the macro in<br />

the usual order. However, if these operations depend on the operation that failed (for instance,<br />

if they use<br />

data output of that operation) they may fail to execute successfully themselves.<br />

To see if the previous operation was executed successfully, use the If Previous Operation Fails or If<br />

Previous Operation Succeeds operation.<br />

It checks the result of the previous operation and if that operation<br />

failed, it executes child operations. These child operations may perform various finalization actions and send<br />

a notification about the error to the macro developer via e-mail. You can also perform finalization actions<br />

and send a notification from an error-handling sub-macro<br />

(see below).<br />

Using Try...Catch...Finally Blocks<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes the Try, Catch and Finally operations that let you organize exception<br />

handling blocks similar to the try...catch...finally blocks in C++ or Visual Basic code. Operations<br />

that can potentially produce an error should be placed under the Try operation. The Catch operation is used<br />

to specify operations that handle errors that can occur in the Try block. For example, the Catch block can<br />

contain operations that send notifications about an error to developers. The Finally operation is executed<br />

regardless of whether an error occurs within the Try block or not. Under the Finally operation, you would<br />

usually place clean-up operations, for example, operations that close a connection to an FTP server or<br />

remove temporary folders.<br />

The Try operation must be followed by the Catch or Finally (or both) operations on the same level. This<br />

means that the following combinations are possible: Try...Catch, Try...Finally and Try...Catch...Finally. If a<br />

child operation of the Try operation raises an error, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> posts an error message to the log<br />

and proceeds to the next sibling of the Try operation (it can be either Catch or Finally). If the macro does not<br />

contain the Catch operation, further error processing depends on the Stop execution<br />

if operation fails<br />

property value of the Try operation (see the previous section).<br />

Note:<br />

If an operation that has raised an error uses an error-handling sub-macro (see below), it is<br />

run before<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> executes the Catch or Finally operations.<br />

The image below demonstrates an example of using the Try, Catch and Finally operations in macros:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Getting</strong> <strong>Started</strong> – Further Steps<br />

The execution flow of this macro depends on whether the operations under the Try operation execute<br />

successfully or not:<br />

• If all child operations of the Try operation succeed, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> skips the Catch<br />

operation and proceeds to the Finally operation. That is, it will execute the Remove Directory<br />

operation.<br />

• If a child operation of Try raises an error:<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> posts an error to the log and reports that the Try operation failed<br />

to execute correctly.<br />

Then the control goes to the Catch operation and its child Export Errors From Log and<br />

Send E-mail operations.<br />

After the Catch operation children have been executed, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

proceeds to the Finally operation.<br />

It is also possible to create nested Try...Catch...Finally blocks, so that you<br />

can organize sophisticated<br />

multi-level handling<br />

of exceptions in your macros. If a nested Try operation does not have a Catch operation,<br />

the error will be handled in an upper-level Catch block.<br />

Running Sub-macros on Errors<br />

Each operation contains properties that specify submacros to be executed when an error occurs. These<br />

submacros can, for example, export<br />

errors or the whole log to a file and send this file with a notification to a<br />

develop<br />

er via<br />

e-mail.<br />

You can either specify an error-handling submacro for each operation, or use one error-handling<br />

submacro common<br />

for all operations:<br />

• To specify an error-handling submacro for a single operation:<br />

Right-click that operation in the Macro panel and select Properties from the context<br />

menu. This will call the Operation Properties dialog.<br />

Switch to the Properties page, enable the Selected submacro option and specify the<br />

unique name<br />

of the desired submacro in the appropriate box.<br />

• To specify a common error-handling submacro:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

63


64<br />

<strong>Getting</strong> <strong>Started</strong><br />

Select File | Macro Properties from <strong>Build</strong> <strong>Studio</strong>’s main menu or select <strong>Build</strong> <strong>Studio</strong> |<br />

Options | Properties from Visual <strong>Studio</strong>’s main menu. This will call the Macro<br />

Properties dialog.<br />

Switch to the General page, enable the Run submacro if fails option and specify the<br />

unique name of the desired submacro in the appropriate edit box.<br />

Then open the Operation Properties dialog for the desired operation, switch to the<br />

Properties page and enable the Global submacro option.<br />

Simulating<br />

Errors During Macro Runs<br />

To check<br />

if the error-handling operations function properly (for example, for debugging purposes), you<br />

may need to simulate an error in your macro. You<br />

can do this by submitting invalid parameters for the<br />

operation. For<br />

instance, you can specify a non-existing file name to the Execute Program operation. To make<br />

the Script operation<br />

fail, you can throw an exception within the script code (see the example below).<br />

[VBScript]<br />

Sub Main<br />

E rr. Description = "Error description"<br />

Err.Raise -1<br />

End Sub<br />

[JScript]<br />

function Main()<br />

{<br />

throw "Error description";<br />

}<br />

[DelphiScript]<br />

procedure Main;<br />

begin<br />

raise('Error description');<br />

end;<br />

You can<br />

also simulate failing a macro by using the Stop Macro Execution operation or by calling the<br />

ABSUtils.AbortMacroExecution function from a script. Note however, that since both approaches will<br />

cause unconditional<br />

macro termination, the error-handling operations as well as the Finalization operation<br />

will not will not<br />

be executed.<br />

Specifying Timeout for Operations<br />

Operati ons that run programs (e.g. Execute Program) and operations that use third-party applications<br />

(e.g. Extract Public Key) have the Timeout property. The purpose of this property<br />

is to close the application<br />

that has been launches by an operation if that application executes too long<br />

and is probably frozen. If the<br />

applicat ion is closed due to the timeout, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> “thinks” that the operation failed to execute<br />

successfully and processes the error as it is specified by the operation properties (see above). An exception<br />

are operations of the Interactive category - <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> counts them as successfully executed<br />

even if they are terminated after a timeout.<br />

You can specify a timeout for every single operation that has the Timeout property or use the timeout<br />

common for<br />

all operations.<br />

To specify<br />

the timeout for a single operation:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Getting</strong> <strong>Started</strong> – Further Steps<br />

• Right-click that operation in the Macro panel and select Properties from context menu. This will<br />

call the Operation Properties dialog.<br />

• Switch to the Properties page and choose the Set timeout for this operation option.<br />

• Specify the timeout value in the appropriate edit box and choose the timeout unit - seconds,<br />

minutes or hours.<br />

To specify the timeout<br />

common for all macro operations:<br />

• Select File | Macro Properties from <strong>Build</strong> <strong>Studio</strong>’s main menu or select <strong>Build</strong> <strong>Studio</strong> | Options<br />

| Properties from Visual <strong>Studio</strong>’s main menu. This will call the Macro Properties dialog.<br />

•<br />

•<br />

Select <strong>Build</strong> <strong>Studio</strong> | Options | Properties from the main menu of Visual <strong>Studio</strong>. This will call<br />

the Macro Properties dialog.<br />

Switch to the General page, specify the desired timeout value in the Common timeout box and<br />

choose<br />

the timeout unit - seconds, minutes or hours.<br />

• Then<br />

call the Operation Properties dialog for each desired operation, switch to the Properties<br />

page and enable the Use common timeout option.<br />

Exporting Error Logs<br />

When a macro<br />

run fails, you may want to notify co-workers about this. To make the notification message<br />

more informative,<br />

you can attach an error log to it. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes two operations, Export<br />

Errors From Log and Export Log, that<br />

can save the log to a file or to a variable. The difference between<br />

these variables is that the first operation saves only error messages while the second saves the whole log.<br />

Another operation,<br />

Export Summary, can save the two logs displayed in the Summary panel to a file. After<br />

you save the log<br />

you can attach the resultant file to a message or use the resultant variable to form the<br />

message body. To<br />

send a message, use the Send E-mail operation.<br />

Sample macros<br />

that are shipped with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> demonstrate how you can handle errors in<br />

the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> macros.<br />

Incrementing the <strong>Build</strong> Version Number<br />

The key point of incrementing the build version number of your product is to keep the current number<br />

somewhere and to get the version number of the previous build during each successive build session. In<br />

general, the process of incrementing the build version number consists of the following steps:<br />

• Loading the version number into a macro variable.<br />

• Specifying the version number<br />

for project modules.<br />

• Incrementing the version number stored in the variable.<br />

• Saving the new version number.<br />

The sections below<br />

provide detailed information on implementing each step in your build macro.<br />

Choosing the Version Number Source<br />

We recommend that you keep the current version number in an external file. This can be a sample<br />

INI<br />

file, or a te xt file, in which individual parts of the version number are separated with commas or new line<br />

(CRLF)<br />

characters. At run time, you can read the version number from the file into a macro variable.<br />

Alternatively, you can read each version number part (major version number, minor version number, release<br />

version and build version) into an individual variable. To read the text file contents, you can use the Read<br />

From File operation, to read INI files - the Get INI Value operation.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

65


66<br />

<strong>Getting</strong> <strong>Started</strong><br />

Alternatively, you can store your build version number in one or several stored variables (these variables<br />

preserve their current values after the macro run). However, this approach is not as safe because if your<br />

macro resets the value of the stored variable somehow, you will lose your version number. To create a stored<br />

variable in a macro, select Variables | Stored Variables from the main menu of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

(if<br />

it is running as a standalone application) or <strong>Build</strong> <strong>Studio</strong> | Variables | Stored Variables from<br />

Visual<br />

<strong>Studio</strong>’ s main menu (if <strong>Build</strong> <strong>Studio</strong> is integrated into Microsoft Visual <strong>Studio</strong>) and use<br />

the resulting Stored<br />

Variables<br />

dialog. You can set the initial value of the stored variable directly in the dialog. In macros, you can<br />

work with stored<br />

variables like you would with global macro variables.<br />

Specifying Product <strong>Build</strong> Version<br />

There are two ways to specify the version number<br />

for the project being built - you can either modify the<br />

project properties before compilation, or you can set the version number for each<br />

built module after<br />

compilatio n. The former approach is compiler-specific (see below). The latter approach<br />

is universal and does<br />

not dep end on the compiler used.<br />

Specifying Version Number in Project Properties<br />

The place<br />

where the current build version number is stored within the project you are building depends<br />

on the compiler<br />

you use:<br />

• In Delphi and C++<strong>Build</strong>er projects, the version number is part of project options. You can<br />

separately set the module version and file version as well as the product version. To set the<br />

needed version number in your macro, you<br />

can use the Module version number, FileVersion or<br />

ProductVersion property that resides on the Version Info property page of the Operation<br />

Properties dialog called for the corresponding Compile operation. For instance, if you have the<br />

VER_MAJOR, VER_MINOR, VER_RELEASE and VER_BUILD variables that hold the corresponding<br />

version number parts, you can set the<br />

%VER_MAJOR%, %VER_MINOR%, %VER_RELEASE% and<br />

%VER_BUILD% values to the Major version, Minor version, Release and <strong>Build</strong> properties<br />

correspondingly (they are parts of the Module version number property). See the sample macro<br />

\Samples\Macros\CompileDelphiProject\CompileDelphiProject.bxp.<br />

•<br />

In Visual Basic 6.0 projects, the version number is also part of the project properties. To set the<br />

version number in your macro, use the Version Number property on the Make property page of<br />

the Operation Properties dialog called for the Compile Visual Basic 6.0 Project operation.<br />

This<br />

property includes three subproperties used to keep individual parts of the version number<br />

(Major, Minor and Revision). You can populate them using the way described above.<br />

Note, that you can also get and set the version-related properties of the Compile operations via script (see<br />

Working <strong>With</strong> Operations In Scripts).<br />

• In Visual C++ 6.0 projects, as well as in .NET-connected projects, the version number is kept in<br />

a resource file that is part of the project. To learn how to generate such a file, see the sample<br />

macro --<br />

\Samples\Macros\CompileCPPProject\CompileCPPProject.bxp.<br />

In short, the technique is as follows. If you have the VER_MAJOR, VER_MINOR, VER_RELEASE<br />

and VER_BUILD variables that hold the corresponding<br />

version number parts, you can post the<br />

#define directives that define constants with the names and values of these variables to a text<br />

file. Next, you can concatenate these constants into the integrated version number of the file or<br />

of the product. Finally, you can specify an appropriate version number constant<br />

in the project’s<br />

resource file.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Getting</strong> <strong>Started</strong> – Further Steps<br />

Usi ng the Set File Version Operation<br />

An alternative way to specify the build version number<br />

is to use the Set File Version Info operation after<br />

the Compile operation. This way, you can set the version number for one or multiple built modules right after<br />

compilation, without modifying project settings. You can specify the module version and product version<br />

separately:<br />

to set the module version use the Major File Version, Minor File Version, File <strong>Build</strong> and File<br />

Revision, File Version keys; to set the product version - the Major Product Version, Minor Product Version,<br />

Product <strong>Build</strong>, Product Revision and Product<br />

Version keys. To specify the value for a key, check this key in<br />

the list and enter the desired value in the Value field. For example, if you have the VER_MAJOR, VER_MINOR,<br />

VER_BUILD and VER_REVISION variables that hold the corresponding version number parts, you can set the<br />

%VER_MAJOR%, %VER_MINOR%, %VE R_BUILD% and %VER_REVISION% values to the Major File Version,<br />

Minor File Version, File<br />

<strong>Build</strong> and File Revision keys and the<br />

%VER_MAJOR%.%VER_MINOR%.%VER_BUILD%.%VER_REVISION% value to the File Version key.<br />

If you need to modify the version information for multiple files (for example, all product modules), you<br />

can use the File Enumerator operation to iterate through the desired files and execute the Set File Version<br />

Info operation on each of them.<br />

Incrementing the Version Number<br />

Value<br />

After setting the product build version,<br />

your macro should increment values of variables that hold<br />

version number parts. For this purpose,<br />

you can use the Script or Set/Reset Variable Value operation.<br />

Saving the Version Number<br />

I f you store the version number in an external file, then after modifying the version number you should<br />

write it to that file. For example, you can write to a text file using the Write to File operation,<br />

or modify the<br />

INI file contents using the Set INI Value<br />

operation.<br />

If you use stored variables, you do not need to perform any additional actions - the values of these<br />

variables are automatically saved between<br />

macro runs. Note that if the Store values in separate file option in<br />

the Stored Variables dialog is unchecked, values of stored variables are kept in the macro file, so you should<br />

save the macro after its execution is finished, otherwise changes made to the stored variables will be lost.<br />

Scheduling Macro Runs<br />

Once you have created a macro and verified its functions properly, you can<br />

use it in your work. One of<br />

the common tasks for macros is running<br />

at certain point in time, for example, every day at 8:00 p.m. You can<br />

perform this task in any of the following<br />

ways:<br />

• You can run <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> using any scheduling program and pass the appropriate<br />

command-line arguments to it (see Command-Line Arguments). For instance, you can run<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

using<br />

Windows Scheduling Tasks.<br />

• You can schedule macro<br />

runs on local or network computers using the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Service. <strong>With</strong> the Edit Tasks dialog, you can configure tasks that this service will perform. Each<br />

task runs a macro. A task can<br />

be triggered at the specified time or by an event like changing files<br />

of a project in a Visual SourceSafe<br />

repository. The latter lets you implement the continuous<br />

integration strategy in your<br />

projects. See Continuous Integration Support.<br />

• You can schedule macro runs<br />

using the built-in Task Scheduler of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. This<br />

Task Scheduler is similar to the Windows Scheduling Tasks component, but offers an extra<br />

useful feature: it lets you schedule macro runs on other computers in the local network.<br />

Note: The Task Scheduler uses the Windows Scheduling Tasks component.<br />

Therefore,<br />

to use the Task Scheduler, you must have that component of the operating system<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

67


68<br />

installed on your<br />

computer.<br />

<strong>Getting</strong> <strong>Started</strong><br />

The rest of this topic explains how you can schedule macro runs using the<br />

built-in Task Scheduler. But<br />

before we describe how to do this, we would like to note that you can run your macros using either<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or <strong>Automated</strong> Macro Player. The <strong>Automated</strong> Macro Player<br />

is a small commandline<br />

resource-friendly utility that was<br />

specifically designed for running macros. It uses the same commandline<br />

arguments as <strong>Build</strong> <strong>Studio</strong> does.<br />

Since the Macro Player has no visual user interface, it requires less<br />

memory<br />

for running and executes macros faster.<br />

However, <strong>Build</strong> <strong>Studio</strong> may be more convenient for analysis<br />

of macro<br />

execution results: suppose that<br />

an error (or a warning) occurred during the execution of your macro.<br />

If th e macro was executed in <strong>Build</strong> <strong>Studio</strong>, you can use <strong>Build</strong> <strong>Studio</strong>’s Log or Summary panel to find the<br />

cause of the problem. The Macro Player<br />

does not have these panels, so if your macro was executed by the<br />

Macro Player and if you wanted to obtain a log in case of an error, you should add some operations to the<br />

macro that will handle the error and export<br />

the log to a file. Later, you'll be able to analyze this file to find<br />

the cause of the problem. Therefore, at first, you may use <strong>Build</strong> <strong>Studio</strong> to run your macro and after you make<br />

certain that the macro works properly, you can start using the Macro Player.<br />

To schedule a macro run using the built-in Task Scheduler, follow these steps:<br />

• To schedule macro runs, <strong>Automated</strong><br />

<strong>Build</strong><br />

<strong>Studio</strong> needs to know the macro file name. Therefore,<br />

before scheduling macro runs, you should save your macro to a file. See Saving and<br />

Loading<br />

Macros for more information on how to do this. Unsaved macros cannot be scheduled.<br />

• If <strong>Build</strong> S tudio is running as a standalone application, select Tasks (Windows Scheduler)<br />

from the Tasks toolbar of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to call the Task Scheduler dialog.<br />

• If <strong>Build</strong> <strong>Studio</strong> is integrated into Visual <strong>Studio</strong> .NET, Select <strong>Build</strong> <strong>Studio</strong> | Tasks (Windows<br />

Scheduler) from the main menu of Visual <strong>Studio</strong> to call the Task Scheduler dialog.<br />

• (Optional) By default, the Task Scheduler dialog lists all the tasks that have been created on your<br />

computer (the computer name is shown in the dialog caption).<br />

Before you create a new task, select the computer where the task will run. Note that selecting the<br />

computer is optional and if you are going to run the task on your computer, you can skip this<br />

step.<br />

To select the computer:<br />

Press the Connect To button in the Task Scheduler dialog. This will open the standard<br />

Browse for Computer dialog where you can select the desired computer.<br />

After you have selected the computer, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will display the name of the<br />

selected computer in the caption of the Task Scheduler dialog.<br />

Note: To be able to manage scheduled tasks on a remote computer, you must have<br />

appropriate permissions on that computer (the easiest way to achieve this is to add<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Getting</strong> <strong>Started</strong> – Further Steps<br />

you to the<br />

Administrators group on the remote computer).<br />

Since the task you have created will run <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or Macro Player,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

must be installed on the remote computer.<br />

The Task Scheduler uses the Windows Scheduling Tasks component, so the<br />

remote computer must have this component installed.<br />

• To create a new task, press Add in the Task Scheduler. This will call the Scheduled Task Wizard<br />

that will assist you in creating a new task.<br />

• On the first page of the wizard, select which application you would like to use to run your<br />

macro: <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or <strong>Automated</strong> Macro Player. For information on the difference<br />

between them, see above.<br />

• Specify the other parameters the wizard asks you about (the wizard pages are similar to the pages<br />

of the Windows Scheduling Tasks wizard).<br />

• (Optional) At the last page of the wizard, you can check the “Open advanced properties for<br />

this task” box and press Finish. This will call the Advanced Task Properties dialog. Here<br />

you<br />

can modify command-line arguments for <strong>Build</strong> <strong>Studio</strong> (or Macro Player) and modify other task<br />

properties. For instance, you can specify whether the task should be deleted after it has been<br />

executed.<br />

If your task does not run on a remote computer, make sure that the path to the macro<br />

file is specific to that computer. To do this, open the Tasks tabbed page of the<br />

Advanced Task Properties dialog and specify the correct path in the Run edit box.<br />

Now the task is ready for running.<br />

To modify properties of an existing task, double-click the desired task in the Task Scheduler dialog and<br />

modify tas k properties in the ensuing Advanced Task Properties dialog.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

69


70<br />

<strong>Build</strong> Strategies<br />

Continuous Integration<br />

Continuous Integration Support<br />

<strong>Build</strong> Strategies<br />

When more than one developer is working on a software project, from time to time the team members<br />

need to integrate their changes to the project's codebase and then run a build to see if the renewed code can<br />

be built and, if the build succeeds, and if it works without errors. These builds (they indicate the "health"<br />

status of the entire project) are called integrated builds. Normally, they are performed occasionally (e.g. right<br />

before the deadline) or regularly (for instance, weekly or daily). It is hard to locate errors that arise in<br />

integrated builds that are performed rarely, since the number of changes introduced between the previous and<br />

current builds may be tremendous. To reduce the number<br />

of errors revealed in integrated builds and to make<br />

it is easier to find errors, you should perform these builds as often as possible. Ideally, builds should be<br />

performed right after the source code of your project has been modified. This will help you continuously<br />

maintain the integrity of your codebase - it will be much easier to find errors that appeared after modifying<br />

the source code, because you will always know which source files were changed for this build. It is also<br />

recommended that each build be tested and reported appropriately. By following this strategy,<br />

you will<br />

always<br />

be able to provide developers and users with a working build compiled using the latest versions of the<br />

source files. The strategy is called continuous integration<br />

(http://www.extremeprogramming.org/rules/integrateoften.html). It works well if:<br />

• Your code is stored in a central location, preferably a source code control product like Visual<br />

SourceSafe. <strong>Build</strong> <strong>Studio</strong> macros can access different source control repositories. See Supported<br />

Tools.<br />

• You have automated your build process, say, by writing an appropriate <strong>Build</strong> <strong>Studio</strong> macro.<br />

• You have included tests (unit, functional, regression, etc.) in the codebase as part of the project<br />

(optional). These tests can be run as part of the build macro.<br />

• Notifications about the build and test results are sent to respective users automatically. You can<br />

do this by including<br />

the appropriate operations in your macro. See Sending Notifications.<br />

As you can see, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> supports all<br />

of the prerequisites of continuous integration. In<br />

addition, it includes facilities that allow you to practice continuous integration of your projects in full. The<br />

main facility is a dedicated Windows NT service called <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service (\bin\<strong>Automated</strong><strong>Build</strong>Service.exe). You can configure this service via <strong>Build</strong> <strong>Studio</strong>’s user interface to<br />

track all of the changes in files stored in a definite repository. This can be a folder on disk, a directory on an<br />

FTP server or a source code control repository. To reduce the amount of time spent on interaction between<br />

the service and the repository and to lower the use of resources, the service does not poll the repository<br />

constantly, it does this at certain time intervals.<br />

The process of continuous integration provided by the <strong>Build</strong> <strong>Studio</strong> can be divided into several stages<br />

(we will illustrate this process using a Microsoft Visual<br />

SourceSafe repository):<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Continuous Integration<br />

Preliminary steps<br />

First, you need to perform the following preparations:<br />

• Make sure that the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service is running.<br />

• Prepare an appropriate macro that will build the project out of the latest source files, run a set of<br />

unit, functional, regression and<br />

other tests, and then report the build and test results to the<br />

respective users and to the log.<br />

This macro must be saved to a file. See Saving and Loading<br />

Macros for more information on how to do this. Unsaved macros cannot be used for continuous<br />

integration.<br />

Creating a task<br />

If <strong>Build</strong> <strong>Studio</strong> is running as a standalone application, click Tasks (Continuous Integration) on the<br />

Tasks toolbar of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to call the Edit Tasks dialog. If <strong>Build</strong> <strong>Studio</strong> is integrated into<br />

Visual <strong>Studio</strong> .NET, select <strong>Build</strong> <strong>Studio</strong> | Tasks (Continuous<br />

Integration) from the main menu of the<br />

Visual <strong>Studio</strong> to do this. The dialog lets you create several tasks<br />

that the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service<br />

should perform. Each of these tasks is intended to run an existing<br />

macro in certain conditions. By default, the<br />

Edit Tasks dialog lists all the tasks that were created on your computer<br />

(the computer name is shown in the<br />

dialog caption).<br />

Before creating a new task, select the computer where the task will run. Note that selecting the computer<br />

is optional and if you are going to run the task on your computer, you can skip this step. To select the<br />

computer:<br />

• Press the Connect To button in the Edit Tasks dialog. This will open the standard Browse for<br />

Computer dialog where you can select the desired computer.<br />

• After you have selected the computer, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will display the name of the<br />

selected computer in the caption of the Edit Tasks dialog.<br />

To be able to manage time- and event-triggered tasks on a remote computer, you must have<br />

appropriate permissions on that computer (the easiest way to get hem is to add you to the<br />

Administrators group on the remote computer).<br />

Since your task will run <strong>Automated</strong> Macro Player, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> must be installed on<br />

the remote computer.<br />

Since your task will be performed by the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service, the service must be<br />

running on the remote computer.<br />

Now let's create a new task:<br />

• Click Add in the Edit Tasks dialog. This will call the Edit Task dialog.<br />

• Choose the General<br />

which is on the right.<br />

Properties node on the left of the dialog and switch to the Details pane,<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

71


72<br />

• In the Name box, enter the name under which you want to save the task.<br />

<strong>Build</strong> Strategies<br />

• In the Macro file name box, specify the location of the existing macro file that the task will run.<br />

If your task will run on a remote computer, make sure that the path to the macro file is specific to<br />

that computer.<br />

• In the Configuration dropdown list box, choose<br />

which configurations of the macro to use when<br />

running the macro. See Using Macro Configurations.<br />

• To run the macro<br />

defined in the task, the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service uses the command-<br />

line utility called <strong>Automated</strong> Macro Player. Besides the macro file name and the configuration<br />

names, this utility accepts some other parameters. You can specify these parameters in the<br />

Additional options box. To learn more about them, see Command-Line Arguments.<br />

• In the Description box, enter additional text that describes the task in detail.<br />

• To make the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service trace the given task, turn on the Enabled<br />

checkbox. If you want to temporarily exclude the task from tracing, turn the checkbox off.<br />

• If you know that triggers that you will define in the task (see below) can be fired too frequently,<br />

and you do not want each firing of a trigger to launch a task run, set an appropriate value to the<br />

Tolerance period property. This will assign the wait interval, started after a trigger firing, during<br />

which the task run will be postponed.<br />

• If you want to terminate the task automatically in case it is running too long, enable the Use<br />

timeout property and set a non-zero value to it. This value should be larger than the average time<br />

needed to run the task’s macro.<br />

• Choose the Identification node on the left of the Edit Task dialog and switch to the details pane.<br />

• Here you can specify the user account under which the macro will run the task. This can be<br />

either the account under which the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service will be running on the target<br />

computer (the Run macro under the following account checkbox is disabled) or some other<br />

account (the checkbox is enabled).<br />

Creating the task's triggers<br />

Now we are ready to specify triggers for our task. Each trigger defines conditions under which the task<br />

that will run the macro will be launched. Read the Tracing Task Triggers<br />

topic in on-line help to learn more<br />

about<br />

triggers and blocking triggers.<br />

• Choose the Triggers node on the left of the dialog and switch to the details pane.<br />

• Click Add to create a new trigger in the task.<br />

• In the resulting New Trigger dialog, enter a name for the trigger in the Name box.<br />

• Select Microsoft<br />

Visual SourceSafe File Change from the Trigger Type dropdown list box. This<br />

will make the trigger fire the task when the files of a definite VSS project are changed (modified,<br />

added or deleted).<br />

For list of triggers and for information on the properties of these triggers, refer to Tracing<br />

Task Triggers and Trigger Properties topics in on-line help.<br />

• Click OK to close the New Trigger dialog.<br />

• Expand the Triggers node on the left of the Edit Task dialog, select the newly created trigger<br />

there and switch to the details pane.<br />

• Turn on the Enabled checkbox. This will activate the trigger.<br />

• Turn on the Disable on Error checkbox. This will<br />

deactivate the trigger if some parameters of<br />

the trigger are incorrect.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Continuous Integration<br />

• In the VSS INI path property, specify the path to the srcsafe.ini file of the desired Visual<br />

SourceSafe database.<br />

• In the Login and Password boxes, specify the user<br />

name and password used to authenticate you<br />

in the VSS database.<br />

The VSS user name must be given in the DOMAINNAME\USERNAME format, for instance,<br />

CEDAR\SMITH.<br />

• In the Project or file box, enter the path to the VSS project or to the<br />

VSS file whose changes the<br />

trigger will trace. If you specify a VSS project, the trigger will track changes in all of its files.<br />

•<br />

If you want the trigger to track changes of all subproject's of the specified VSS project, enable<br />

the Recursive checkbox.<br />

• In the Query interval box, enter a period that will define how often the trigger will poll the VSS<br />

database.<br />

• In the Delay after change box, enter a period that will define how long the trigger will wait after<br />

detecting a change to start the task. If any changes happen during the waiting period, the timer<br />

will start again. This is done in order not to trigger partial builds if the check-in operation<br />

consists of several steps.<br />

N ote: The values you use for Query interval and Delay after change will depend on several factors.<br />

First, they depend on how big your builds are. If a single build takes only 30 seconds or so to<br />

complete, then you can safely have a low number for Query interval,<br />

since your build machine<br />

will easily be able to keep up. If builds take hours to complete, you will want a relatively wellspaced<br />

out value to give the machine a chance to complete everything before another build is<br />

set to begin. Notice that the poll period is a regular timed interval, not an absolute time/date<br />

stamp. To configure <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to run your build, for<br />

instance, daily at midnight,<br />

you should use other strategies rather than continuous integration:<br />

you can schedule your<br />

macro runs using the Windows Scheduling Tasks component or using triggers of the Specified<br />

Time type (see above).<br />

Similarly, the waiting period is useful if you have several developers coordinating a check-in<br />

to the Visual SourceSafe repository. If one developer happens to complete his/her check-in<br />

right as the poll period fires, while the second developer is still checking in, then the resulting<br />

build will be based on incomplete code. <strong>With</strong> an appropriate wait period, once the poll period<br />

fires and sees changes, it provides a window for other check-ins<br />

to come in before the build<br />

actually begins. This value should be relatively short (60 seconds or less), since check-ins to<br />

the database ought to be relatively atomic and not spread out over hours or even minutes.<br />

Creating the task's blockers<br />

If you want to block the task execution in some cases (for instance, at night, when your developers do<br />

not change the files under Visual SourceSafe), add appropriate blockers (blocking triggers) to the task. To<br />

work w ith the task's blockers, first select the Blockers node on the left<br />

of the Edit Task dialog. You can<br />

manage blockers (create, delete and modify their properties) in the same way you do this with triggers. In<br />

fact, blockers are blocking triggers.<br />

Final steps<br />

When a blocker is fired, all triggers defined for the task are ignored.<br />

Upon configuring<br />

the task properties:<br />

•<br />

Click OK to close the Edit Task dialog.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

73


74<br />

• The new task will appear in the Edit<br />

Tasks dialog. Click Close to close the dialog.<br />

<strong>Build</strong> Strategies<br />

Information about each task you create via the Edit Tasks dialog is saved<br />

to a .task file (the name of the<br />

file is the task nam e)<br />

in the \bin\Tasks folder. This is actually an .xml file with a<br />

definite structure . Thus,<br />

you can modify the list of tasks and their properties by creating, deleting and<br />

modifying these .task<br />

files (provided that you keep the valid structure of each file).<br />

To be able to run the prepared tasks, the<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service must be running. In this<br />

instance, <strong>Build</strong> <strong>Studio</strong>'s executable (\bin\<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe) is not needed<br />

until you wish to configure the task list again.<br />

Upon running<br />

a task, you can view the status of this run in Windows Event Viewer. To do this:<br />

• Open the Control Panel | Administrative Tools | Event Viewer<br />

console.<br />

• (Optional.) If the task was run on a remote computer, select Connect to another computer from<br />

the Action<br />

menu, specify the desired computer in the subsequent Select Computer dialog and<br />

click OK.<br />

• Select Application under the<br />

Event Viewer node on the left of the console window.<br />

• Select Filter<br />

from the View menu.<br />

• In the resulting Application Properties dialog, switch to the Filter<br />

page.<br />

• Set the Event source property value to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service.<br />

•<br />

Click OK to close the dialog.<br />

• In the details pane of the console window (it is on the right), click the<br />

header of the Date<br />

column. Depending on the sorting order, the last event posted by the service will appear either at<br />

the top or at the bottom of the event list. This is the event of the last task run. To view its<br />

properties, simply double-click the event.<br />

Note: Windows Event Viewer will display those tasks that were executed. If a task is fired by a trigger, it<br />

will be only displayed if the trigger fired.<br />

Additionally, the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service can be configured via the command-line. A full list of<br />

arguments that a service can accept is given in the Command-Line Arguments topic. Only those arguments<br />

that relate to task execution are mentioned below:<br />

• /trace:on and /trace:off - Enables or disables the logging of resource usage for the<br />

Microsoft Visual SourceSafe File Change, PVCS File Change, StarTeam File Change,<br />

Subversion File Change, Surround SCM File Change, Team Coherence File Change and Vault<br />

File Change trigger types. Generally the logs contain the command line of the launched process<br />

(it is used to check the state of the traced resource), the process response, the request date and<br />

time and the latest date and time of the traced resource obtained during the check.<br />

• /poolsize:N - Defines a number<br />

of tasks that can run simultaneously. The N value must<br />

range within the 1 - 30 interval, the defaul value is 5.<br />

• /exit - Closes the <strong>Automated</strong><strong>Build</strong>Service.exe<br />

when it is launched as a stand-alone process<br />

and stores the values of the /poolsize and /trace arguments to the registry.<br />

Tracing Task Triggers<br />

A task performs a macro run with the specified parameters. A task can be started automatically, it<br />

is not<br />

required that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is running to begin a task execution.<br />

A conception of a tasks allows to<br />

implement a continuous<br />

integration strategy that improves an integrity and consistency of an application’s<br />

codebase. There are several ways to start a task automatically:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Continuous Integration<br />

• Via th e Windows Scheduling Tasks component that launches <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

or<br />

<strong>Automated</strong> Macro Player along with the appropriate command-line arguments.<br />

• Via the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s built-in Task Scheduler, that is using Windows Scheduler, but<br />

provides<br />

additional abilities for macro runs, for example allows you to start a macro on a remote<br />

computer.<br />

• Via th e <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service - a Windows NT service that traces task triggers and<br />

starts a task when trigger conditions are met.<br />

This topic describes the third way to start a task, for information about the first two ways read the<br />

Command-Line Arguments<br />

and Scheduling Macro Runs topics correspondingly.<br />

A trigger is a pre-defined set of conditions or events that should comply to perform a task.<br />

A blocking<br />

trigger, or blocker, is a set of conditions or events that cancels the task execution. When a blocker is fired,<br />

all triggers defined for the task<br />

are ignored.<br />

Variou s types of triggers and blockers are available in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, so that you can choose<br />

those triggers and blockers that best suit your needs. The tables below list the available types of triggers and<br />

blockers and give their descriptions.<br />

Trigger Type Description<br />

CVS F ile Change Fires the task when certain files stored in a Concurrent Versions<br />

System (CVS) repository are changed (modified, added or deleted).<br />

File Change Fires the task when certain files or folders are<br />

changed. Such triggers<br />

may help you build your<br />

project automatically if you work on it alone<br />

and do not use any source code controls.<br />

FTP File<br />

Change Fires the task when certain files or folders stored on an FTP server are<br />

changed. Such triggers may help you build your project automatically<br />

if you share its source files with other developers via an FTP server<br />

and do not use any source code controls.<br />

JediVCS File Change Fires the task when certain<br />

files stored in a JEDI version control<br />

system are changed (modified, added or deleted).<br />

Low Disk Space Fires the task when the free space size of a particular folder or<br />

logical<br />

drive falls below the given threshold. You may need such triggers to<br />

run a macro that cleans up unnecessary files in order to free some<br />

space on disk.<br />

Microsoft Visual SourceSafe File Fires the task when files of a particular Visual SourceSafe project are<br />

Change<br />

changed (modified, added or deleted).<br />

Perfor ce File Change Fires the task when certain files stored in a Perforce repository are<br />

changed (modified, added or deleted).<br />

PVCS File Change Fires the task when certain files stored<br />

in a PVCS repository are<br />

changed (modified, added or deleted).<br />

Rational ClearCase File Change Fires the<br />

task when certain files stored in a ClearCase repository are<br />

changed<br />

(modified, added or deleted).<br />

SourceOffSite File Change Fires the task when one or more files stored in a SourceOffSite<br />

repository are changed (modified, added or deleted).<br />

Specified Time Fires the task at the specified time at certain week days. You can limit<br />

the week days when the task should be fired. If the task is not fired at<br />

specified time<br />

for some reason, you can specify a waiting period<br />

during which you allow to run the task. Using such triggers is an<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

75


76<br />

<strong>Build</strong> Strategies<br />

alternative to the tasks you run via the Windows Scheduling Tasks<br />

component.<br />

StarTeam File Change Fires the task when certain files stored in a StarTeam repository are<br />

changed (modified, added or deleted).<br />

Subversion File Change Fires the task when certain files stored in a Subversion repository are<br />

changed ( modified, added or deleted).<br />

Surround SCM File Change Fires the task when certain files stored in a Surround SCM repository<br />

are changed (modified, added or deleted).<br />

Team Coherence File Change Fires the task when certain files stored in a Team Coherence<br />

repository are changed (modified, added or deleted).<br />

Team Foundation Version Fires the task when certain files stored in a Team Foundation<br />

Control File Change<br />

repository are changed (modified, added or deleted).<br />

Time Period Fires the task periodically every time the specified time interval<br />

elapses.<br />

Vault File Change Fires the task when certain files stored in a SourceGear Vault<br />

repository are changed (modified, added or deleted).<br />

Blocker Type Description<br />

Date Range Blocks the task execution during the specified date range.<br />

Days of Week Blocks the task execution at the specified week days.<br />

Low Disk Space Blocks the task execution when the free space size of the needed<br />

folder or logical drive falls below the given threshold.<br />

Time Range Blocks the task execution daily during the specified time range.<br />

Each task does not depend on other tasks. This means that when the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service is<br />

running a task, it does not stop checking the other tasks and can run several or even all the tasks at once.<br />

However, when an individual task is running, all of its triggers and blockers are ignored. That is, the task<br />

cannot be run anew until it stops. The task properties as well as its triggers and blockers are specified in the<br />

Edit Task dialog. The triggers' and blockers' properties are described in the Trigger Properties on-line help<br />

topic.<br />

To detect changes in a new resource, a trigger must have at least one access to that resource. This is<br />

needed to get the trigger's initial timestamp. An attempt to get this timestamp is made right after the trigger is<br />

enabled or re-enabled.<br />

If the Disable on Error property is off, the trigger will keep trying to get the resource's timestamp with<br />

the same query and delay intervals even if there are connection or other problems. If Disable on Error is on,<br />

the trigger will be disabled as soon as the first error occurs and thus it will stop querying the resource. To<br />

activate the trigger again, turn on the trigger's Enabled property.<br />

Changing a trigger's query and delay intervals does not affect the trigger's capability of detecting<br />

changes. This means that you can edit the Query interval and Delay after properties of the trigger are<br />

changed while it is active. After you click OK in the Edit Task dialog, all time counters of all enabled<br />

triggers of the given task will be reset, and then, right after that, they will start measuring their time anew. At<br />

that, the changes made to the files during property editing will not be omitted.<br />

However, when you modify any of the trigger's properties except for Query interval and Delay after<br />

change, the trigger will reset its stored date of the last successful access to the resource, "thinking" that the<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Distributed <strong>Build</strong>s<br />

user has selected another resource to monitor.<br />

As a result, the changes made to the files during property<br />

editing will be omitted.<br />

Distributed <strong>Build</strong>s<br />

Distributed <strong>Build</strong>s – Overview<br />

A process of building an application includes several tasks, such as getting the latest version of source<br />

files from a version control system, compiling the source files, creating<br />

the installation package and others.<br />

Some of these tasks (mostly, compilation<br />

of source files) can be divided into smaller tasks, each of which can<br />

be run on<br />

a separate computer at the same time as other tasks. For example, an application may consist of a<br />

number of independent modules, so these modules can be built independently on different computers<br />

simultaneously. These build processes, whose workload is distributed among<br />

several cooperative computers<br />

within the network, are called distributed builds.<br />

Distributed builds essentially reduce the project build time due to the fact that<br />

the build tasks are<br />

executed simultaneously on several computers. Using distributed builds, you can expect the build<br />

performance to speed up depending on the number of computers you use in the build. In this way, you can<br />

run your builds faster and more often, which<br />

is an essential part of the continuous integration strategy.<br />

Some third-party build tools supported by <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>, such as Incredi<strong>Build</strong> or NAnt, can<br />

distribute compilation among assigned network computers<br />

themselves. If you do not use these tools or if you<br />

need<br />

to distribute tasks other than compilation, you can make use of distributed build capabilities provided<br />

by <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

In <strong>Build</strong> <strong>Studio</strong>, distributed builds can be organized by using special operations in the Remote Macro<br />

Execution category:<br />

• Remote Group – Executes a group of operations on a specific remote computer.<br />

• Remote Execution Stack – Executes its child operations in parallel, on the specified remote<br />

computers that<br />

are available at that time.<br />

• Remote Macro Command – Lets you execute a specific macro on a remote computer.<br />

In addition to running operations on remote computers, you can take advantage of the standard Group<br />

operation that can execute its children asynchronously (in parallel). For example, you can place several<br />

Remote Group operations into an asynchronous<br />

Group so that they will run simultaneously. For more<br />

information<br />

on executing operations in parallel, see Concurrent Execution of Operations.<br />

<strong>With</strong>in the Remote Group and Remote Execution Stack operations, you can use the same operations that<br />

are used in typical macros. The only difference is that the properties of these operations (such as file names<br />

and paths) must be specified with regard to the remote computer on which they will be run. In properties of<br />

these operations, you can also use variables and constants. In this case,<br />

macro variables act like parameters<br />

that are passed by reference. That is, before executing remote operations <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> initializes<br />

macro variables on the remote computer with their<br />

current values on the host computer. Changes made to<br />

variable<br />

values in remote operations are applied to variables in the main macro once the execution returns to<br />

it.<br />

The remote operations’ logs are also transferred to the main computer once the execution returns to the<br />

main macro. They are included in the macro<br />

log, which is displayed in the Log panel, and taken into account<br />

in the<br />

macro summary.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

77


78<br />

Distributed <strong>Build</strong> Scenarios<br />

<strong>Build</strong> Strategies<br />

The typical build process consists of several steps, including obtaining the latest version of source files,<br />

building the application, creating the installation package, and so on. Some of these steps for example, the<br />

compile process, can be split into several independent tasks that can be carried out in parallel by multiple<br />

computers.<br />

In this topic, we suggest some distributed build scenarios that you can use to improve the performance of<br />

your<br />

build process. To learn how you can create <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros to implement these<br />

scenarios, see Creating Distributed <strong>Build</strong>s.<br />

Reduce <strong>Build</strong> Time<br />

One of the main advantages of the distributed build strategy is that it dramatically reduces the project<br />

build time, comparing to the builds run on a single build server. The most speedup is achieved by distributing<br />

compilation tasks among build servers<br />

specified in macro operation properties. However, this requires you to<br />

determine the project parts (for example, sets of libraries) that can be built independently on several<br />

machines. Once you have decided that, you can create and configure the corresponding build projects on<br />

individual build servers. Note that unless you are building a multi-platform project (see the following<br />

section), all build servers must have the same configuration.<br />

Each set of built modules can be copied to a shared network drive. After the project modules<br />

are<br />

collected, you can create the installation package and perform additional tasks (for example, deploy the<br />

product on test machines).<br />

By using the distributed build strategy, you can build your projects faster and more often, which is an<br />

essential part of the continuous integration strategy.<br />

<strong>Build</strong> Multi-Platform Products<br />

You can take<br />

advantage of distributed builds to build multi-platform products. These are products that<br />

have several versions built for different platforms (for example, versions for 32-bit and 64-bit platforms, for<br />

different versions of the Microsoft .NET Framework, and so on) as well as products that provide different<br />

version s of a set of libraries for different platforms or environments. The key point in this scenario is that you<br />

need to create<br />

several sets of modules from the same source files in different environments.<br />

Usually,<br />

you would implement this scenario by having a number of preconfigured build servers and<br />

running an individual build macro on each of them. <strong>With</strong> the distributed build feature provided by<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, it is a lot easier to maintain builds. You can have a single build macro<br />

running on<br />

the host computer<br />

that will execute specific tasks on remote build servers. These tasks can include, for<br />

example, getting<br />

the latest version of source files from a particular location on each machine and compiling<br />

the sources. The remote tasks can be run serially (that is, one build server after another), or on all build<br />

servers in parallel. Like in the previous scenario, the built modules<br />

can be copied to a shared network disk, after which you<br />

can create the installation<br />

packages. However, it is also possible to distinguish a number of common tasks,<br />

for example,<br />

sending notifications at the end of the build. These tasks can be carried out by the build macro<br />

on the host computer.<br />

Run <strong>Build</strong>s and Tests on Different Machines<br />

It is a common<br />

practice to run functional, regression and other kinds of tests on the newly built product<br />

version to ensure its quality. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> supports many third-party testing<br />

tools, so that you can<br />

run automated tests as a part of your build macro. However, usually this assumes that builds and tests are run<br />

on the same machine, which is often inconvenient.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Distributed <strong>Build</strong>s<br />

Using the distributed build feature, you no longer<br />

have to use the same machine as a build and test<br />

server. You can build a project on one machine and test<br />

it on another one. Furthermore, it is possible to use<br />

several<br />

test servers to test the product behavior in different environments. The <strong>Build</strong> <strong>Studio</strong> macro can also<br />

be configured so that the tests will be run in parallel.<br />

This scenario requires a build macro that will build the project and then deploy it on test servers. The test<br />

servers can be either<br />

preconfigured, or configured by the corresponding macro operations (for example, you<br />

can use operations of the Microsoft Virtual Server category to manage a virtual machine on the test server).<br />

Results of automated tests will be transferred from remote machines to the host computer. <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> can parse the test tool’s output so that you can easily determine whether the tests passed or failed and,<br />

based on this, mark the build as successful or broken.<br />

Creating Distributed <strong>Build</strong>s<br />

Macros that perform distributed builds are similar to other build macros, with the difference that some of<br />

their tasks are split into smaller tasks that are distributed for running on multiple remote computers. The key<br />

point in creating distributed build macros is to specify a set of computers that can participate in distributed<br />

builds and to divide a single build task into several independent tasks.<br />

This topic explains how to configure remote computers and create distributed build macros:<br />

Configuring Remote Computers<br />

Connecting to Remote Computers From Macros<br />

Distributing Operations Among Remote Computers<br />

Running Operations on a Specific Remote Computer<br />

Running Operations on Several Remote Computers Concurrently<br />

Running Macros on a Remote Computer<br />

Running Distributed <strong>Build</strong> Macros<br />

Possible Problems<br />

Configuring Remote Computers<br />

The computers that participate in the distributed build must be configured in a special way. First, the<br />

remote<br />

computers must have all of the needed software (such as compilers, build tools and helper utilities)<br />

installed<br />

and properly configured. For instance, if you are going to distribute the compilation of a Microsoft<br />

Visual<br />

<strong>Studio</strong> .NET project among several computers, this IDE must be installed and configured on that<br />

com puter. Note that <strong>Build</strong> <strong>Studio</strong> cannot check whether the needed software is installed on a remote<br />

computer<br />

before running a macro like it does on local computers. So, you should run the macro to find<br />

missing<br />

or unconfigured applications.<br />

Also, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> must be installed on these computers and the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Service<br />

must be running on them (this service is used to transmit data between the host computer where the<br />

build macro is running and the remote computers where the individual macro tasks are executed).<br />

To connect to remote computers from the host<br />

computer, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can use the DCOM or<br />

SOAP ( We b service) protocol. DCOM is typically used to connect to local computers that belong to the same<br />

domain. In general, it works faster than SOAP and, since it is an integral part of the Windows operating<br />

system, it does not require any additional software on remote<br />

computers. However, SOAP lets you connect to<br />

comput ers that do not belong to the domain containing the<br />

host computer. Whichever connection type you<br />

choose to u se to connect to a specific remote computer, you should configure it on that computer, as<br />

described i n the Connection Parameters topic.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

79


80<br />

Connecting to Remote Computers From Macros<br />

<strong>Build</strong> Strategies<br />

Automa ted <strong>Build</strong> <strong>Studio</strong> provides a special Setup Connections operation that can be used to specify a set<br />

of remote computers for the distributed build and to adjust the connections to these computers. To configure<br />

connections, follow these steps:<br />

1. Add the Setup Connections operation to your macro. To learn how to add operations to the macro,<br />

see Adding, Removing and Arranging Operations in a Macro.<br />

2. Double-click the Setup Connections operation, or right-click it and select Properties from the<br />

context menu. This will open the Setup Connections Operation Properties dialog.<br />

3. In the Operation Properties dialog, switch to the Connections<br />

page.<br />

4. Click the Add button under the Connections list box and enter the name for the connection of the<br />

remote computer. This can be the remote computer name (for example, JohnSmithComp) as well as<br />

an arbitrary name (for example, Connection1).<br />

5. In the panel on the left, select the connection type that is used to connect to the remote computer:<br />

SOAP or DCOM.<br />

If you select the DCOM connection, specify the name of the remote computer (for example,<br />

JohnSmithComp) in the Server name field.<br />

If you select the SOAP connection, specify the URL of the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server on the<br />

remote computer in the Server URL field. The <strong>Build</strong> <strong>Studio</strong> Server URL has the<br />

http://ComputerName_or_IP/VirtualFolderName format, where ComputerName_or_IP is the name<br />

of the remote computer or its IP address, and VirtualFolderName is the name of the virtual folder on<br />

the remote computer where the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> modules reside (the default name is<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>). Examples of Server URLs are:<br />

http://JohnSmithComp/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong> and http://192.168.1.103/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.<br />

6. If you want to use a specific account when connecting to the remote computer, make sure that the<br />

Authenticate as the currently logged on Windows user option is disabled and fill in the<br />

Username and Password fields. To connect using the account of the user currently logged into<br />

Windows, enable the Authenticate as the currently logged on Windows user option.<br />

7. (Optional). Press Test Connection to test the connection to the remote computer using the specified<br />

parameters. If test connection fails, make sure the remote computer is available in your network, that<br />

the DCOM or SOAP protocol is properly configured on that computer (see Connection Parameters)<br />

and that the specified connection parameters are correct.<br />

8. Repeat steps 4-7 to specify connections to other remote computers you want to use in the build<br />

process.<br />

9. Press OK to close the Setup Connections operation properties dialog and save the changes.<br />

Distributing Operations Among Remote Computers<br />

An essential part of creating distributed build macros is to decide which build tasks should be split into<br />

smaller<br />

ones and to distribute them among remote computers. For example, if your project consists of<br />

multiple<br />

independent modules, you can split the project build process into building each project module. The<br />

process of building an individual module includes the same steps as building the whole project,<br />

that is,<br />

getting the latest version of source files, compiling the project, copying the build modules to a shared<br />

network<br />

disk, and so on.<br />

<strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> does not automatically distribute the compile process among remote<br />

computers.<br />

If you need to distribute the compile process, you should manually create and<br />

configure individual projects for building each project module.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Distributed <strong>Build</strong>s<br />

You ca n distribute the remote build tasks among specific computers, or among those specified computers<br />

that are available at that time. Again, these computers must have all of the needed software for performing<br />

the corresponding operations. For example, if you want<br />

to distribute the compile process among several<br />

computers, the compiler<br />

must be installed on all of them.<br />

Running Operations on a Specific Remote Computer<br />

If you wish to execute a group of operations on a specific remote computer, use the Remote Group<br />

operation:<br />

• Add the Remote Group operation to your macro.<br />

• Double-click the Remote Group operation, or right-click it and select Properties from the<br />

context menu. This will open the Remote Group Operation Properties dialog.<br />

• In the Operation Properties dialog, switch to the Remote Group Details page.<br />

• Check the Run child operations on remote computer property.<br />

• In the Connection field, enter the name of the connection to the desired remote computer that<br />

you have previously configured in the Setup Connection operation. For example, Connection1.<br />

You can also press the ellipsis button and choose the desired connection from the list.<br />

•<br />

•<br />

In the Working folder filed, specify the path to a folder on the remote computer where you want<br />

to upload the macro. For example, D:\Work.<br />

By default, the remote instance of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro Player) is<br />

launched under the same account as the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> service (usually, the SYSTEM<br />

account). However, operations that will be executed remotely may require specific account data<br />

in order to run successfully (for example, the operation that checks out files from the version<br />

control system). You can either specify this account in the operation properties, or make the<br />

remote instance of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (<strong>Automated</strong> Macro Player) run under that account.<br />

To do the latter, check the Run under the following account property and specify the needed<br />

user name and password in the Username and Password fields.<br />

• Check the Run interactive property to run the remote operations in interactive mode. If you<br />

want the remote instance of <strong>Build</strong> <strong>Studio</strong> (or Macro Player) to stay hidden during the operations<br />

execution, leave this property unchecked.<br />

• Press OK to save changes and close the Operation Properties dialog.<br />

• Add the operations that you want to execute on the remote computer as a child of the Remote<br />

Group operation and configure their properties.<br />

When specifying properties of operations that are executed on a remote computer, remember that<br />

file names and paths must be specified in the terms of that computer.<br />

Running Operations on Several Remote Computers Concurrently<br />

If you want to execute several operations or groups of operations on multiple remote computers in<br />

parallel, you can place several Remote Group operations under a concurrent Group operation (see<br />

Concurrent Execution of Operations). In this case, the Remote Group operations are run simultaneously on<br />

the corresponding remote computers.<br />

However, you may also want to execute an operation or group of operations on any of the computers<br />

available for this purpose. This can be achieved by using the Remote Execution Stack operation:<br />

• Add the Remote Execution Stack operation to your macro.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

81


82<br />

<strong>Build</strong> Strategies<br />

• Double-click the Remote Execution Stack operation, or right-click it and select Properties from<br />

the context menu. This will open the Remote Execution Stack Operation Properties dialog.<br />

• In the Operation Properties dialog, switch to the Remote<br />

Execution Stack Details page.<br />

• Check the Run child operations asynchronously on remote computers property.<br />

• The Computers list specifies the network computers available for the remote build. During the<br />

macro run, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> distributes child operations of the Remote Execution Stack<br />

operation between those specified computers that are available at that time.<br />

•<br />

To add a new computer to the list:<br />

Press the Add button. The Computer dialog appears.<br />

In the Connection field, enter the name of the connection to the desired remote<br />

computer that you have previously configured in the Setup Connection operation. For<br />

example, Connection1. You can also press the ellipsis button and choose the desired<br />

connection from the list.<br />

In the Working folder field, specify the path of the folder on the remote<br />

where you want to upload the macro. For example, D:\Work.<br />

computer<br />

Choose the remote computer’s priority in the Priority combo box. The default priority is<br />

Normal. Other possible values are Low and High.<br />

If you need the remote instance of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro<br />

Player) to be run under a specific account, check the Run under the following account<br />

property and specify the needed user name and password in the Username and<br />

Password fields.<br />

Press OK to save the changes and add a new computer to the list.<br />

You can add other remote computers to the list in a similar way.<br />

Check the Run interactive property to run the remote operations in interactive mode. If you<br />

want the remote instances of <strong>Build</strong> <strong>Studio</strong> (or Macro Player)<br />

to stay hidden during the operations<br />

execution, leave<br />

this property unchecked.<br />

• Press OK to save the changes and close the Operation Properties dialog.<br />

• Add the operations that you want to execute on the remote computer as a child of the Remote<br />

Execution Stack operation and configure their properties.<br />

When<br />

specifying properties of operations that are executed on a remote computer, remember that<br />

file<br />

names and paths must be specified in the terms of that computer.<br />

Note th at when executing the Remote Execution Stack,<br />

<strong>Build</strong> <strong>Studio</strong> will distribute its direct child<br />

operatio ns among<br />

the available computers. If you need to execute a group of operations rather than a single<br />

operation on a remote computer, you should first add the Group operation as a child of the Remote Execution<br />

Stack operation<br />

and then add the desired operations as children of the Group operation, like on the image<br />

below:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Distributed <strong>Build</strong>s<br />

You can also group operations to be run remotely<br />

by using the Dependent Group operations. In this case,<br />

however,<br />

the Remote Execution Stack behavior will be a little different - it will not run all of the groups<br />

concurrentl y,<br />

but distribute and execute them in the order that is defined by the group’s dependencies. See<br />

Operation Dependencies<br />

for details.<br />

Running Macros on a Remote Computer<br />

Besides executing a group of operations on a remote computer, you can also run a whole macro<br />

remotely. For this purpose, use the Remote Macro Command operation. Below is a step-by-step explanation<br />

of how to configure this operation in your macro:<br />

• If a macro that you wish to run on a remote computer has yet to be uploaded to that computer,<br />

you should first upload it. In macros, you can do this using the Upload Macro operation:<br />

Add the Upload Macro operation to the macro.<br />

Double-click the Upload Macro operation, or right-click<br />

it and select Properties from<br />

the context menu. This will open the Upload Macro Operation Properties dialog.<br />

In the Operation Properties dialog, switch to the Upload Macro Details page.<br />

In the Connection field, enter the name of the connection to the desired remote<br />

computer that you have previously configured in the Setup Connection operation. For<br />

example, Connection1. You can also press the ellipsis button and choose the desired<br />

connection from the list.<br />

In the Macro file name field, specify the name of the macro to be executed on a remote<br />

computer. You can press the ellipsis button and browse for the desired macro file.<br />

In the Remote folder field, specify the path to the folder on the remote computer to<br />

which the macro will be uploaded. For example, D:\Work.<br />

Press OK to save the changes and close the Operation Properties dialog.<br />

• Add the Remote Macro Command operation to your macro.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

83


84<br />

<strong>Build</strong> Strategies<br />

• Double-click the Remote Macro Command operation, or right-click it and select Properties<br />

from the context menu. This will open the Remote Macro Command Operation Properties<br />

dialog.<br />

• In the Connection field, enter the name of the connection to the desired remote computer that<br />

you have previously configured in the Setup Connection operation. For example, Connection1.<br />

You can also press the ellipsis button and choose the desired connection from the list.<br />

• In the Macro file name field, specify the path to the desired macro file on the remote computer.<br />

You can press the ellipsis button and browse for the desired macro file.<br />

• In the Command property, select Start macro.<br />

• If you want <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to wait until the remote macro is executed, enable the<br />

Check the command to complete check box. Otherwise, if this property is unchecked, the<br />

remote macro will be run in parallel with the rest of the local macros. (In this case, you can<br />

check for macro completion by using the If Remote Macro State Is... operation.)<br />

• In the Run macro in box, specify which tool, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or <strong>Automated</strong> Macro<br />

Player, should be used to run the macro.<br />

• (Optional). Specify the command-line parameters to be passed to the remote instance of<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or <strong>Automated</strong> Macro Player (see Command-Line Arguments).<br />

• If you need the remote instance of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro Player) to be<br />

run under a specific account, check the Run under the following account property and specify<br />

the needed user name and password in the Username and Password fields.<br />

• Check the Run interactive property to run the remote macro in interactive mode. If you want<br />

the remote instance of <strong>Build</strong> <strong>Studio</strong> (or Macro Player) to stay hidden during the macro execution,<br />

leave this property unchecked.<br />

• Press OK to save the changes and close the operation properties dialog.<br />

Note: The logs of remote macro runs are kept on the remote computer.<br />

Running Distributed <strong>Build</strong> Macros<br />

Once you have configured the build servers that will participate in the distributed build and the computer<br />

that will host the build, you can run the build macro. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros can be run in several<br />

ways:<br />

• You can run <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on the host computer and start the macro directly from<br />

<strong>Build</strong> <strong>Studio</strong> (see Running Macros).<br />

• You can run the macro on the host computer from the command line, using either <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> or <strong>Automated</strong> Macro Player (see Command-Line Arguments).<br />

• You can schedule the macro to run at specific times on the host computer (see Scheduling Macro<br />

Runs).<br />

• You can start the macro on the host computer from another computer using the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> Client/Server functionality.<br />

• You can run the macro on the host computer via the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface.<br />

Possible Problems<br />

There are a number of things that you should keep in mind when organizing a distributed build macro.<br />

First of all, all build servers must have <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> installed and the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> Service must be running on them. If this service is disabled, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will not be able<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operation Dependencies<br />

to transmit data between the host computer and the build servers. You can check that the service is running<br />

and launch it in the Control Panel | Administrative Tools | Services window.<br />

Unless you are building a multi-platform project, make sure that the build servers used in the distributed<br />

build have the same configuration (operating system, build tools, and so on). Differences in the build server<br />

configurations may cause issues with functioning and interoperation of compiled modules.<br />

During the macro execution, issues can occur if child operations of the Remote Execution Stack operation<br />

use the same resources (for example, if they save results to the same file on a shared network disk or to the<br />

same <strong>Build</strong> <strong>Studio</strong> variable). In this case, a resource may be blocked, or it may be accidentally changed by<br />

another operation, which can cause errors during the operation’s execution. To avoid these errors, do not use<br />

and modify the same resources<br />

in child operations of the Remote Execution Stack. As a workaround, you can<br />

make<br />

a local copy of the resources and work with this copy.<br />

Other type of issues can occur if remote instances of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro<br />

Player) are launched in non-interactive mode (which takes place if the Run Interactive<br />

parameter of the<br />

Remote Execution Stack, Remote Group or Remote Macro Command<br />

operation is unchecked). In this mode,<br />

<strong>Build</strong> <strong>Studio</strong> (or Macro Player)<br />

does not display any windows or dialogs that would be shown if the<br />

corresponding macro operations<br />

were executed on the local computer, and third-party tools run by the macro<br />

do no appear on screen. Thus,<br />

if the macro includes operations that display dialogs or launch tools that<br />

require use r input, these operations<br />

will hang.<br />

So, if the macro contains interactive<br />

operations, it is recommended that they have a timeout limit<br />

specified and a default value in case the user does not respond during the timeout period. For example,<br />

operations of the Interactive<br />

category meet both conditions, so they can be successfully used in distributed<br />

build<br />

macros.<br />

If the remote macro hangs for some obscure reason, you can sort out and handle problematic operations<br />

by specifying the timeout limit for them. You can either set the specific timeout for each operation, or use the<br />

timeout common for all macro operations. If the operation’s timeout is enabled, the operation will be<br />

terminated when its execution time exceeds the timeout value, and <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (<strong>Automated</strong><br />

Macro Player) will proceed to the next operation. For more information, see Handling Errors in Macros.<br />

Another way to handle remotely executed macros or macro parts that hang is to specify the timeout for<br />

the Remote Group, Remote Execution Stack and Remote Macro Command operations themselves. In this<br />

case, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro Player) will run the main macro, track the total run time<br />

of the remote macro or macro parts, and, if this run time exceeds<br />

the timeout limit, terminate the remote<br />

macro execution. Operation<br />

Dependencies<br />

Typically, you configure the macro execution flow manually, by arranging operations that<br />

perform<br />

specific build tasks in a desired order and, if needed, specifying that some of them should be run<br />

concurrently.<br />

However, setting up the macro flow can be quite a tedious process with a sophisticated build<br />

logic including<br />

many alternate serial and parallel tasks.<br />

Fortunately,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can help you manually adjust the operations’ execution order. You<br />

only need to define the dependencies between macro operations and <strong>Build</strong> <strong>Studio</strong> will automatically<br />

determine the order in which the operations should run.<br />

The following topics<br />

provide more information about this feature:<br />

About Dependent Groups<br />

Describes the Dependent Group operation, which is used to specify dependencies between macro<br />

parts, and explains how to use this operation in macros.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

85


86<br />

Dependent Groups Usage Example<br />

Provides step-by-step instructions about configuring dependencies in a macro.<br />

About Dependent Groups<br />

About the Dependent Group Operation<br />

<strong>Build</strong> Strategies<br />

To let you set dependencies between macro operations, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> provides a special<br />

Dependent<br />

Group operation. The purpose of this operation is to separate a group of operations that need to be<br />

executed prior to or after another operation group. The Dependent Group’s properties include a list of the<br />

group’s prerequisites, that is, groups that need to be finished in order for the given group to start. In a way,<br />

these dependencies are analogue to target dependencies in makefiles used by the make tools. However,<br />

unlike<br />

makefiles, <strong>Build</strong> <strong>Studio</strong> macros do not have targets, so all of the dependent groups in the macro<br />

(unless some of them are disabled) will be executed when you run the macro. Dependencies only define the<br />

groups’ execution order.<br />

When you run the macro containing dependent groups, <strong>Build</strong> <strong>Studio</strong> analyzes the dependencies between<br />

them, builds the macro flow graph and executes dependent groups according to this graph. Where possible,<br />

groups are executed in parallel, in order to improve the macro performance and speed it up (see the How<br />

Dependent Groups Work section for details).<br />

Typically, the Dependent Group operations should be the top-level operations in your macro (so that the<br />

macro “consists” of dependent groups). Optionally, they can be grouped by using the Group operations; this<br />

grouping does not affect the execution order of dependent groups. Another possible configuration is to use<br />

dependent groups as children of the Remote Execution Stack operation. In this case, they will be executed on<br />

remote computers specified in the Remote Execution Stack properties.<br />

Any other macro operations, except for Dependent Groups, their parents and children and operations<br />

mentioned in the Remarks section, are ignored.<br />

The order in which you arrange the Dependent Group operations in your macro does not matter and does<br />

not affect their execution order, which is completely determined by the group’s interdependencies.<br />

How Dependent Groups Work<br />

When <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

(or <strong>Automated</strong> Macro Player) runs a macro that consists of dependent<br />

groups,<br />

it first forms the macro dependency graph and ensures that there are no circular references between<br />

dependent groups. If <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> finds a circular reference, it displays an error message that<br />

notifies you about the found loop. In this case, you will need to correct the dependencies to be able to run the<br />

macro.<br />

If the macro structure is consistent, <strong>Build</strong><br />

<strong>Studio</strong> picks out those Dependent Group operations that do not<br />

have<br />

dependencies specified, and runs them concurrently. Once the execution of a particular Dependent<br />

Group finishes, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> starts executing groups that depend on the finished group. If a<br />

specific Dependent Group operation depends on several groups, it is only executed after all of the latter<br />

groups have been completed.<br />

If dependent<br />

groups are children of the Remote Execution Stack operation, the situation is similar. In this<br />

case,<br />

<strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> automatically distributes dependent groups among remote build servers<br />

according to<br />

the operation dependencies.<br />

If the number of groups to be run at a certain moment exceeds<br />

the Maximum thread count property of the<br />

macro, the n only the first Maximum thread count groups are started; the rest are queued. For example, if the<br />

Maximum thread<br />

count is set to 1, dependent groups will be executed serially, one after another (of course,<br />

according to their dependencies).<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operation Dependencies<br />

Setting the Maximum thread count property to a value greater than 1 (or to 0, which means an unlimited<br />

number of threads) makes sense if you are running the macro on a computer that has several processors<br />

or a<br />

multiple-core<br />

processor. In this case, you can improve the macro performance and reduce the macro<br />

execution time.<br />

Otherwise, setting too large of a Maximum thread count value may result in <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong><br />

consuming a lot of operating system resources in order to keep track of all of the threads.<br />

Another macro property - Check dependencies and run macro - allows you to enable or disable the<br />

dependency mode. If this property is checked, the macro consisting of dependent groups is executed as<br />

described above. Otherwise, if this property is unchecked, the Dependent Group operations behave in the<br />

same way as ordinary groups and are executed in their sequence order in the macro. Turning the Check<br />

dependencies and run macro property<br />

off may be useful during macro debugging.<br />

Remarks<br />

There are a few limitations applied to macros that consist of dependent groups:<br />

• Circular references<br />

between dependent groups are not allowed. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> cannot<br />

run a macro if it contains two or more Dependent Group operations that depend on each other.<br />

To check the macro consistency, you can use the Run | Check command of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>'s main menu. If <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> finds any circular references between dependent<br />

groups, it will display an error message notifying you about the found loop “path”.<br />

• If the macro contains dependent groups, any macro operations other than Dependent<br />

Groups<br />

(including their parents and children) are ignored.<br />

However, there are a few exceptions to this<br />

rule:<br />

The Initialization and Finalization operations are executed before and after all of the<br />

dependent groups, respectively.<br />

The Submacro operation defines a submacro that can be run from within a dependent<br />

group<br />

through the Run Submacro operation.<br />

The Setup Connection operation is used to establish connections to remote computers to be<br />

used during the<br />

build.<br />

• The Run From Selected command cannot be used for macros that consist of dependent<br />

groups. The Run to Cursor command, however, is still available.<br />

Dependent Groups Usage Example<br />

Let’s illustrate how you can set up the macro flow using the operation dependencies. Suppose, your<br />

build process consists of a number of tasks that can be accomplished in the order shown on the image below.<br />

As you can see, some tasks in this process should be run in a series, whereas some other tasks can be run<br />

simultaneously.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

87


88<br />

1.<br />

<strong>Build</strong> Strategies<br />

Add the macro operations that automate the build process steps, and group the operations that perform<br />

individual build tasks into separate Dependent Group operations. For example, one group can contain<br />

operations that clean source folders, another one<br />

can include operations that obtain the latest version of<br />

source files from a source control system,<br />

one more group can hold operations that adjust the compiler<br />

settings and perform compilation,<br />

and so on. To learn how to add operations to the macro and change<br />

their parent-child relationship, see Adding, Removing and Arranging Operations in a Macro.<br />

Note, that since the execution order of dependent groups is only defined by their dependencies, the<br />

sequence order of Dependent Group operations in your macro can be arbitrary. For example, the<br />

Depend ent Group operation that corresponds to Task 5 can precede the one corresponding to Task 1, and<br />

so on. You<br />

can arrange dependent groups in your macro in the order that are the most convenient to you.<br />

2. Assign a unique name to each Dependent Group operation in your macro. For example, GetSources,<br />

Compile, MakeInstall and so on. To do this:<br />

• Double-click the desired Dependent Group operation in the Macro panel, or right-click it and<br />

select Properties from the context menu. This will invoke<br />

the Operation Properties dialog.<br />

• In the dialog, switch to the Properties page.<br />

•<br />

Enter the operation name in the Unique name field.<br />

• Press OK to save the changes made<br />

to the operation’s properties.<br />

– or –<br />

• Type the group name in the Unique Name cell of the corresponding Dependent Group operation<br />

item in the Macro panel.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operation Dependencies<br />

3. Specify dependencies between the operation groups. Each Dependent<br />

Group operation can have<br />

prerequisites, which are groups that must have been completed in order for the given group to start. You<br />

define th e Dependent Group prerequisites on the Dependencies page of the Operation Properties dialog.<br />

For example,<br />

in the build process shown on the image above, Task 5 depends on Task 3 and Task 4,<br />

because it can only be run after both of these groups have been completed. So we check the<br />

corresponding groups in the Depends on list of the Task5 group:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

89


90<br />

<strong>Build</strong> Strategies<br />

Note again,<br />

that circular references between dependent groups are not allowed. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

cannot run a macro if it contains circular references (for example, if Group1 depends on Group2, which<br />

depends on<br />

Group1).<br />

4. Check the macro correctness by using the Run | Check command of <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> main menu<br />

(or <strong>Build</strong> <strong>Studio</strong> | Check command from Visual <strong>Studio</strong>’s main menu, if you<br />

use <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> integrated into Visual <strong>Studio</strong>).<br />

This command verifies that all of the required properties of macro<br />

operations are specified and that there are no circular references between dependent groups.<br />

5. Make sure that the Check dependencies and run macro property of your macro is checked. <strong>Build</strong> <strong>Studio</strong><br />

tracks the operation dependencies only if this property is on. To check the state of this setting:<br />

• Select File | Macro Properties from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu (or <strong>Build</strong> <strong>Studio</strong><br />

|<br />

Options | Properties from Visual <strong>Studio</strong>’s main menu, if you use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

integrated into Visual <strong>Studio</strong>).<br />

– or –<br />

• Right-click the macro node in the Solution Explorer of Visual <strong>Studio</strong> and select Properties<br />

from the context menu if you use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrated into Visual <strong>Studio</strong>.<br />

This will open the Macro Properties dialog.<br />

• Switch to the General tabbed page and check the Check dependencies and run macro property.<br />

6. Optionally, you can limit the number of threads available for running the dependent groups. You can do<br />

this by using the Maximum thread count property of your macro.<br />

By default, Maximum thread count is set to 0, which means that the number of threads is unlimited.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Build</strong> Strategies<br />

Concurrent Execution of Operations<br />

<strong>Automated</strong> <strong>Build</strong> Studi o includes a lot of operations that you can use in your macros. By having a variety<br />

of operations at y our disposal, you can create complex macros that perform several tasks that will be<br />

executed simultaneously. <strong>With</strong> <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, you can organize concurrent execution<br />

of macro<br />

operations and thus perform<br />

different tasks at the same time.<br />

Concurrent ( or multithreading) execution lets you improve the performance of <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong><br />

macros and reduce the macro execution time. When macro operations are run in a series, they<br />

are executed<br />

within the same thread, so the next operation only starts after the previous operation is finished. When a<br />

group of operations<br />

are run concurrently, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> starts the next operation in a separate<br />

thread, without waiting for the previous operation to complete. As a result, the CPU is used more effectively<br />

and less time is needed to execute macros.<br />

Concurrent execution of operations can greatly improve performance in the following cases:<br />

• A macro is executed on a multiprocessor computer. A processor can only execute one thread at a<br />

time. So, on a computer with a single processor, only one thread can be executed at a time;<br />

whereas a computer with ten processors can execute ten threads at a time.<br />

• A macro contains operations that require a lot of time (for example, the Get Latest Version<br />

operations for large projects, file uploads and downloads, database queries and so on). When this<br />

type of an operation is being executed, other operations cannot be started until that operation is<br />

finished. Putting an operation in a concurrently running group will allow other operations to run<br />

simultaneously with this operation, and it will not block them.<br />

• A macro contains operations that perform data transmission over a network (for example,<br />

operations of the FTP, HTTP and other groups). When running concurrently, each operation uses<br />

a separate connection so that the overall bandwidth is greater than the serial operation's<br />

execution, when all operations use the same connection.<br />

• Many others.<br />

Generally, almost all operations provided by <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can be run concurrently (however,<br />

there are technical<br />

and logical restrictions described below). Here are some examples of the operations that<br />

should<br />

be run concurrently:<br />

• To split long-running tasks into smaller tasks. For example, an operation that obtains source files<br />

from a Source Control System (SCS) can be divided into several same operations, each obtaining<br />

a certain part of the source files. Running concurrently, these operations<br />

will take less time than<br />

a single operation that performs the whole task.<br />

• Run the operations, that do not depend<br />

on each other and do not use the same resources,<br />

concurrently. For example, if your macro contains the Remove Directory operation that cleans<br />

temporary folders and the Upload File(s) to FTP operation that uploads one or several files to an<br />

FTP server, you can group them so that they run concurrently.<br />

Organizing Concurrent Execution of Operations<br />

There are two ways to organize concurrent execution of macro operations:<br />

• You can configure your macro so that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> automatically parallelizes the<br />

operations’ execution.<br />

• You can directly specify which operations should be run in parallel.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

91


92<br />

<strong>Build</strong> Strategies<br />

The former approach requires re-structuring your macro file and specifying the dependencies between<br />

different operation groups. When running this macro, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro Player)<br />

automatically determines the macro execution flow and, where possible, parallelizes<br />

the execution of certain<br />

operation groups. This approach is discussed in the Operation Dependencies topic.<br />

While the former approach affects execution of the whole macro, the latter one lets you adjust the<br />

execution<br />

of specific operations. These operations should be grouped into a Group operation with the Run<br />

child operations asynchronously property turned on. Unlike the rest of the macro, where operations run stepby-step,<br />

these grouped operations will be executed in parallel.<br />

To organize a concurrent group:<br />

1. Add the Group operation to your macro, and make the operations that you wish to run<br />

concurrently the children of this Group operation. For more information on how to change<br />

operations’ “relationship”, see Adding, Removing and Arranging Operations in a Macro.<br />

2. Double-click the Group operation,<br />

or right-click it and select Properties from the context menu.<br />

This<br />

will open the Group Operation Properties dialog.<br />

3. I n the Operation Properties dialog, switch to the Group Details page.<br />

4. Enable<br />

the Run child operations asynchronously check box.<br />

5. If the operations in the group are of the same kind, use the Delay before start new thread<br />

property to specify the time interval for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to wait before starting the next<br />

child operation in a new thread. This delay lets you avoid issues caused by simultaneous<br />

execution of the same actions by similar or identical operations (such as issues with accessing<br />

the same resources, and others).<br />

6. In order to prevent <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> from creating too many threads for the given group<br />

of operations, you can limit the number of threads using the Max thread count property.<br />

(Possible issues with a large number of threads are described below). If this property is set to 0,<br />

the number of threads is unlimited.<br />

7. Click OK to close the dialog.<br />

Note again<br />

that you can organize concurrent execution of both single operations and groups of<br />

operations.<br />

In this case, you have to make the parent Group operation of each group a child of the common<br />

parent Group operation. In their turn, operations in each group can be executed in a series or concurrently. If<br />

child operations of the Group operation are executed concurrently, the Time with Child<br />

values in the log<br />

indicates the longest execution time of a child operation, not the sum of operation execution times.<br />

Possible Issues with Concurrent Execution of<br />

Operations<br />

There are a number of things that you should keep in mind when organizing concurrent execution of<br />

operations<br />

in your macro.<br />

Reasoning from the macro execution logic, you should not run concurrently those operations that depend<br />

on each other. For example, an operation that prepares resources for a certain task and an operation that<br />

performs this task should not be run concurrently, because<br />

when the latter operation starts, it may turn out<br />

that the resources are not prepared for it.<br />

Issues may occur if you have concurrent operations that use the same resources<br />

(for example, if the<br />

operations save their results to the<br />

same file or <strong>Build</strong> <strong>Studio</strong> variable). In this case, a resource may be<br />

blocked, or it may be accidentally<br />

changed by another operation. This can cause errors during the operation’s<br />

execution. To avoid these errors, do not concurrently run<br />

those operations that use and modify the same<br />

resources. Another solution is to use “thread-relative” variables.<br />

These variables allow you to have different<br />

values<br />

for different threads.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Build</strong> Strategies<br />

The issue described above, results in another restriction: if an operation’s API requires exclusive access<br />

to a resource, then the operations implemented via the same API cannot run concurrently. Currently this<br />

restriction applies to Team Coherence operations from the Issue Tracking and<br />

Team Coherence categories.<br />

These operations should<br />

not be executed concurrently,<br />

otherwise an error may occur.<br />

Also, a great number of concurrently running operations<br />

require a lot of operating system resources in<br />

order to keep track of all threads. When switching between<br />

the threads, the system saves the context of the<br />

current thread and restores the context of the next thread.<br />

These actions can take a significant part of the<br />

processor’s time, which will eliminate the benefits of concurrent operation execution. <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> lets you limit the number of threads that can be started for a group of operations. An<br />

optimal number<br />

of concurrent operations<br />

depends on the configuration of your computer.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

93


94<br />

Using Variables and Constants in Macros<br />

Using Variables and Constants in Macros<br />

About Variables<br />

Variables let you make your macros more flexible and powerful. They can be used to specify values of<br />

operation properties (such<br />

as file names, build numbers, and so on) as well as to store the operation result and<br />

output.<br />

They are also accessible in scripts and serve as ordinary script variables.<br />

There are four types of variables that can be used in macros:<br />

• Global variables<br />

• Local variables<br />

• Stored variables<br />

• Environment variables<br />

Global Variables<br />

Global variables are accessible from any operation in your macro. These variables are created and<br />

managed via the Variables dialog. To call this dialog, select Variables | Variables from <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>’s main menu or Edit Script Form menu.<br />

It is possible to provide default values for global variables – the variables will be assigned with these<br />

values at the beginning of the macro run. If the default value is not specified, the variable defaults to an<br />

empty string. Note that besides specifying the default value explicitly, you can initialize a variable by using<br />

the Set/Reset Variable Value operation or from a script (see Using Variables and Constants in Script<br />

Operations).<br />

Additionally, global macro variables can have two attributes:<br />

• Environment – This attribute determines how a variable is used. All variables that have the<br />

environment attribute enabled will be passed to the process launched by the macro. For example,<br />

they will be passed to the process that is launched by the Execute Program operation. These<br />

variables will serve as environment variables for that process. Do not confuse global variables<br />

having<br />

the Environment attribute with environment variables (see below). The latter return<br />

values<br />

of the corresponding Windows environment variables and are constants in fact.<br />

• Thread-relative<br />

– This attribute is useful if the variable is supposed to be used in several<br />

concurrently<br />

executed operations. If the variable has this attribute set, each macro execution<br />

t hread gets its own copy of the variable, so that the variable can be referred in different threads<br />

without causing a resource conflict. For example, input and output parameters of the Submacro<br />

operation are always thread-relative.<br />

Local Variables<br />

Local variables, as follows from their name, are available only in a particular local scope. They can be<br />

defined in the Group, Dependent Group or Submacro operation and will be “visible” only to operations that<br />

belong to that group (submacro). Outside the group (submacro) where a local variable is defined, it does not<br />

exist and any references to it will cause an error.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Variables and Constants in Macros<br />

Local variables are useful if your macro utilizes a large number of variables – by defining some of them<br />

as local, you can make it easier to manage these variables<br />

and also “hide” them from the variable list in<br />

operations<br />

where they are of no use.<br />

Simila r to global variables, local ones can have default values, which you can specify in the properties of<br />

the Group or Submacro operation. The variables are initialized with these values once they are<br />

created at run<br />

time (in other words, once <strong>Build</strong> <strong>Studio</strong> executes the Group or Submacro operation in which local variables<br />

are defined). Note that you can also initialize local variables by using the Set/Reset Variable Value operation<br />

or f rom a script (see Using Variables and Constants in Script Operations).<br />

The Thread-relative attribute is also available for local variables. It commands <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong><br />

to creat e a separate variable copy for each macro execution thread (see Concurrent Execution of Operations).<br />

Store d Variables<br />

Stored variables are very similar to global variables. The only difference is that the values of stored<br />

variables are saved between<br />

macro runs. That is, if you assign a value to a stored variable and then stop the<br />

macro,<br />

the variable value will not change while a global variable will be reset. Stored variables are useful, for<br />

instance, to keep the build number, which could easily be incremented in any of the next runs.<br />

Stored variables are managed in the Stored Variables dialog. To call this dialog, select Variables |<br />

Stored Variables from <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>’s main menu or Edit Script Form menu. In the dialog, you<br />

can specify the variable names, descriptions, their current values and the Environment attribute<br />

To modify the values of a stored variable during the macro run, you can either use the<br />

Set/Reset Variable<br />

Value operation, or write a script (see Using Variables and Constants in Script Operations). Note that the<br />

Set/ Reset Variable Value operation gives you the possibility to modify the stored variable’s value in all<br />

macro<br />

configurations at once by enabling the Set/Reset for All Configurations property. In scripts, the same<br />

functionality is provided by the ABSUtils.SetVariableValue and ABSUtils.ResetVariableValue<br />

routines with the ForAllConfigurations parameter set to True.<br />

The values of stored variables can be saved either in the macro file, or in a separate .bvars file (this file<br />

will be created in the same folder that contains the macro file). The latter can be useful, for instance, if you<br />

need<br />

to have computer-dependent values of stored variables. To specify where <strong>Build</strong> <strong>Studio</strong> should store the<br />

variable values, use the Store values in separate file option in the Stored Variables dialog.<br />

Environment Variables<br />

Environment variables contain information<br />

about the system environment and the currently logged on<br />

user. These variables are defined by Windows,<br />

programs and users and cannot be created in <strong>Automated</strong><br />

<strong>Build</strong><br />

<strong>Studio</strong>. <strong>Build</strong> <strong>Studio</strong> loads the list of environment variables when it starts. To view environment<br />

variables defined in your system, select Variables | Environment Variables from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s<br />

main menu or Edit Script Form menu.<br />

You can change values of environment variables in your macros, however, these changes<br />

will only be<br />

“visible”<br />

to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (or <strong>Automated</strong> Macro Player) and applications started by your macro.<br />

Also, <strong>Build</strong> <strong>Studio</strong> (or Macro Player) will restore original values of environment<br />

variables at the end of the<br />

macro run.<br />

No te: If you add, modify or delete environment variables while <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is running,<br />

the<br />

changes will be “visible” to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> only after you restart it.<br />

Three things<br />

you should keep in mind about variables:<br />

• Since variable names are used to address variables in scripts, the variable name must match the<br />

naming rules used in the scripting language you chose for the<br />

script. To make the variable name<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

95


96<br />

Using Variables and Constants in Macros<br />

suitable for any supported scripting language, follow this simple rule when naming a variable: a<br />

name can include only letters, digits and underscores and must begin with a letter.<br />

• Variables and constants<br />

use the same namespace, so you cannot create a global, local or stored<br />

variable that has the same name as an environment variable, system constant<br />

or an existing<br />

ordinary constant.<br />

• Neither global, local, stored nor environment<br />

variables can be used as loop variables in scripts.<br />

About Constants<br />

Constants are<br />

very similar to variables, however, their values cannot be changed during the macro run.<br />

There are two types of constants: ordinary and system. Below are detailed description of each constant type.<br />

Ordinary Constants<br />

Ordinary constants specify arbitrary values that are supposed to remain unchanged during the whole<br />

macro run. Examples of such constant values are: paths to the folder containing the application’s source files<br />

and to the output folder, your company information to be written to the application modules, and so on.<br />

You can create, view, edit and delete these constants in the Constants dialog. To call this dialog, select<br />

Variables | Constants from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s main menu or Edit Script Form menu.<br />

When creating a constant, keep in mind the following:<br />

• Since constant names are used to address constants in scripts, the constant name must match the<br />

naming rules used in the scripting language you chose for the script. To make the constant name<br />

suitable for any supported scripting language, follow this simple rule when naming a constant: a<br />

name can include only letters, digits and underscores and must begin with a letter.<br />

• Variables and constants use the same namespace, so you cannot create an ordinary constant that<br />

has the same name as a system constant, environment variable or an existing global or stored<br />

macro variable.<br />

As already mentioned, constant values cannot be changed during the macro run. You can only modify<br />

ordinary constants at design time. Note that the values of ordinary constants are stored in the macro file, so<br />

they are computer-independent.<br />

Ordinary constants can have the Environment attribute, which defiles how a constant is used. All<br />

constants that have this attribute set will be passed to the applications launched by the macro. For example,<br />

they will be passed to the process that is launched by the Execute Program operation. Such constants will<br />

serve as environment variables for that process. Do not confuse such constants with environment variables.<br />

The latter return values of the corresponding Windows environment variables.<br />

System Constants<br />

System constants<br />

specify paths to applications installed on the computer and provide information about<br />

the current macro<br />

file. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> loads values of system constants at startup. These values can<br />

neither be changed<br />

in <strong>Build</strong> <strong>Studio</strong> nor at runtime.<br />

The main purpose of system constants is to make macros easier and portable. For example, if your macro<br />

somehow utilizes the path to the folder where the macro file resides, you<br />

can use the<br />

ABSOPENEDPROJECTDIR constant to obtain this path, so that you will not have<br />

to change anything in<br />

your macro in order for it to be successfully run from another folder.<br />

To vie w what system constants are available to you, use the<br />

System Constants dialog. To call this dialog,<br />

select Variables | System Constants from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’ main menu or Edit Script Form menu.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Variables and Constants in Macros<br />

Note:<br />

If a system constant gets modified on the computer where you are running <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>, <strong>Build</strong> <strong>Studio</strong> will see the change only after you restart it.<br />

Creating Variables and Constants and Modifying Their<br />

Attributes<br />

Creating a global variable<br />

• Select Variables | Variables from <strong>Build</strong> <strong>Studio</strong>’s main menu or <strong>Build</strong> <strong>Studio</strong> | Variables |<br />

Variables from Visual <strong>Studio</strong>’s main menu. If the Edit Script Form is currently opened, select<br />

Variables | Variables from its menu. The Variables dialog will appear:<br />

• In the dialog:<br />

Press the Add button. This will append an empty line to the variables list.<br />

Enter the variable name into the Name column and, if needed, specify the initial value in the<br />

Default Value column and check the Environment or Thread-Relative boxes to enable the<br />

corresponding attributes for the variable. For more information on these attributes, see<br />

Variables and Constants - Overview.<br />

Optionally, you can supply a variable with a description. To do this press the Description<br />

button and enter the description in the ensuing dialog.<br />

Press OK to save changes.<br />

Using the Variables dialog you can also remove ordinary variables and modify their properties: just call<br />

the dialog and then press the Delete or Edit button.<br />

Creating a local variable<br />

• In the Macro panel, select the Group, Dependent Group or Submacro operation in which you<br />

want to define a local variable.<br />

• Double-click the operation, or select Properties<br />

from the operation’s context menu. This will<br />

open the Operation Properties dialog.<br />

• In the Group or Dependent Group properties dialog, switch to the Local Variables tabbed page.<br />

In the Submacro properties dialog, go to the Variables page.<br />

• Press the Add button.<br />

This will append the empty line to the local variables list.<br />

• Enter the variable name and, if needed, specify the default value<br />

the variable (see Variables and Constants - Overview).<br />

97<br />

and the thread-relative flag for<br />

• Optionally, you can specify the description for the variable. To do this, press the Description<br />

button and enter the description in the ensuing dialog.<br />

• Press OK to save the changes.<br />

To dele te local variables or modify them, open the Group or Submacro operation properties,<br />

select the<br />

desired local variable and press Delete or Edit.<br />

Creating a stored variable<br />

• Select Variables | Stored Variables from <strong>Build</strong> <strong>Studio</strong>’s main menu or <strong>Build</strong> <strong>Studio</strong> |<br />

Variables | Stored Variables from Visual <strong>Studio</strong>’s main menu. If the Edit Script Form is<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com


98<br />

Using Variables and Constants in Macros<br />

currently opened, select Variables | Stored Variables from its menu. The Stored Variables<br />

dialog will appear:<br />

• In the dialog:<br />

Press the Add button. This will append an empty line to the variables list.<br />

Enter the variable name into the Name column and, if needed, specify the default value in<br />

the Value column and check the Environment box to set the variable’s environment<br />

attribute. For more information on this attribute, review the Variables and Constants -<br />

Overview.<br />

Optionally, you can supply a variable with a description. To do this press the Description<br />

button and enter the description in the ensuing dialog.<br />

Press OK to save changes.<br />

Using the<br />

Stored Variables dialog you can also remove stored variables and modify their properties: just<br />

call the dialog<br />

and then press the Delete or Edit button.<br />

Note: Variables and constants share the same namespace, so you are not allowed<br />

to create a global,<br />

local or stored variable whose name coincides with the name of an<br />

environment variable,<br />

system constant or existing macro variable or constant.<br />

We would like to note that since variables can be used in scripts, the<br />

variable name must be a<br />

valid identifier for the selected scripting language. To make the variable name suitable for any<br />

supported scripting language, follow this simple rule: a variable name can include only<br />

letters,<br />

digits and underscores and must begin with a letter.<br />

Viewing environment variables<br />

Environment variables cannot be created or deleted. To check<br />

what environment variables exist and to<br />

check the ir values, use the Environment Variables dialog. To call this dialog, select Variables |<br />

Environme nt Variables from the main menu of <strong>Build</strong> <strong>Studio</strong> (if it is running as a standalone application) or<br />

select <strong>Build</strong> <strong>Studio</strong> | Variables | Environment Variables from Visual <strong>Studio</strong>’s main menu (if <strong>Build</strong> <strong>Studio</strong><br />

is integrated into Visual <strong>Studio</strong>).<br />

Creating an ordinary constant<br />

• Select Variables | Constants from <strong>Build</strong> <strong>Studio</strong>’s main menu or <strong>Build</strong> <strong>Studio</strong> | Variables |<br />

Constants from Visual <strong>Studio</strong>’s main menu. If the Edit Script Form is currently opened, select<br />

Variables | Constants from its menu. The Constants dialog will appear:<br />

• In the dialog:<br />

Press the Add button. This will append an empty line to the variables list.<br />

Enter the variable name into the Name column,<br />

specify the constant value in the Value<br />

column and check the Environment box to set the constant’s environment<br />

attribute (if<br />

needed). For more information on this attribute, see Variables and Constants - Overview.<br />

Optionally, you can supply a constant with a description. To do this press the Description<br />

button and<br />

enter the description in the ensuing dialog.<br />

Press OK to save changes.<br />

Note: Constants and variables share the same namespace, so you cannot create an ordinary constant<br />

whose name coincides with the name of a system constant, environment variables or existing<br />

macro variable.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Variables and Constants in Macros<br />

We would like to note that since constants can be used in scripts, the constant name must be a<br />

valid identifier for the selected scripting language. To make the variable name suitable for any<br />

supported scripting language, follow this simple rule: a variable name can include only letters,<br />

digits and underscores and must begin with a letter.<br />

Viewing system constants<br />

System constants cannot be created or deleted. To check what system constants exist and to check their<br />

values, use the System Constants dialog. To call this dialog, select Variables | System Constants from the<br />

main menu of <strong>Build</strong> <strong>Studio</strong> (if it is running as a standalone application) or select <strong>Build</strong> <strong>Studio</strong> | Variables |<br />

System Constants from Visual <strong>Studio</strong>’s main menu (if <strong>Build</strong> <strong>Studio</strong> is integrated into Visual <strong>Studio</strong>).<br />

Using Variables and Constants in Operation Properties<br />

You ca n use variables and constants in almost any operation property. One of the common tasks for them<br />

is to store t he file name, build number or specify the file path. The way you specify a variable or constant<br />

name depends on the purpose of the variable (constant).<br />

If y ou use a variable or<br />

constant to specify a property value, you should enclose the variable<br />

(constant) name with the % signs. Otherwise, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will treat the variable (constant) name<br />

as a string value. For instance, on the following figure we use the MyProjectName variable to specify<br />

the<br />

Visual Basic<br />

project to be compiled:<br />

Note: To specify the % character in the property value, use the %%% string. For instance, if you<br />

specify %%%temp%%%, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will use the string %temp%, but not the<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

99


100<br />

value of the temp variable.<br />

Using Variables and Constants in Macros<br />

Note that you need to replace the % character with %%% only in those cases, when the string<br />

value can be considered as a variable name. Otherwise, you can use a single % character. For<br />

instance, in the string Use % to separate values you can use the single percent character<br />

since<br />

% is surrounded by spaces.<br />

If you use a variable<br />

to save an operation result (for example, to save a file name returned by the File<br />

Enumerator operation),<br />

you should not use the % signs:<br />

To concatenate values of two or more variables or constants, simply put them one after another. For<br />

instance, if one variable holds the file name and another one holds the file path, the following string will<br />

return the entire file name:<br />

%File_Path_Var%%File_Name_Var%<br />

If you need to specify a slash between the path and file name, and the disk name before the path, enter<br />

the following:<br />

c:\%File_Path_Var%\%File_Name_Var%<br />

Note that we do not use pluses to concatenate variables (constants) and strings and do not specify spaces:<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> treats pluses and spaces as characters, so we would obtain an invalid path. If you<br />

concatenate variables and strings in scripts, you must use pluses, of course.<br />

You can concatenate two or more constants in the same way you concatenate variables. You can also<br />

concatenate constants with variables and strings.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Variables and Constants in Macros<br />

Using<br />

Variables and Constants in Script Operations<br />

You can set the value of a variable in your macro either by using the Set\Reset Variable Value operation<br />

in your macro, or by writing a script (the stored variables can also be changed in the Stored Variables<br />

dialog). Using the Set\Reset Variable Value operation is simple and does not require<br />

explanations. Changing<br />

variables from scripts is also simple, but it is not evident,<br />

that is why we will tell you more about this.<br />

From the script’s point of view, macro variables are public variables that are visible within the entire<br />

macro. To address<br />

a global, local, stored or environment variable, use the following syntax:<br />

Variables.variable_name = value<br />

Using the<br />

Variables.variable_name format when referring to the macro’s variables allows you to<br />

avoid confu sing variable names if your script holds local variables that are declared using the same names.<br />

To address an ordinary or a system constant, use the Constants object:<br />

LocalVar = Constants.constant_name<br />

Note that<br />

you can also address environment variables through the Constants object (see below). This<br />

feature is supported for backward compatibility only. We recommend that you address environment variables<br />

through the Variables object.<br />

LocalVar = Constants.environment_variable_name<br />

We would like to note once again that since variables<br />

and constants can be used in scripts, their names<br />

must comply<br />

with the naming rules of the selected scripting language. To make the name suitable for any<br />

supported scripting<br />

language, follow this simple rule: a variable name can include only letters, digits and<br />

underscores and must begin with a letter.<br />

Macro variables cannot be used as loop variables in scripts. A loop variable should be a local<br />

script<br />

variable.<br />

Also, macro variables cannot be used to store object references. They can only store ordinary<br />

values: numbers, strings, dates and so on.<br />

To change the<br />

value of a macro variable, you can either assign the desired value to the variable directly,<br />

or use the ABSUtils.SetVariableValue method:<br />

ABSUtils.SetVariableValue("variable_name", value, for_all_configs)<br />

The difference<br />

from this method and the usual assignment operation is that, depending on the last<br />

parameter ( for_all_configs) it only changes the variable value in the current configuration or in all of the<br />

macro configurations<br />

at once. The latter can be useful when modifying values of stored variables.<br />

A similar method, ABSUtils. ResetVariableValue, lets you reset a macro variable to its default<br />

value. As you<br />

may notice, these two methods are scripting analogues of the Set/Reset Variable Value<br />

operation.<br />

To concatenate<br />

values of two or more variables or constants in scripts, use the language-specific syntax.<br />

For instance,<br />

the following script assigns the full path to a file to a variable. The path is concatenated from<br />

the path to the file's folder and the name of the file, which are also stored in variables.<br />

[VBScript]<br />

Variables.FolderPath = "C:\Work"<br />

Variables.FileName = "myfile.txt"<br />

Variables.FilePath = Variables.FolderPath & "\" & Variables.FileName<br />

[JScript]<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

101


102<br />

Variables.FolderPath = "C:\\Work";<br />

Variables.FileName = "myfile.txt";<br />

Variables.FilePath = Variables.FolderPath + "\\" +<br />

Variables.FileName;<br />

[DelphiScript]<br />

Variables.FolderPath := 'C:\Work';<br />

Variables.FileName := 'myfile.txt';<br />

Variables.FilePath := Variables.FolderPath + '\' +<br />

Variables.FileName;<br />

Using Variables and Constants in Macros<br />

If you want to concatenate values of variables and constants using the syntax that is acceptable when<br />

specifying operation property values via the Operation Properties dialog, use the<br />

ABSUtils.TranslateExpression method in your scripts. For example:<br />

[VBScript]<br />

Variables.FolderPath = "C:\Work"<br />

Variables.FileName = "myfile.txt"<br />

Variables.FilePath =<br />

ABSUtils.TranslateExpression("%FolderPath%\%FileName%")<br />

[JScript]<br />

Variables.FolderPath = "C:\\Work";<br />

Variables.FileName = "myfile.txt";<br />

Variables.FilePath =<br />

ABSUtils.TranslateExpression("%FolderPath%\\%FileName%");<br />

[DelphiScript]<br />

Variables.FolderPath := 'C:\Work';<br />

Variables.FileName := 'myfile.txt';<br />

Variables.FilePath :=<br />

ABSUtils.TranslateExpression('%FolderPath%\%FileName%');<br />

Initializing<br />

Variables via Command Line<br />

Using the command line interface of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, you can not only run a macro<br />

but also set<br />

app ropriate values to custom variables that exist in the macro. To do the latter, use the / or - argument. Its<br />

format is either /variable_name=variable_value or -variable_name=variable_value,<br />

where variable_name<br />

and variable_value correspond to the name of the desired<br />

variable and the value you wish to assign to it.<br />

Two notes:<br />

•<br />

Only global and stored macro variables can be initialized via the command line.<br />

• Variable initialization<br />

via the command line requires that the /Run or /RunAndExit arguments be<br />

used.<br />

For instance, the following<br />

command line sets 10 as the value of the IterationNum variable:<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe MyMacro.bbp /ns /RunAndExit<br />

/IterationNum=10<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Using Variables and Constants in Macros<br />

Since <strong>Build</strong><br />

<strong>Studio</strong>’s command line interface admits several / (-) arguments in one line, you can initialize<br />

as many variables<br />

as you want. If the string you wish to pass as a value of the specified variable includes<br />

spaces, enclose<br />

this string in double-quotes, as shown in the example below:<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe MyMacro.bbp /RE /Version=1.0.1 -<br />

ReportFileDir="C:\My Projects\Temp"<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

103


104<br />

Macro Libraries<br />

Macro Libraries<br />

About Libraries<br />

Macro Libraries<br />

If you have<br />

several macros for building different products, they may include identical operation blocks<br />

and submacros. For example, each<br />

of your build macros may contain a group of operations that archive the<br />

applicat ion’ s source files and move this archive to a backup storage. Or, a submacro that sends notifications<br />

on successful or failed build. Such duplicated blocks may be quite tedious to maintain when it comes to<br />

making changes<br />

in them. To avoid operation duplications in different macros and make it easier to manage<br />

common submacros<br />

and operation blocks, you can make use of libraries.<br />

Libraries (or library macros) are special macros that provide collections of submacros to be called from<br />

other macros. These submacros, called library submacros, can contain operation blocks that are common to<br />

various macros you use. Library submacros can be run from other macros by using<br />

a single Run Library<br />

Submacro operation, instead of repeating the submacro<br />

operations in each macro where you need them. Like<br />

ordinar y submacros, library submacros can have input and output parameters, which allows you to<br />

parameterize the submacro operations and return results for the parameters given. In this way, libraries<br />

enable the reuse<br />

of the same operations in different macros.<br />

In most respects, libraries are similar to ordinary macros. For example, they can define global variables<br />

and constants, which are visible to all operations within the library; they can use scripts to automate specific<br />

actions and so on. However, besides common macro properties, each library must specify the submacros that<br />

it “exports” to other macros. Only exported submacros are “visible” to other macros and can be run from<br />

them.<br />

All libraries are stored in a dedicated folder. To be able to create and use libraries, you need to specify<br />

the path to thi s folder in <strong>Build</strong> <strong>Studio</strong>’s Library path option. This folder can reside on a local disk drive, or it<br />

can be a shared network folder. The latter can be useful if you use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on several<br />

computers – in this case, all <strong>Build</strong> <strong>Studio</strong> instances<br />

in your network will be able to access the libraries.<br />

Note: It is possible to only create and work with libraries<br />

in the standalone version of <strong>Automated</strong><br />

<strong>Build</strong> Stud io. The version that integrates into<br />

Microsoft Visual <strong>Studio</strong> does not support working<br />

with libraries.<br />

However, to create macros that call library submacros, you can use the standalone as well as the<br />

integrated version of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Working <strong>With</strong> Libraries<br />

To create a new library<br />

To create<br />

a new library macro, select File | New | New Macro in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Macro Libraries<br />

To open an existing library<br />

To loa d an existing library in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>:<br />

• Select File | Open Library from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu.<br />

• In the ensuing Select Library dialog, choose the desired library and press OK.<br />

To<br />

specify the exported submacros<br />

To specify<br />

which submacros the library “exports” to other macros:<br />

• Select File | Macro Properties from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu.<br />

• In the ensuing Macro Properties dialog, switch to the Exported<br />

Submacros page.<br />

• Add the desired submacros to the list<br />

of exported submacros.<br />

To save a library<br />

Bef ore saving the macro as a library, make sure you have specified the list of submacros it exports. Once<br />

you have done it, File | Save Library from <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> main menu, enter the library name and<br />

press OK. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will save the library under this name to the folder specified by the<br />

Library<br />

Path option.<br />

To save the changes you have made to the library, use the File | Save command of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> main menu, the Save button on the Standard toolbar or the Ctrl+S shortcut.<br />

To call a library submacro from a macro<br />

To call library submacros in your macro, use the Run Library Submacro operation. In the operation<br />

properti es, specify the name of the library that contains the desired submacro, the submacro name<br />

as well as<br />

input pa rameter values for the submacro and variables to store the submacro’s output parameters.<br />

Example<br />

For a step-through illustrated tutorial on creating libraries and calling library<br />

submacros from external<br />

macros, se e Using a Library - Example.<br />

Using<br />

a Library – Example<br />

This step-by-step tutorial explains how to create libraries<br />

and how to call library submacros in your<br />

macros.<br />

We are going to create a sample library containing one submacro, which posts an informative<br />

message to the log (the message text will be passed to the submacro as the input parameter). Then we will<br />

create a macro that calls the library submacro and see<br />

the results of the macro execution.<br />

All library macros must be stored in a special folder. So, before creating the library, we need to specify<br />

the path to this folder in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> settings. To do this:<br />

• Select<br />

Options | Options from the main menu of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

• In the resulting Options dialog, select the General | Libraries category from the tree on the left.<br />

• Enter the path<br />

to the library storage in the Library path edit box, or click the ellipsis button on<br />

the right of the field and browse for the needed folder.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

105


106<br />

• Press OK to save the changes and close the Options dialog.<br />

Now we can create a new library macro. You can do this in any of the following ways:<br />

• Select File | New | New Macro from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu.<br />

• Press New on the Standard toolbar and select New Macro from the drop-down menu.<br />

• Press Shift-Ctrl-N.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will create an empty macro. Let’s create a submacro in it:<br />

• Add a Submacro operation to the macro.<br />

Macro Libraries<br />

• To configure the submacro properties, right-click the Submacro operation in the Macro panel<br />

and select Properties from the context menu, or simply double-click the operation.<br />

Switch to the Properties tabbed page and enter the LogMessage into the Unique Name<br />

field. This name will be used by external macros to call the submacro.<br />

Optionally, you can enter a brief description of the submacro in the Description field. This<br />

information will be displayed to the library users when they select library the submacro to be<br />

run.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Macro Libraries<br />

To define the submacro parameters, switch to the Parameters page of the submacro’s<br />

properties dialog. Our submacro will take only one input parameter - the text to be posted to<br />

the log. To define this parameter, press Add, then enter Message in the Parameter Name<br />

column and make sure that the Parameter Type is set to In:<br />

Press OK to save the changes and close the Submacro<br />

properties.<br />

• Add a child Log Message operation to the submacro.<br />

• Double-click the operation to open<br />

its properties.<br />

• To specify that the operation<br />

should use the submacro’s input parameter as the message text, do<br />

any of the following:<br />

Enter %Message% in the Message Text field.<br />

Press Add<br />

category.<br />

Variable and select the Message variable from the Input Submacro Parameters<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

107


108<br />

•<br />

Press OK to close the Log Message properties.<br />

Macro Libraries<br />

In order for the created submacro<br />

to be accessible from other macros, the library must “export” it. To<br />

configure the library’s exported submacro<br />

list:<br />

• Select File | Macro<br />

Properties from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu. The Macro Properties<br />

dialog appears.<br />

• Switch to the Exported Submacros tabbed page and press Add.<br />

• In the ensuing dialog, select LogMessage from the Submacro list and press OK.<br />

•<br />

Optionally, you can specify the description for the library, for example, information about the<br />

submacros it contains and what they are<br />

for. To do this, switch to the Comments page of the<br />

Macro Properties dialog and enter the library information into the Comments field:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Macro Libraries<br />

•<br />

Other users will see this description in the list of available libraries, so that it is easier for them to<br />

understand what library contains the needed submacro.<br />

The library<br />

configuration is finished. To save the library to the library storage:<br />

•<br />

•<br />

Press OK to save the changes and close the Macro Properties dialog.<br />

Select File | Save Library from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu.<br />

In the ensuing dialog, enter the SampleLibrary name and press OK.<br />

Now let’s create a macro that will call the LogMessage submacro from our library:<br />

• Create a new macro file.<br />

• Add a Run<br />

Library Submacro operation to the macro.<br />

•<br />

Double-click the operation to open its properties.<br />

• In the Library Name field, enter SampleLibrary. Or, you can press the ellipsis button on the<br />

right of the Library Name field and choose the library visually:<br />

• Enter LogMessage in the Submacro Name field, or press the ellipsis button and select the<br />

LogMessage submacro from<br />

the ensuing dialog:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

109


110<br />

Macro Libraries<br />

• Once you have entered the submacro name, the operation loads the submacro’s parameters list.<br />

Our submacro uses only one input parameter - Message. Enter the Hello, world! value for this<br />

parameter:<br />

• Make sure that the Export log property is checked. This is needed to include the log of the<br />

library submacro into the current macro log.<br />

• Press OK to save the changes and close the Run Library Submacro operation properties.<br />

•<br />

Finally, we can run the macro and see how it will work. To run the macro, do any of the following:<br />

•<br />

•<br />

•<br />

Save the macro.<br />

Select Run | Run from the main menu of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Press the Run Macro button on the Standard toolbar.<br />

Press F5.<br />

When the macro run finishes, you will get the log like shown on the image below. As you<br />

can see, it<br />

includes information about all operations performed by the library submacro, like it was a part of the macro:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

Integration<br />

<strong>With</strong> Microsoft Visual <strong>Studio</strong> and<br />

MS<strong>Build</strong><br />

Overview<br />

Microsoft Visual <strong>Studio</strong> includes tools and technologies for all members of software development teams:<br />

project architects, developers, testers and managers. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrates with and supports<br />

these tools giving developers and project managers the possibility to –<br />

• Create, configure and run <strong>Build</strong> <strong>Studio</strong> macros directly from Visual <strong>Studio</strong>’s user interface as<br />

you would in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> when it is running as a standalone application.<br />

For this<br />

purpose, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> panels and toolbars are incorporated into Visual <strong>Studio</strong> and the<br />

main menu of Visual <strong>Studio</strong> is extended with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>-specific items.<br />

• Extend your Visual <strong>Studio</strong> projects and team system builds with <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong><br />

macros.<br />

•<br />

Run <strong>Build</strong> <strong>Studio</strong> macros directly from your MS<strong>Build</strong> projects.<br />

You can also compile<br />

Visual <strong>Studio</strong> projects, run MSTest unit tests, work with files stored in Visual<br />

SourceSafe and Team Foundation Source Control and manage Team Foundation work items as a part of your<br />

<strong>Build</strong> <strong>Studio</strong> macros using special macro operations. This way, you can take advantage of features provided<br />

by both Visual <strong>Studio</strong> and <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and make your build and release process flexible and<br />

powerful.<br />

Note for Visual <strong>Studio</strong> Team System users: To work with Visual <strong>Studio</strong> Team System, <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> uses a special assembly that is installed during the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> installation. The<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> installation program automatically determines the Team System version you have<br />

and installs the assembly that works with this version.<br />

If you have both Team System 2005 and 2008, <strong>Build</strong><br />

<strong>Studio</strong> will include the assembly that works with Team System 2005. The assembly that provides support for<br />

one Team System version does not work with other versions; for instance, the assembly for Team System<br />

2005 does not support Team System 2008, and vice versa.<br />

If you install or remove Visual <strong>Studio</strong> Team System or Team Explorer from your computer<br />

while having<br />

<strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> installed, you should reinstall <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> as well. This will let<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> determine the current Team System and Team Explorer version and install the<br />

appropr iate assembly that works with<br />

this version.<br />

Integration<br />

<strong>With</strong> Microsoft Visual <strong>Studio</strong><br />

Automa ted <strong>Build</strong> <strong>Studio</strong> can be tightly integrated into in the Microsoft Visual <strong>Studio</strong> IDE. Currently,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> extends Microsoft Visual <strong>Studio</strong> .NET 2002, Visual <strong>Studio</strong> .NET 2003, Visual<br />

<strong>Studio</strong> 2005 and Visual <strong>Studio</strong> 2008. This integration provides developers with full control over <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> without leaving the IDE.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

111


112<br />

Note:<br />

Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

Currently, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> does not integrate into Visual <strong>Studio</strong> 2008. However,<br />

<strong>Build</strong> <strong>Studio</strong> includes operations that let you compile Visual <strong>Studio</strong> 2008 projects,<br />

manage<br />

Team Foundation 2008 work items and work with files stored in Team Foundation 2008<br />

Source Control from your build macros. See Operations Reference.<br />

The integration<br />

with Visual <strong>Studio</strong> means:<br />

• <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> panels (Macro,<br />

Summary, Operations and others) are integrated<br />

into Visual <strong>Studio</strong>’s IDE. When you open an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro in Visual <strong>Studio</strong>,<br />

the layout of the Visual <strong>Studio</strong> panels and windows are extended with <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>-<br />

specific panels. When an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro is closed, these panels are<br />

automatically hidden within Visual<br />

<strong>Studio</strong>.<br />

• A new <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> project type is added. You can create <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> macros or add them to an existing Visual <strong>Studio</strong> solution the same way that you create or<br />

add other VS projects; by using the Create Project and Add New Project dialogs of<br />

Visual<br />

<strong>Studio</strong>. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros are displayed in the Solution Explorer along with<br />

other<br />

Visual <strong>Studio</strong> projects.<br />

• <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrates its menus and toolbars into the Visual <strong>Studio</strong> IDE.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> adds the following menu items and toolbars to Visual <strong>Studio</strong>’s menu<br />

and toolbar system:<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> adds the <strong>Build</strong> <strong>Studio</strong> menu to Visual <strong>Studio</strong>’s main menu. This<br />

menu contains commands to start, pause and resume<br />

macro runs, modify panel options,<br />

schedule macro runs, and so on.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also adds the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar<br />

to Visual <strong>Studio</strong>.<br />

This toolbar contains the most frequently used commands: Run, Check Macro, Task<br />

Scheduler, and others.<br />

To enhance the functionality of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and reduce the duplication of<br />

commands, shared commands are widely used. For example, most of the standard commands<br />

(Select All, Delete, Print, Find, and others) are also applicable to the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> panels.<br />

• <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrates into Microsoft Visual <strong>Studio</strong> Team System. <strong>Build</strong> <strong>Studio</strong><br />

associates a macro with each team project. You can use this macro to build projects and<br />

solutions that make up your team project, or to perform any other actions. To manage the macro<br />

and macro runs, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> adds a new <strong>Automated</strong><strong>Build</strong><strong>Studio</strong><br />

node type to all<br />

team projects. For more information, see Running <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Macros From Visual<br />

<strong>Studio</strong><br />

Team Explorer.<br />

• <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> contributes to the Automation Model. The automation model of<br />

Visual <strong>Studio</strong> provides users with the ability to create custom add-ins, wizards, and<br />

to work with<br />

macros. As a true VS-integrated product, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> provides program interfaces<br />

for its internals. This allows third-party developers to create Visual <strong>Studio</strong> add-ins, wizards and<br />

macros<br />

that use <strong>Build</strong> <strong>Studio</strong>’s object model.<br />

• <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> integrates into the Visual <strong>Studio</strong> Help system. F1 context-sensitive<br />

Help<br />

is provided for all <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> panels, dialogs and project items. The Dynamic<br />

Help window provides a list of help topics specific to the current <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

context or task you are currently working on.<br />

• Further<br />

integration with Visual <strong>Studio</strong>. In addition to the core integration, <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong><br />

supports advanced integration that displays product information in the About dialog box<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

and<br />

on the splash screen, Properties window support, integration into Visual <strong>Studio</strong>’s Start Page,<br />

and more.<br />

Running <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Macros From MS<strong>Build</strong><br />

Projects<br />

The <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> package for integration with Microsoft Visual <strong>Studio</strong> 2005 includes the<br />

MS<strong>Build</strong>ABSTask.dll<br />

assembly. This assembly lets you call <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros from your<br />

MS<strong>Build</strong> projects.<br />

The package<br />

can be installed on the computer where Microsoft Visual <strong>Studio</strong> 2005 Team System is<br />

installed. To<br />

install the package, select Program Files | <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> & Server | Integration<br />

into Microsoft<br />

Visual <strong>Studio</strong> | Visual <strong>Studio</strong> 2005 when installing <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on your<br />

computer. The<br />

installation program automatically registers the assembly in the global assembly cache<br />

(GAC).<br />

Below is a typical example of executing an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro from an MS<strong>Build</strong> project:<br />

File: MSBUILD.proj<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

< ExecuteMacro<br />

MacroFile="C:\Program Files\MyMacroFileName.bxp"<br />

Configuration="Release; Debug"<br />

StopIfFail="true"<br />

AdditionalOptions=""<br />

/><br />

<br />

<br />

The example i s simple, but it demonstrates two key points in calling an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro<br />

from an MS<strong>Build</strong> project:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

113


114<br />

Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

• Registration. In order to run <strong>Build</strong> <strong>Studio</strong><br />

macros from sample MS<strong>Build</strong> projects, you should<br />

registe r a special task type. The registration is done<br />

via the UsingTask element whose attributes<br />

specify the task<br />

name and the name of the assembly that will perform the task. You should<br />

always register the task type before using it in an MS<strong>Build</strong> project. The registration string should<br />

always be the same as it is specified in the sample. You can copy the UsingTask string and paste<br />

it to your MS<strong>Build</strong> project file. Do not modify<br />

this string in your MS<strong>Build</strong> project file.<br />

• Execution. Upon registering the task type, you can use the ExecuteMacro element to initiate<br />

execution<br />

of the desired <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macro. To do this, use the ExecuteMacro<br />

element. The UsingTask element associates ExecuteMacro with the assembly that will<br />

perform<br />

the tas k.<br />

The attributes of ExecuteMacro specify the macro name and run parameters:<br />

Attribute Description<br />

MacroName [in] The full path and name of the macro file to be executed.<br />

Configuration [in] A string holding<br />

the configuration name(s) that will be used to<br />

execute a macro. If you specify several configurations, the macro will be<br />

executed in series, one time for each specified configuration.<br />

To separate<br />

multiple<br />

configuration names, use semicolons.<br />

StopIfFail [in] Indicates whether MS<strong>Build</strong><br />

run will fail if <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

macro run fails.<br />

AdditionalOptions<br />

[in] A string of command-line arguments that are passed to <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> along with the macro file name.<br />

For more information on<br />

supported command-line arguments, see Command-Line Arguments.<br />

Succeeded<br />

[out] Returns true if the macro execution was successful, or false<br />

otherwise. The following code demonstrates a typical use of this<br />

parameter:<br />

<br />

<br />

<br />

For more information on using the [out] parameters, see MS<strong>Build</strong><br />

documentation.<br />

Running <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Macros From Visual <strong>Studio</strong><br />

Team Explorer<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is tightly integrated with the Team Explorer panel of Microsoft Visual <strong>Studio</strong><br />

2005 and Microsoft Visual <strong>Studio</strong> 2008, allowing you to run macros directly from Team Explorer.<br />

About Integration <strong>With</strong> Team Explorer<br />

Team Explorer provides an organized view of work items, documents,<br />

team builds and reports stored in<br />

the Team Foundation database's<br />

project portal. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> associates a macro with each team<br />

pro ject. You can use this macro to build projects and solutions that are included in your team project, or to<br />

perf orm any other task you need. To manage the macro and macro run, <strong>Build</strong> <strong>Studio</strong> adds a new node -<br />

<strong>Automated</strong> <strong>Build</strong><strong>Studio</strong> - to each team project node displayed in Team Explorer:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

The <strong>Automated</strong><strong>Build</strong><strong>Studio</strong> node holds two sub-nodes: Macro File and Macro Runs. The Macro File<br />

node<br />

provides access to the <strong>Build</strong> <strong>Studio</strong> macro associated with the project. You can run this macro directly<br />

from Team Explorer and view macro run results in Visual <strong>Studio</strong>. The Macro Runs node is used to initiate<br />

and monitor macro runs and to view the macro run results and history.<br />

Requirements The Team<br />

Explorer integration package of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> consists of two parts: server and<br />

client. The server includes special assemblies that are installed on the Team Foundation server computer. The<br />

client pa rt contains assemblies that act on the computer, where you<br />

are working with Team Explorer.<br />

To use t he integration:<br />

•<br />

Install <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on the computer that has Microsoft Visual <strong>Studio</strong> 2005 or 2008<br />

Team Foundation server installed. When installing <strong>Build</strong> <strong>Studio</strong>, select Program Files |<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> & Server | Team Foundation Server Extension item<br />

in the<br />

installation wizard.<br />

• Install <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on the computer that has Microsoft Visual <strong>Studio</strong> 2005 (or 2008)<br />

with Team Explorer installed. When installing, select Program Files | <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

& Server | Integration into Microsoft Visual <strong>Studio</strong> | Visual <strong>Studio</strong> 2005 (or 2008) | Team<br />

Explorer Integration item in the <strong>Build</strong> <strong>Studio</strong> installation wizard.<br />

If both Team Explorer 2005 and Team Explorer 2008 are installed on your computer, <strong>Build</strong><br />

<strong>Studio</strong> will include the assembly that works with Team Explorer 2005.<br />

We recommend that you install the server before installing the client. This should be done<br />

because Visual <strong>Studio</strong>'s client stores information about available Team Foundation servers<br />

in special cache files located on the client computer. The server part of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>’s Team Explorer integration package is installed as a Team Foundation server addon.<br />

If the cached files do not contain information about the add-on, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

will not be able to integrate into Team Explorer.<br />

If the cache is empty, Visual <strong>Studio</strong> will populate it with appropriate data upon starting.<br />

<strong>Build</strong> <strong>Studio</strong>’s installation program clears the cache thus providing automatic cache update<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

115


116<br />

Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

upon Visual <strong>Studio</strong> starts. That is why we recommend that you install the client after the<br />

server. If the client is installed prior to the server, the clearing operation will have no effect.<br />

Note that you can clear the client cache manually. To do this, perform the following<br />

operations on the client computer.<br />

• Close Visual <strong>Studio</strong>.<br />

• Delete the following folder:<br />

%USERPROFILE%\Local Settings\Application Data\Microsoft\Team<br />

Foundation\1.0\Cache<br />

• Launch Visual <strong>Studio</strong> and add the desired Team Foundation server to the list of<br />

available servers.<br />

Modifying an Associated Macro<br />

<strong>Build</strong> <strong>Studio</strong> automatically creates and associates a macro with each team project. To view or modify<br />

this macro:<br />

• Right-click the | <strong>Automated</strong><strong>Build</strong><strong>Studio</strong> | Macro File node in Team Explorer<br />

and select Open from the context menu.<br />

– or –<br />

• Double-click the Macro File node in Team Explorer.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will display the Macro Editor window holding operations of the associated<br />

macro. You can add operations to this macro, modify operation properties and perform other actions as you<br />

would normally do.<br />

Note: Note that the associated macros are executed on the server side, so specify the appropriate<br />

file paths in the operation properties and macro variables.<br />

To save changes made to the macro, select File | Save from the Visual <strong>Studio</strong> menu or click Save on the<br />

Standard toolbar. This will automatically upload the macro to the server.<br />

To upload an existing macro to the server:<br />

• Right-click the | <strong>Automated</strong><strong>Build</strong><strong>Studio</strong> | Macro File node in the Team Explorer.<br />

• Select Upload from the context menu. This will call the Open File dialog.<br />

• Select the desired macro file in the dialog and press OK. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will upload<br />

the selected macro to the server.<br />

Running the Macro<br />

Macros associated with team projects are executed on the server side (that is, they are executed on the<br />

computer where the Team Foundation Server is installed.<br />

You can start the associated macros in one of the following ways:<br />

• Expand your project’s node in the Team Explorer.<br />

• Right-click the <strong>Automated</strong><strong>Build</strong><strong>Studio</strong> node and select Run from the context menu.<br />

– or –<br />

• Open the Macro Run window (you can do this by right-clicking the |<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong> | Macro Runs node in Team Explorer and selecting Open from the<br />

context menu, or by double-clicking this node in Team Explorer).<br />

• Press Run on the toolbar of the Macro Run window.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will run the macro and add results to the Macro Runs window after the run is<br />

over (see the Viewing Results section below).<br />

Note: The Macro Runs window is not updated automatically, so to check whether the macro run is<br />

over, click Refresh on the window’s toolbar.<br />

To stop the macro run, right-click the | <strong>Automated</strong><strong>Build</strong><strong>Studio</strong> node in Team Explorer<br />

and select Stop from the context menu.<br />

Note: If you open the macro for editing (see the previous section) and run the macro from the<br />

editor by pressing Run, Run From Selected, Run Selected or Run Selected<br />

<strong>With</strong> Children on the editor’s toolbar, the macro will be ran on your computer, but not on<br />

the server side. The results of these runs are not added to the Macro Runs window.<br />

Viewing Results<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> keeps a log of all macro runs associated with team projects. To view macro run<br />

results, right-click the | <strong>Automated</strong><strong>Build</strong><strong>Studio</strong> | Macro Runs node in the Team Explorer<br />

and select Open from the context menu, or double-click this node in Team Explorer. This will open the<br />

Macro Runs window in Visual <strong>Studio</strong>’s IDE:<br />

This windo w displays information about macro runs in the following columns:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

117


118<br />

Column Description<br />

Integration <strong>With</strong> Microsoft Visual <strong>Studio</strong> and MS<strong>Build</strong><br />

Name Name of the run (this name includes the team project name along with the date and<br />

time of the run).<br />

Status Specifies the macro run status (Failed or Successfully Executed).<br />

Completed on Date and time when the run was finished.<br />

To view the latest information about the runs, click Refresh on the toolbar.<br />

Note:<br />

The Macro Runs window is not updated automatically after the macro execution is over. To<br />

check whether the macro run is finished, click Refresh on the window's toolbar.<br />

Using the Filter dropdown list, you can filter the displayed runs by date.<br />

The Macro Runs window displays brief information about macro runs: name, result (passed/failed), date<br />

and time of completion. To view detailed information about a macro run, right-click<br />

it in the Macro Runs<br />

window and select Open from the context menu, or double-click the<br />

desired run in the Macro Run window.<br />

This<br />

will bring up <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s Log panel with messages posted to the log during the selected<br />

macro run:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web<br />

Interface<br />

Overview<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> lets you start<br />

and monitor macros working on other computers in the network.<br />

Typically, to<br />

initiate and control remote macro runs you need to use special software (for instance, Remote<br />

Desktop Connection)<br />

that provides the appropriate access to the remote computer. Features built into<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> let you control the remote macro runs without installing any additional software.<br />

You can manage remote macros directly from <strong>Build</strong> <strong>Studio</strong>. You can even<br />

manage the runs without installing<br />

Automa ted <strong>Build</strong> <strong>Studio</strong> - the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface installed on the remote computer lets<br />

you contro l the macro runs through your Web browser. Of course,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes special<br />

security settings to limit permissions of users who can view, run or administer the server computer. Note<br />

also, that besides controlling remote macros<br />

directly from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or via the Web Interface,<br />

you can use<br />

the client/server functionality within your macros using operations of the Remote Macro<br />

Execution category<br />

(for more information on operations of this group see Remote Macro Execution Category<br />

in the General-Purpose Operations document or in on-line help).<br />

The remote<br />

computers where the macro is running are called servers. The computers where you control<br />

the remote macro<br />

execution are called clients.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is not divided into Client and Server parts. Once you installed <strong>Build</strong><br />

<strong>Studio</strong> on<br />

your workstation,<br />

it can function like a server and a client. The server provides information needed for<br />

remote macro runs and the client sends commands to the server. To transfer data and commands between the<br />

server and client computers, the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service is needed. This service is shipped with<br />

<strong>Build</strong> <strong>Studio</strong> and is installed by the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> installation<br />

program. So, after you installed<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on a computer,<br />

this computer automatically becomes a server, which can be<br />

controlled by a remote instance<br />

of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also includes a special Gadget utility that monitors server macro runs from the<br />

desktop<br />

or Sidebar of Windows Vista. For more information, see <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Gadget for<br />

Windows<br />

Sidebar.<br />

Using the Client/Server Functionality<br />

This topic explains how to run macros and monitor macro execution on a remote computer.<br />

Preparing the Server Computer<br />

Connecting to the Server<br />

Registering Macros<br />

Running Macro and Monitoring the Run<br />

Viewing Results<br />

Using Server Settings<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

119


120<br />

Setting Permissions<br />

Preparing the Server Computer<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

In order for you to monitor macro runs that are performed on a remote computer<br />

(we call it a server), you<br />

need to install <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> on this computer.<br />

The <strong>Build</strong> <strong>Studio</strong> installation program will also install and launch the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service.<br />

This service is u sed to exchange data between the client and server computers. In order to control macro runs<br />

on a remote computer, the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service<br />

should be running on this computer. You can<br />

check<br />

whether the service is running using the Control Panel | Administrative Tools | Services window.<br />

If the server computer has Windows XP Service Pack 2, Windows Server 2003 or Windows Vista, you<br />

may need to turn off the Windows Firewall, or add <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s service (< <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>>\Bin\<strong>Automated</strong><strong>Build</strong>Service.exe) to the Exceptions<br />

list. For more information, see <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> an d Windows<br />

Firewall.<br />

Connecting<br />

to the Server<br />

To ru n a macro on a remote computer, you have to first connect to this computer. To do this:<br />

• Switch to the Client panel. If it is hidden, choose View | Client from <strong>Build</strong> <strong>Studio</strong>’s main menu<br />

to display the panel (if you use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrated into Visual <strong>Studio</strong>, select<br />

<strong>Build</strong> <strong>Studio</strong> | Panel List from Visual <strong>Studio</strong>’s main menu and then choose Client from the<br />

ensuing Select Panel dialog).<br />

• In the Location box displayed on the Macro<br />

page, specify the connection which you will use.<br />

You can either select an existing connection from<br />

the dropdown list, or create a new connection<br />

by clicking the Location box's ellipsis button and using the subsequent Connections dialog. In<br />

this dialog you can choose the desired connection type and specify the user name, domain and<br />

password for the connection. For more information on connection settings, see Connection<br />

Parameters.<br />

Registering Macros<br />

After y ou have connected to a server, you can choose the macro, which you will run on the remote<br />

computer. To<br />

do this:<br />

• Click Add Macro on the toolbar or the Client panel, or right-click somewhere within the<br />

panel’s Macro page and choose Add Macro from the context menu. This will call the Add<br />

Macro dialog.<br />

• On the General<br />

tabbed page of the dialog, you can specify the macro file name, description, the<br />

utility to be used to execute the macro (you can choose either <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> or<br />

<strong>Automated</strong> Macro Player) and the command-line arguments<br />

for the utility.<br />

The macro description specified in the dialog is used to identify the macro in the Client page,<br />

that is, it is used as a macro alias.<br />

The macro file name is specified in terms of the remote computer,<br />

that is, if you specify<br />

C:\MyMacros\Macro1.bxp, this will mean<br />

that the macro file name is Macro1.bxp and that this<br />

file is located on the C:\MyMacros folder on the<br />

remote computer. There is no need to share this<br />

folder in order to access the macro file.<br />

To specify configuration or variable<br />

values for the macro run, use the command line. See<br />

Command-Line Arguments for more<br />

information.<br />

• On the Identification page you can specify the user name, domain and password that will be<br />

used to connect to the remote computer.<br />

If you do not specify this information, the macro will be<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

executed using the account,<br />

under which <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s service is running on the<br />

server computer (by default,<br />

the SYSTEM account).<br />

When specifying the account, enter the user name and the domain name. For instance,<br />

MyDomain\JohnSmith. You can either type the desired user and domain names, or click Browse<br />

and choose the<br />

user with the ensuing standard Select User dialog.<br />

Note that the specified account<br />

must have permissions to run executables on the server<br />

computer.<br />

The macro may include operations that use current user account data for functioning (for<br />

instance,<br />

the operation that checks out files from Visual SourceSafe may use the name<br />

and password specified by operation properties, or name and password of the current<br />

user account). So, if the login data that you specify in the Notification page does not<br />

match the data needed by<br />

the operation, the operation execution will fail.<br />

• On the Permissions page you can specify users or user groups, which are allowed to execute the<br />

macro and monitor the macro run. These users and groups must be registered on the server with<br />

the Server Settings dialog. By default, any users registered on the server, can execute a macro<br />

and monitor its runs. If a user does not have the permission for a macro, he will not be able to<br />

run the corresponding macro. Depending on the Hide non-available macros option, the macros<br />

that users do not have the correct permissions for can be hidden or visible on the Client Panel.<br />

• Click OK in the Add Macro dialog to save changes and add the macro to the Client panel.<br />

Using the described steps you can register several macros in the Client panel.<br />

If you add the same macro several times, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will create macro presets and display<br />

them as child nodes of the macro node. The presets differ from each other by the parameters specified in the<br />

Add Macro dialog. For instance, they can differ in command-line arguments passed to the macro player<br />

before the playback.<br />

Note that <strong>Build</strong> <strong>Studio</strong> also supports auto-registering of macros. To enable the auto-registration:<br />

• Create a new connection (see above).<br />

• Click Server Settings on the Client panel toolbar.<br />

This will call the Server Settings dialog.<br />

• Select the Automatically register all macros that are run on the server check box on the<br />

General page of the dialog and click OK to save changes.<br />

Now <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will register any macro that will be started on the remote computer.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

121


122<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

After you have added the macro to the panel, you can run it on the remote computer and monitor the<br />

macro run.<br />

Running Macro and Monitoring the Run<br />

To run a macro added to the Client panel:<br />

• Choose the desired macro in the Macro page of the panel.<br />

• Right-click the selected macro and select Run from the context menu or click the Run button<br />

on the panel's toolbar.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will start running the macro on the remote computer. The State column of the<br />

Macro page will indicate the run status.<br />

To view detailed information on the macro’s execution progress, select the desired macro in the Macro<br />

page and switch to the Progress page. This page indicates the execution progress using progress group<br />

defined in the macro being run. If the macro does not contain progress groups, the page will be empty.<br />

Note: The Client panel will monitor all macro runs: those that will be initiated from the Client panel<br />

and those that will be initiated outside of it. In other words, you will see macro runs that will be<br />

started by a user who will log on the remote computer.<br />

Note that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> lets you limit the number of macros running concurrently by setting<br />

the appropriate value to the Maximum concurrent macro runs server option. This option lets you specify the<br />

number of macros that can be started from the Client<br />

panel and run concurrently. By default, this number is<br />

5. So, if <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is running 3 macros on the remote computer and you command to run 4<br />

more macros from the Client panel, only 2 of these four macros will be run. The other two macros will be<br />

placed in a queue and will wait until the total number of running macros<br />

decreases.<br />

Using the M aximum concurrent macro runs option lets you avoid too massive of a load on the server and<br />

provides a simp le way to control the macro run order: if this option holds 1 and you run five macros from the<br />

Client panel, the macros will be executed one-by-one on the remote computer in the order of their run.<br />

Viewing Results<br />

After the mac ro execution is over, the State column of the Macro page will indicate the macro run<br />

results (Failed or Success).<br />

The Configuration column will show the configuration used to build the macro,<br />

Last run will indicate the date and time of the run start, Execution time - the run duration.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

To view detailed information on macro<br />

run results, click the word (Failed or Success) displayed in the<br />

State column. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will load the run results to the Log and Summary panel.<br />

To view the history of macro runs, choose the desired macro in the Macro page and then<br />

click Show in<br />

the History<br />

column of that page. <strong>Build</strong> <strong>Studio</strong> will retrieve the history of the macro runs from the remote<br />

computer and then it will display the History page with the retrieved<br />

data.<br />

The Message column displays text describing the execution result. If the macro failed to execute<br />

successfully, the column will display the error description.<br />

By clicking the Log column of the History page, you can view the log of the appropriate macro run.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

123


124<br />

Setting Permissions<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

You can limit the number of users who are able to run macros on the remote computer, monitor macro<br />

runs or administer the <strong>Build</strong> <strong>Studio</strong> settings on the remote computer (“administration” means users will be<br />

able or unable to change permissions for the remote computer through the Client panel).<br />

To operate with permissions, you should first create users and user groups that are allowed to work with<br />

the server:<br />

• Open the Client panel.<br />

• Click Server Settings on the panel’s toolbar and use the subsequent Server Settings dialog to<br />

create users and user groups and specify to which group a user belongs.<br />

The permission system is based on the following principles:<br />

Users can be authorized by their name and password specified in the Server Settings dialog,<br />

or by the name and password of their operating system account.<br />

Permissions are specified for user groups only. User-level permissions are not supported. So,<br />

to specify permissions for a user, add it to a user group.<br />

A user can belong to only one group.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• After you defined the users and user group, you can specify access permissions for individual<br />

macros – you can specify the macro to be run by only certain users. To do this:<br />

Select the desired macro in the Macro page.<br />

Right-click the selected macro and choose Edit Macro Properties from the context menu,<br />

or simply click Edit Macro Properties on the panel's toolbar. This will call the Macro<br />

Properties dialog.<br />

Switch to the Permissions page.<br />

Select the Allow only the following users to run this macro preset check box.<br />

Click Add User or Add Group to add the desired users or user groups to the list of users.<br />

Click OK to save changes.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server – User Permissions<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros let you perform various actions, including those that can lead to data<br />

loss (for instance, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes operations that can delete files or folders). To prevent<br />

unauthorized access to these macros and operations, the Client/Server subsystem includes special<br />

permissions that restrict actions a user can perform through the Client panel or <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web<br />

Interface.<br />

• A user can be authorized by user name and password specified in the Server Settings dialog, or<br />

by the name and password of the operating system account. The authentication type is selected in<br />

the Server<br />

Settings and Connections dialogs.<br />

•<br />

<br />

The permissions subsystem is based on the following principles:<br />

• The operations a user can perform through the Client panel or <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web<br />

Interface are specified by the user permissions in the Server Settings dialog.<br />

• To connect to the server, the client part of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> uses the settings specified in<br />

the Connections dialog.<br />

• A user can belong to only one group.<br />

Permissions can only be specified for groups. User-level permissions are not supported, except<br />

for permissions on macro runs (see below).<br />

A group can<br />

have any combination of the following permissions:<br />

Run macros - Users having<br />

this permission can run macros from the Client panel or<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web<br />

Interface as well as pause, resume and stop macro runs.<br />

Note, that it this permission can be customized for individual macros and macro presets. For<br />

this purpose, use the Permission tabbed page of the Macro Properties dialog.<br />

Modify macro run parameters - Users that have this permission active can only modify<br />

command-line arguments of a macro. For instance, specify the desired configuration for the<br />

run or initialize variables. This permission is useful when a user has<br />

to modify input data<br />

(which<br />

is not allowed by the Run macros), but assigning them the Manage<br />

macros<br />

permission<br />

is undesirable.<br />

Manage macros – Users having this permission can upload macros to and download<br />

them<br />

from the server, register and unregister monitored macros, modify properties of monitored<br />

macros, configure automatic notifications about the macro state changes, delete unregistered<br />

macros from the server, schedule macro runs on the server, modify scheduled tasks and<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

125


126<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

remove them. This permission naturally includes the Modify macro run parameters<br />

permission right.<br />

Administer server - Users having this permission can modify the server settings, configure<br />

notification services, register and unregister new users and user groups and specify run<br />

permissions of users and user groups on individual macros (macro presets).<br />

Add and modify own build requests - Users having this permission can submit build<br />

requests<br />

and modify requests posted by themselves.<br />

Manage build requests - Users having this permission can submit build<br />

requests as well as<br />

edit and remove arbitrary requests. They also can manage build information in the Requests<br />

section - specify description<br />

for builds, merge and delete them. This permission naturally<br />

includes the Add and<br />

modify own build requests right.<br />

To monitor the build server state (view macro status, macro execution progress, history, logs and<br />

charts, build requests and scheduled tasks), users do not need special permissions. Depending on<br />

the Hide non-available macros option, the macros that users do not have the correct permissions<br />

for can be hidden or visible on the Client panel or Web Interface.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server includes two default groups:<br />

• WINDOWS USERS – This group contains all unregistered users logged on to the server using<br />

Windows<br />

authentication.<br />

• EVERYONE<br />

– This group contains all other unregistered user accounts.<br />

By default, these two groups have all<br />

the permissions on the server. You can, however, restrict their<br />

permissions in order to prevent non-authorized<br />

users from managing the server.<br />

These groups<br />

cannot be renamed, and it is impossible to directly add users to these groups. These groups<br />

are meant to contain unregistered accounts only.<br />

The general procedure of creating users and user groups is as follows. In our explanation we assume that<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> has just been installed on the server computer and that you have not<br />

yet defined user<br />

or user groups<br />

for this server.<br />

• You (or any<br />

other user) create a connection to the remote computer. To do this, you do not need<br />

special administrator permissions.<br />

Open the Client panel.<br />

On the panel’s Macro page, click the ellipsis button of the Connection edit box. This will<br />

call the Connections<br />

dialog. The dialog will guide you through the process of creating the<br />

connection.<br />

On the first page of the dialog,<br />

specify the name for your connection. On the next two pages<br />

you specify the connection type (DCOM or Web service) and settings (computer name or<br />

URL).<br />

On the fourth page you have to specify the authentication parameters. Select Authenticate<br />

as the logged on Windows user and click Finish.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will create a new connection and automatically select it in the<br />

Connection box of the Client panel’s Macro page.<br />

• You will be added to the WINDOWS USERS group. By default, users belonging to this group<br />

have all the permissions for the client/server operations.<br />

• Click<br />

• In the dialog:<br />

Server Settings on the Client panel's toolbar. This will call the Server Settings dialog.<br />

Create the user groups and specify their permissions:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

- Switch to the Groups page.<br />

- Create the new groups by clicking Add.<br />

- Specify the group name and permissions using the check boxes at the bottom of the<br />

ensuing Add Group dialog. Note that the group name cannot coincide with another<br />

group name or with a user name.<br />

- If you will be the <strong>Build</strong> <strong>Studio</strong> server administrator, add your user name to the<br />

appropriate group (this group should have the Administer server permission). This will<br />

automatically remove your user account from the WINDOWS USERS group.<br />

- For the<br />

EVERYONE and WINDOWS USERS groups, uncheck all the permissions. So<br />

users belonging to this group will only be able to monitor macro runs, but not start, stop,<br />

download or upload them.<br />

Create new users and add them to the created groups. To do this:<br />

<br />

- Switch to the Users tabbed page.<br />

- Click Add to create a new user. This will call the Add User dialog.<br />

- In the dialog:<br />

- Specify the user name and password:<br />

- If you want a user to be authenticated by the operating<br />

system, select the Windows<br />

user check box and then enter the user name (including the domain) into the User<br />

name<br />

edit field in the format DomainName\UserName.<br />

You can either enter the desired user and domain names or click the ellipsis button<br />

of the User name box and choose the user using the subsequent standard Select User<br />

dialog.<br />

- If you want a user to be authenticated by the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server, clear<br />

the Windows user check box and type the desired user name(without the domain<br />

name) and password.<br />

After you finish creating users and groups, click OK to close the Server Settings dialog.<br />

Connection<br />

Parameters<br />

- In the Group edit box specify the group, to which the user will belong.<br />

- Click OK to add the new user with the specified properties.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes features that let you run macros and monitor macro runs on<br />

remote<br />

computers: Client/Server and gadget, distributed builds<br />

and R emote Macro Execution operations.<br />

To connect<br />

to remote computers, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can use one of the following methods:<br />

• DCOM<br />

• Web service (SOAP)<br />

Below are descriptions of these connection methods and instructions on how to configure them. In the<br />

end of the topic, you will find tips on choosing the connection type.<br />

General Requirements<br />

Regardless of which connection type you choose, the computer must meet the following requirements:<br />

• The remote computer must have <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> installed.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

127


128<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• The <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service must be running on the remote computer. This service is<br />

used to exchange data between the client and server computers. It is part of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> and is installed by the <strong>Build</strong> <strong>Studio</strong> installation program. You can check that the service is<br />

running or launch it in the Control Panel | Administrative Tools | Services window.<br />

• If the remote computer has Windows XP Service Pack 2, Windows Server 2003 or Windows<br />

Vista, you may need to turn off the Windows Firewall, or add <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s service<br />

(\Bin\<strong>Automated</strong><strong>Build</strong>Service.exe) to the Exceptions list. For more<br />

information, see <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and Windows Firewall.<br />

DCOM Settings<br />

DCOM (Distributed Component Object Model) is a protocol that enables software components to<br />

communicate directly through<br />

the network. It does not require any additional runtime applications on the<br />

server, since DCOM is an integral part of the operating systems supported by <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (see<br />

System Requirements). Using<br />

the DCOM connection, you can connect to computers that belong to the<br />

domain to which your computer<br />

belongs. <strong>With</strong>in the domain range, the DCOM connection is faster than the<br />

Web service connection.<br />

Using the DCOM connection<br />

you can only connect to those computers that belong to the domain, to<br />

which<br />

your computer belongs.<br />

<strong>With</strong>in the domain range, the DCOM connection is faster than the Web<br />

service connection.<br />

When establishing the DCOM connection to the remote<br />

computer, you need to specify the desired<br />

computer<br />

name. In order for <strong>Build</strong> <strong>Studio</strong> to establish the connection, the remote computer must meet<br />

requirements listed in<br />

the General Requirements section above and should have specific DCOM settings set.<br />

To configure DCOM, follow these steps:<br />

• The <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> Service must be running on this computer. This service is used to<br />

exchange data between the client and server computers. It is part of <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> and<br />

is installed by the <strong>Build</strong> <strong>Studio</strong> installation program.<br />

• The DCOM options<br />

must be set properly:<br />

Open the Control Panel | Administrative Tools | Component Services window.<br />

Right-click th e Console Root | Component Services | Computers | My Computer node in<br />

the tree on the left of the window and select Properties from the context menu.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

This will call the Computer<br />

Properties dialog.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

129


130<br />

Activate the COM Security page of the dialog.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

Click Edit Limits in the Access Permission section. This will call the Access Permissions<br />

dialog.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

Make certain that the user account, which you will use to connect to the server computer, is<br />

added to the Group or user names list and that the Remote Access permission is enabled<br />

for it. You<br />

can set this setting for the Everyone user group to enable all domain users to<br />

connect to the build server.<br />

Do not confuse this user (or user group) name<br />

with the name and group you specify in the<br />

Server Settings dialog. The Server Settings dialog defines the name that is used to connect to<br />

the remote<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, while in the Access Permissions dialog you specify the<br />

account, used to connect<br />

to the remote computer.<br />

Click OK to save the changes and return to the Computer Properties<br />

dialog.<br />

Click Edit Limits<br />

in the Launch and Activation section. This will call the Launch<br />

Permissions dialog:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

131


132<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

Make certain that the user account,<br />

which you will use to connect to the server computer, is<br />

added to the Group or user names list and that the Remote Activation permission is<br />

enabled for it.<br />

You can enable this setting for the Everyone group to enable all domain users<br />

to connect to the build server.<br />

Do not confuse this user (or user group) name with the name and group you specify in the<br />

Server Settings dialog. The Server Settings<br />

dialog defines the name that is used to connect to<br />

the remote <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, while in the Access Permissions dialog<br />

you specify the<br />

account, used to connect to the remote computer.<br />

Click OK to save the changes and return to the Computer<br />

Properties dialog.<br />

Click OK in the Computer Properties dialog<br />

to close it.<br />

Web Service (SOAP) Settings<br />

The Web Service (SOAP) connection method lets you connect to any computer where <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> is installed regardless of whether this computer belongs or does not belong to the domain of the client<br />

computer. If you select this type of connection, the local<br />

and remote computer will communicate through<br />

SOAP<br />

messages.<br />

In order for <strong>Build</strong> <strong>Studio</strong> to establish the connection, the remote computer must<br />

requirements, in addition to those listed in the General Requirements section:<br />

meet certain<br />

• The remote<br />

computer must have Microsoft Internet Information Services 5.1 or later installed.<br />

• The remote computer<br />

must have the virtual directory providing access to the appropriate <strong>Build</strong><br />

<strong>Studio</strong> modules.<br />

This virtual directory is created by the installation program of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

When establishing the connection to the remote computer,<br />

you need to specify the URL connection in<br />

the http://ComputerName/VirtualDirectoryName format, for instance:<br />

http://JohnSmithComp/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong><br />

Here JonSmithComp is the server computer's name and <strong>Automated</strong><strong>Build</strong><strong>Studio</strong> is the virtual directory<br />

name.<br />

This is the default virtual directory created by <strong>Build</strong> <strong>Studio</strong>'s installation program.<br />

Note: Do not confuse the names of the virtual directories. The virtual directory name of the<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server is <strong>Automated</strong><strong>Build</strong><strong>Studio</strong>,<br />

while the virtual directory name that<br />

is used to access the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface<br />

(if it is installed on the server<br />

computer) is <strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web.<br />

In order for <strong>Build</strong> <strong>Studio</strong> to establish the connection, the server computer must meet the following<br />

requirements:<br />

• The <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service must be running on this computer. This service is used to<br />

exchange data between client and server computers. It is part of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and is<br />

installed by <strong>Build</strong> <strong>Studio</strong>'s installation program.<br />

• The remote computer must have Microsoft Internet Information<br />

Services 5.1 or later installed<br />

and must have the virtual directory providing access to the appropriate <strong>Build</strong> <strong>Studio</strong> modules.<br />

This virtual directory is created by<br />

the installation program of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Which Connection Type to Choose<br />

Using the DCOM connection you can only connect to those computers that belong to the domain, to<br />

which your computer belongs. <strong>With</strong>in the domain range, the DCOM connection is faster than the Web<br />

service<br />

connection.<br />

Using the Web<br />

service connection you are not limited by the domain bounds. - you can connect to<br />

computers that do<br />

not belong to the domain containing your computer. So, you have to choose this<br />

connection type if the server computer does not belong to the domain containing your computer.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server Web Interface<br />

About <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

includes client and server functionality (see <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Client/Server - Overview). To execute and monitor macros running on the server computer, you use the<br />

Client panel of the <strong>Build</strong> <strong>Studio</strong><br />

instance running as a client. The client code connects to the server computer,<br />

o btains data from it and displays this data in the Client panel. In order to work through the Client panel, you<br />

have to install <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> on your computer.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>'s Client/Server Web Interface<br />

lets you control the server through your Internet<br />

browser (that is, without installing <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> on client computers). The Web Interface module<br />

is installed on the server computer and generates<br />

web pages that you access through your Internet browser.<br />

Requirements<br />

To use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface, the server computer must have the following software<br />

installed:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

133


134<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• Microsoft Windows 2000 Professional with Service Pack 4, Microsoft Windows 2000 Server<br />

with Service Pack 3, Microsoft Windows XP Professional, Microsoft Windows Server 2003 or<br />

Microsoft Windows Vista.<br />

• <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface (the Web Interface is<br />

included in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and it can be installed during <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

installation).<br />

• Microsoft<br />

Internet Information Services ver. 5.0 or later.<br />

• Microsoft<br />

Data Access Components 2.8 or later.<br />

• Microsoft .NET Framework 2.0.<br />

• Adobe Flash Player 8 or later.<br />

Note that<br />

Microsoft Internet Information Services should be installed prior to Microsoft .NET<br />

Framework<br />

2.0.<br />

In certain situations, you may need to manually upgrade IIS script maps to the current version of<br />

ASP.NET. This can be done by using the -i key of the aspnet_regiis.exe utility. The utility is<br />

located in the following path:<br />

\Microsoft.NET\Framework\\aspnet_regiis.exe.<br />

As for the client side, the web browser, in which you will browse the pages generated by Web Interface,<br />

must support cookies and JavaScript. This kind of support is built into most modern browsers. However, you<br />

may<br />

need to check browser options to ensure that this support is enabled.<br />

Using Web Interface<br />

To view a page generated by the Web interface, open your Internet browser and navigate to the following<br />

page:<br />

http://ServerName_or_IP/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web<br />

As you can see, you can specify the server computer using either its name or IP address.<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web is the virtual directory holding the<br />

pages generated by the Web Interface<br />

module. <strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web is the default directory name. You can change it when installing <strong>Build</strong><br />

<strong>Studio</strong> on the server computer or any time later using the Internet Information Services dialogs and windows.<br />

Note: Do not confuse the names of the virtual directories.<br />

The virtual directory name of the<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server is <strong>Automated</strong><strong>Build</strong><strong>Studio</strong>, while the virtual directory name that<br />

is used to access the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface (if it is installed on the server<br />

computer) is <strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web.<br />

After you enter the specified address, you will see the Login page asking you to specify the<br />

authentication parameters for login. Alternatively, you can enable the Authenticate<br />

by OS check box and use<br />

your<br />

Windows logon settings.<br />

Note: Authentication by OS<br />

credentials does not operate on Windows Vista unless the Windows<br />

Authentication feature of the Internet Information Services is enabled. To enable it, do the<br />

following:<br />

1. Open the Control Panel | Programs and Features<br />

tool.<br />

2. Click the Turn Windows features on or off link.<br />

3. Check the Internet Information Services | World Wide Web Services | Security |<br />

Windows Authentication option.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

The next page after the Login page is very similar to <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>’s Client panel. You can<br />

use it in the same manner as you use the Client panel. For more information, see Using<br />

the Client/Server<br />

Functionality<br />

and <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server - Common Tasks (in on-line help).<br />

This page also contains three additional sections:<br />

• Requests – Lets you add, monitor and manage user requests for server macro runs. For more<br />

information, see <strong>Build</strong> Requests<br />

in online help<br />

• Tasks – Analogue to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s built-in Tasks Scheduler. This section lets you<br />

schedule server<br />

macro runs and monitor scheduled tasks.<br />

• Charts – Analogue to the Charts panel. This section graphically represents statistics on the<br />

server computer’s macro runs.<br />

Automatic<br />

<strong>Build</strong> Notifications<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server can be configured<br />

so that it sends notifications every time a build is<br />

started or finished or whenever a new request for the build run is submitted. This way, you can easily<br />

monitor<br />

the status of your builds.<br />

Notifications can be sent via e-mail as well as MSN or ICQ instant messages. The notification text<br />

includes<br />

various information about the occurred build event, such as:<br />

• The name of the macro and macro preset whose status<br />

is changed.<br />

• The macro configuration.<br />

• The event type (build started, new build request received, and so on).<br />

• The date and time the event occurred.<br />

• The way the macro was launched (manually by the user, via<br />

the Web Interface, by the scheduler,<br />

and so on).<br />

• The name of the user who started the macro or submitted the build request.<br />

• The account under<br />

which the macro was started.<br />

• The text of the build request.<br />

• The macro execution status (successful, failed, and so on).<br />

An example of such notification is as follows:<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> notification.<br />

Macro: C:\Projects\Much-o-Money.bbp<br />

Configuration name: Release<br />

Event: <strong>Started</strong> at 25.06.2008 15:27:35<br />

Launched by: John Smith<br />

Launch type: Client<br />

To learn how to set up automatic build notifications, follow the instructions provided in the sections<br />

below:<br />

Requirements<br />

Configuring Notification Services<br />

Configuring <strong>Build</strong> Notifications<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

135


136<br />

Requirements<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

You can set up automatic build notifications<br />

via <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s built-in Client panel, or via<br />

the Web Interface.<br />

The instructions in this topic assume that you use the Client panel; however, the way you<br />

do<br />

this in the Web Interface is identical.<br />

To be able to configure automatic notifications,<br />

your user group must have certain permissions on the<br />

server:<br />

For more<br />

Permissions.<br />

• To configure notification services to be used for contacting the users, the Administer server<br />

permission is required.<br />

• To configure build notifications for individual server macros (or macro presets), the Manage<br />

macros permission is required.<br />

information about these permissions, see <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server - User<br />

Also, in order for the users to receive these notifications, their contact information (e-mail address, MSN<br />

address and/or ICQ UIN) must be specified in their account properties on the server. To learn how to modify<br />

the users’ account information,<br />

see <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server - Common Tasks in on-line help.<br />

Configuring Notification Services<br />

• Switch to the Client panel. If it is hidden, do any of the following:<br />

In <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> running as a standalone application, choose View | Client from<br />

the main menu to display<br />

the panel.<br />

In <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> integrated into Visual<br />

<strong>Studio</strong> .NET, choose <strong>Build</strong> <strong>Studio</strong> | Panel<br />

List from Visual <strong>Studio</strong>’s main menu and then choose Client from the ensuing Select Panel<br />

dialog.<br />

• In the Location box displayed<br />

on the Macros page, select the connection to the desired build<br />

server.<br />

• Click the<br />

Server Settings button.<br />

• In the ensuing<br />

Server Settings dialog, switch to the Notification page.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• To add a new notification service:<br />

Click Add and select the notification type, E-mail, MSN or ICQ from the popup list. This<br />

will invoke the Add Notification Server dialog.<br />

Configuring e-mail notifier:<br />

- Enter the notifier name in the Server name field. The default one is E-mail server.<br />

- In the Server address and Server port fields, enter the name and<br />

mail server.<br />

137<br />

port of your outgoing<br />

- If your outgoing mail server requires authentication,<br />

specify the account name and<br />

password used to connect to it in the Account name and Account password fields.<br />

- In the From address field, specify the<br />

e-mail address that the server will use to send<br />

notifications. For example, builder@mycompany.com.<br />

Configuring MSN notifier:<br />

- Enter the notifier name in the Server name field.<br />

The default one is MSN server.<br />

- In the Account e-mail and Account password fields, enter the e-mail and password of<br />

the account that the server will use to send notification<br />

messages.<br />

Configuring ICQ notifier:<br />

- Enter the notifier name in the Server name field. The default one is ICQ server.<br />

- In the Server address and Server port fields, enter the address and port of the ICQ<br />

authorization server to use. The default values are login.icq.com<br />

and 5190, respectively.<br />

- In the Account UIN<br />

and Account password fields, specify the ICQ identifier and the<br />

password of the<br />

account that the server will use to send notification messages.<br />

Note: The Account UIN value must include digits only, for example, 123456789. It<br />

must not include spaces, dashes and other characters that are often uses to<br />

separate parts of ICQ UINs (that is, the 123-456-789 and 123 456 789 UINs are<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com


138<br />

invalid).<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

- Click OK to close the dialog and add the specified notification service.<br />

To modify notification service’s properties:<br />

- Select the desired notification service<br />

in the list and click Edit.<br />

- Use the ensuing Edit Notification Server dialog to modify notification settings.<br />

- After you have made the needed<br />

changes, click OK to save them.<br />

To remove a notification service:<br />

- Select the desired<br />

item in the notifier list and click Remove.<br />

• Press OK to save the changes and<br />

close the Server Settings dialog.<br />

Configuring <strong>Build</strong> Notifications<br />

To configure automatic notifications for a particular<br />

build, do the following:<br />

• On the Macros page of the Client panel, select the macro whose run state changes you want to<br />

notify the users about, and click Edit Macro<br />

Properties.<br />

• In the ensuing Macro Properties dialog, switch<br />

to the Notifications page.<br />

• To add a new recipient:<br />

Click Add and choose whether you will add an individual registered user, a user group or a<br />

custom recipient.<br />

In the ensuing Add Notification dialog, select the desired user or group in the list, or enter a<br />

custom address to which notifications should be sent. In case of e-mail and MSN<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

notifications, the custom address should be the recipient’s e-mail address. In case of ICQ<br />

notifications, it should be the recipient’s ICQ UIN. Note, the UIN should only include digits;<br />

spaces, dashes or other helper characters are not allowed.<br />

In the Server<br />

combo box, select the notification service to be used for contacting the<br />

specified recipients.<br />

This combo box holds a list of all notifiers defined in the Server<br />

Settings dialog.<br />

In the Events group, select<br />

the events on which you want to notify the specified recipients:<br />

- <strong>Build</strong> started - Occurs when the current macro is started.<br />

- <strong>Build</strong> succeeded - Occurs when the macro run is successfully finished.<br />

- <strong>Build</strong> failed - Occurs when the macro run fails.<br />

- New build request registered - Occurs when a new request for the macro run is<br />

submitted.<br />

Click OK to close<br />

the Add Notification dialog and save the changes.<br />

• To modify recipient's properties:<br />

Use the ensuing Edit Notification<br />

dialog to select another user, group or address to be<br />

notified, change the notification<br />

medium or the set of traced events.<br />

• Press OK to close the Macro Properties dialog and save the changes.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Gadget for Windows Sidebar<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> includes<br />

a special gadget that helps you monitor the build server under<br />

Windows<br />

Vista. This topic describes how to set up the gadget and how to use it.<br />

Overview<br />

Select the desired user, user group or address in the list and click Edit.<br />

After you have made the needed changes, press OK to apply them.<br />

• To remove a recipient:<br />

Select the desired user, user group or address in the list and click Remove.<br />

Gadgets are lightweight HTML-based<br />

applications that usually indicate process data. For example, time,<br />

resource<br />

load, RSS feeds and so on. The gadget supplied with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> allows users to<br />

monitor macro runs in real time.<br />

The gadgets concept was introduced in Microsoft Vista. When installing <strong>Build</strong> <strong>Studio</strong> on this platform,<br />

you can enable the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Gadget for Windows Sidebar item. After installation the gadget<br />

becomes available in the Gadget Gallery. It can be placed on the Windows Sidebar or anywhere on the<br />

desktop.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

139


140<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

The information displayed in the gadget is very similar to information shown in the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>’s Client panel. The gadget displays a list of registered macros on a local or remote computer and for<br />

each macro it shows the information about its progress or results.<br />

Depending on the Show additional<br />

information in the main<br />

window option, this information can be represented as popup hint or in an<br />

additional text line in the gadget window.<br />

The gadget window has a fixed size; to scroll through the list items<br />

you can use the up and down buttons<br />

in the gadget’s lower right corner. A click upon a macro name invokes<br />

an additional window with details: if<br />

the macro is being executed at that moment, then the window indicates<br />

the current progress state, otherwise it<br />

displays<br />

the history of previous runs and the ratio of successful to failed builds:<br />

The gadget regularly updates the displayed data. By default, it refreshes data every 5 seconds, but the<br />

update interval could be changed via the settings dialog. However, the minimal interval is 1 second.<br />

Besides monitoring the server macros, you can also run them directly from the gadget. To do this, use<br />

buttons in the<br />

upper right corner of the gadget’s extended window. Note, however, that this is only possible if<br />

the server’s user group, to which your account belongs, has the Run macros permissions. (For more<br />

information on permissions, see <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server - User Permissions.)<br />

The gad get also provides a quick way to open the server’s Web Interface. For this purpose, click the<br />

server name in the gadget’s lower left corner. This will call the default internet browser and navigate to Web<br />

Interface<br />

login page.<br />

Note: The address of the Web Interface login page is specified by the gadget’s Web Interface URL<br />

option. By default it is http://ServerName_or_IP/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web,<br />

however, the<br />

alias name (<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web) can be redefined during the installation on a target<br />

machine.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

Connecting Gadget to the Server<br />

By default, the gadget<br />

displays information about the macros on the local <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server<br />

(localhost). If you<br />

need to monitor a remote build server, you should modify the gadget options so that they<br />

specify connection<br />

parameters to that server:<br />

1. Right-click the gadget and choose Options in the context<br />

menu, or press the Settings button.<br />

2. In the<br />

dialog, select the connection type in the Connect via radio group.<br />

Tip:<br />

If the computer where you connect, resides in your local network and<br />

belongs to the same domain that your computer belongs in, select DCOM.<br />

If the computer where you connect does<br />

not belong to the domain that your<br />

computer belongs in, select Web service.<br />

To connect to<br />

a remote computer, it should be properly configured beforehand. Read the<br />

Connection Parameters topic for instructions how to do this.<br />

3. Depending on the chosen connection type, specify a value in the Server name (DCOM) or Web<br />

service URL (Web Service) field.<br />

4. Specify user credentials.<br />

Check the Authenticate by OS to logon with the same username and password that you<br />

use to<br />

log int o your computer.<br />

– or –<br />

Enter the desired user name and password in the corresponding fields.<br />

Working <strong>With</strong><br />

the Gadget<br />

To add or remove a server macro<br />

You cannot add or remove macros monitored on<br />

the server via the Gadget. To manage the list of server<br />

macros, us e either the Client panel or the Web interface. For<br />

more information on how to do this, see<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server - Common Tasks.<br />

Tip: You can quickly navigate to the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server’s Web Interface by clicking<br />

the server name in the in the gadget’s lower left corner. This will automatically open the<br />

server’s Web Interface login page in your default Internet browser.<br />

To start, pause or stop a macro<br />

• Click the macro name in the list. This will bring up a pop-up window displaying either the macro<br />

run history or the macro run progress.<br />

• To start the macro, click the Start Macro<br />

button. If the macro has several presets, the gadget<br />

will prompt you to choose the preset to be run.<br />

To pause the macro run, click Pause Macro. To resume the suspended macro, click Start<br />

Macro.<br />

To stop the macro run, press Stop Macro.<br />

Note: You can start, pause and stop server macros only if you have the Run macros permission on<br />

the server.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

141


142<br />

To view the macro run progress<br />

• Click the macro name in the gadget window.<br />

To view the macro run history<br />

• Click the macro name in the<br />

gadget window.<br />

To quickly<br />

open the server’s Web Interface<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• Click the server name in the lower left corner of the gadget. This will launch your<br />

Internet<br />

browser and navigate to the server’s Web Interface login page.<br />

About<br />

absControl<br />

absControl is an ActiveX control that you can use to create a client application to work with an<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server (local or remote). Using absControl API, you can connect your client<br />

program to the server computer, get access to the list of macros that are registered to be executed on the<br />

server computer, obtain information on each macro specified in this list (for instance, a list of recent macro<br />

runs<br />

or information on the run progress), initiate and control remote macro runs from your client application.<br />

The installation program of <strong>Build</strong> <strong>Studio</strong> installs absControl.exe to the \Bin\Tools<br />

folder.<br />

Using absControl<br />

The first step in developing a custom client application to manage <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

server is<br />

creating an instance of the absControl object. This object provides methods and properties to connect to<br />

the server and manage server macros. You can create an absControl instance using the<br />

absControl.absGadget<br />

program identifier. The following The following code snippets demonstrate how you<br />

can do this in various<br />

programming languages:<br />

[Visual Basic 6.0]<br />

Set absGadget = CreateObject("absControl.absGadget")<br />

[Visual Basic .NET]<br />

absGadget =<br />

Activator.CreateInstance(Type.GetTypeFromProgID("absControl.absGadget"))<br />

[C#]<br />

absGadget =<br />

Activator.CreateInstance(Type.GetTypeFromProgID("absControl.absGadget"));<br />

[Delphi]<br />

absGadget := CreateOleObject('absControl.absGadget');<br />

After having obtained a reference to the absControl object, you need to connect this object to the<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server. To do this, use the Connect method of the absControl object:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

absControl.Connect(Address, UseDCOM, UserName, Password, WinUser)<br />

The Address parameter specifies the address of the server computer. This address depends on the<br />

connection type you use to connect to the server - DCOM or SOAP (Web service) - which is specified by the<br />

UseDCOM parameter. (To learn more about these connection types, see Connection Parameters.) To use the<br />

DCOM connection, the UseDCOM parameter should be True and the Address parameter should hold the<br />

name of the server computer. To connect via SOAP, pass False in the UseDCOM parameter and specify the<br />

URL of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s virtual directory on the server in the Address parameter (the default URL<br />

is http://ServerName_or_IP/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>).<br />

Note that for absControl to establish the server<br />

connection successfully, the used connection protocol must be properly configured on the server. For more<br />

information on required settings, see Connection Parameters.<br />

In the Connect method,<br />

you should also specify the user account that absControl will use to log into the<br />

server. absControl can log<br />

in either using the credentials of the user that is currently logged onto Windows,<br />

or use a specific account. To log in as the current Windows user, pass True in the WinUser parameter and<br />

leave the UserName and Password parameters empty. Otherwise, specify the desired UserName and<br />

Password that will be used to log into the server and set the WinUser parameter to False.<br />

After you have connected absControl to the server, you can perform the desired actions: run and stop<br />

server macros, check their state, retrieve their history, and so on. The following table provides a brief<br />

summary on implementing some common tasks:<br />

Action Description<br />

To obtain a list of<br />

registered macros...<br />

Use the GetMacros method of the absControl object. This method returns the<br />

TabsMacroList object that provides program access to the list of the registered<br />

macros.<br />

To iterate through the macro list, use the moveNext method, the item property<br />

and other members of the obtained TabsMacroList object.<br />

To<br />

get program Use the item property of the<br />

TabsMacroList object to get a program interface to<br />

access to a single a macro. This property returns the TabsMacroData object. You can use the<br />

macro...<br />

properties of this object (for instance, Description,<br />

FileName, ID) to get<br />

information on the macro.<br />

To<br />

obtain a list of Use the Presets property of the TabsMacroData object. This property returns<br />

macro presets... the TabsPresetList object that provides program access to the list of macro<br />

presets.<br />

To iterate through the presets list, use<br />

the moveNext method, the item property<br />

and other members of the obtained TabsPresetList object.<br />

To get information To get access to a single macro preset, use the item property<br />

of the<br />

on a macr o preset... TabsPresetList object. This property returns the TabsPresetData object<br />

whose properties you can use to get information on a macro preset.<br />

To get the history of Use the GetHistory method of the absControl object. This method returns the<br />

macro runs.. . TabsMacroRunList<br />

object that provides program access to the macro run history.<br />

To iterate through the history items, use the moveNext method, the item property<br />

and other members of the obtained TabsMacroRunList object.<br />

To g et the<br />

progress Use the GetProgress method of the absControl object. This method returns<br />

of a macro run... the TabsProgressList object that provides program<br />

access to information about<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

143


144<br />

Action Description<br />

To run, pause, stop<br />

or<br />

resume a macro<br />

preset...<br />

Examples<br />

the macro’s progress groups.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

To iterate through the progress groups, use the moveNext method, the item<br />

property and other members of the obtained TabsProgressList object.<br />

Use the SendCommand method of the absControl object. The first and second<br />

parameters<br />

of this method specify the identifiers of the desired macro and its<br />

preset.<br />

The third parameter specifies the command to be executed over the macro<br />

preset: 0 - run, 1 - pause, 2 - stop, 3 - resume.<br />

The foll owing code snippets are examples of clients that use absControl. These client applications<br />

perform the following actions:<br />

• Connect<br />

to the local <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server as the user currently logged in to Windows<br />

( the Web Service connection type is used).<br />

• Get a list of macros that are registered to be executed on the server computer.<br />

• Get and print information on each macro of the derived list.<br />

• Get a list of presets for each macro.<br />

• Print information on each preset of the macro.<br />

• Obtain the history of the last macro runs.<br />

• Run the last macro and print the progress of the macro execution.<br />

Two notes:<br />

• To use the C# and Visual<br />

Basic.NET samples in your application, add a reference to the<br />

absControl library (\Bin\Tools\absControl.exe.) in your project.<br />

• In the Visual<br />

Basic 6.0 and Delphi samples, absControl is located in event handlers<br />

(Command1_Click<br />

and Button1Click respectively). Make sure that your Visual Basic 6.0<br />

(Delphi) application<br />

has a form that contains the Command1 (Button1) button and an appropriate<br />

event handler that corresponds to the Click event of this button.<br />

[Visual Basic 6.0]<br />

Private Sub Command1_Click()<br />

absGadget = Null<br />

ProgId = "absControl.absGadget"<br />

Address = "http://localhost/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>/" ' <strong>Build</strong> <strong>Studio</strong>'s virtual<br />

directory URL on the server<br />

WinUser = True ' Authenticate as the currently logged on Windows user<br />

UserName = ""<br />

Password = ""<br />

UseDCOM = False ' In our example, we will use the SOAP (WebService)<br />

connection<br />

' Creates an absControl object<br />

Set absGadget = CreateObject(ProgId)<br />

' Connects to the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server<br />

Connect = absGadget.Connect(Address, UseDCOM, UserName, Password, WinUser)<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

' Obtains the list of registered macros<br />

Set absMacros = absGadget.GetMacros<br />

' Iterates through the macro list and prints information on each macro<br />

For i = 0 To absMacros.Count - 1<br />

FileName = absMacros.Item.FileName<br />

Description = absMacros.Item.Description<br />

MacroID = absMacros.Item.ID<br />

LastRun = absMacros.Item.LastMacroRun.StartTime<br />

IsRunning = absMacros.Item.IsRunning<br />

Debug.Print "Macro"; i<br />

Debug.Print "File name - "; FileName; "; "; " Description - ";<br />

Description; "; "; " ID - "; MacroID; "; "; "IsRunning - "; IsRunning; "; ";<br />

" LastMacroRun - "; LastRun<br />

' Obtains the list of the macro's presets<br />

Set absPresets = absMacros.Item.Presets<br />

' Prints information on each preset<br />

For j = 0 To absPresets.Count - 1<br />

PresetName = absPresets.Item.Name<br />

PresetID = absPresets.Item.ID<br />

PresetRunMode = absPresets.Item.RunMode<br />

PresetCmdLine = absPresets.Item.CmdLine<br />

PresetAccount = absPresets.Item.Account<br />

Debug.Print " preset"; j; ": "; " Name - "; PresetName;<br />

"; "; " ID - ";<br />

PresetID; "; "; " RunMode - "; PresetRunMode; "; "; " CmdLine - ";<br />

PresetCmdLine; "; "; "Account - "; PresetAccount; "; "<br />

absPresets.MoveNext<br />

Next<br />

run<br />

absMacros.MoveNext<br />

Next<br />

' History<br />

absMacros.MoveLast<br />

' Gets the ID of the last macro<br />

ID = absMacros.Item.ID<br />

' Prints the history of the last macro<br />

Debug.Print "History of the last macro:"<br />

' Obtains the macro run history<br />

Set history = absGadget.GetHistory(ID) ' Iterates through the history items and prints information on each macro<br />

For i = 0 To history.Count - 1<br />

Start = history.Item.StartTime<br />

Debug.Print Start<br />

history.MoveNext<br />

Next<br />

' Progress<br />

' Runs a macro<br />

absGadget.SendCommand ID, 1, 0<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

145


146<br />

' Prints the m acro run progress<br />

Debug.Print "Progress of the last macro:"<br />

' Obtains the macro<br />

run progress<br />

Set progress<br />

= absGadget.GetProgress(ID)<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

' Iterates through the macro run progress items and prints information on<br />

each progress group<br />

For i = 0 To progress.Count - 1<br />

ProgGroupName = progress.Item.Name<br />

ProgGroupState = progress.Item.State<br />

ProgGroupRunTime = progress.Item.ExecTime<br />

Debug.Print "Group Name - " ; ProgGroupName; "; " ; " State - " ;<br />

ProgGroupState; "; "; " ExecTime - "; Hour(ProgGroupRunTime); " hour ";<br />

Minute(ProgGroupRunTime); " min."; Second(ProgGroupRunTime); " sec."<br />

progress.MoveNext<br />

Next<br />

' Closes the connection to the server computer<br />

absGadget.Disconnect<br />

absMacros = Null<br />

End Sub<br />

[Visual Basic.NET]<br />

Imports System.Runtime.InteropServices<br />

Imports absControl<br />

Module Module1<br />

Sub Main()<br />

' Initializes variables<br />

Const ProgID = "absControl.absGadget"<br />

Dim Address = "http://localhost/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>/" ' <strong>Build</strong><br />

<strong>Studio</strong>'s virtual directory URL on the server<br />

Dim WinUser = True ' Authenticate as the currently logged on Windows<br />

user<br />

Dim UserName = ""<br />

Dim Password = ""<br />

Dim UseDCOM = False ' In our example, we will use the SOAP<br />

(WebService) connection<br />

Dim absGadget As absControl.absGadget = Nothing<br />

Dim i, j<br />

' Obtains access to absControl<br />

Try<br />

absGadget = Marshal.GetActiveObject(ProgID)<br />

Catch<br />

Try<br />

absGadget =<br />

Activator.CreateInstance(Type.GetTypeFromProgID(ProgID))<br />

Catch<br />

End Try<br />

End Try<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

If (absGadget Is Nothing) Then Exit Sub<br />

' Connects to the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server<br />

Dim connect = absGadget. Connect(Address, UseDCOM, UserName, Password,<br />

WinUser)<br />

macro<br />

' Obtains the list of registered macros<br />

Dim absMacros As absControl.absCollection = absGadget.GetMacros<br />

' Iterates through the macro list and prints information on each<br />

For i = 0 To absMacros.Count - 1<br />

' Obtains the TabsMacroData object<br />

Dim absMacroData As absControl.absMacroData = absMacros.item<br />

Console.WriteLine("Macro" + i.ToString)<br />

Console.WriteLine(" File name - " + absMacroData.FileName)<br />

Console.WriteLine(" Description - " + absMacroData.Description)<br />

Console.WriteLine(" ID - " + absMacroData.ID.ToString)<br />

Console.WriteLine(" IsRunning - " +<br />

absMacroData.IsRunning.ToString)<br />

absPresets.item<br />

' Obtains the list of the macro's presets<br />

Dim absPresets As absControl.absCollection<br />

= absMacroData.Presets<br />

' Prints information on each preset<br />

For j = 0 To absPresets.Count - 1<br />

' Obtains the TabsPresetData object<br />

Dim absPresetData As absControl.absPresetData =<br />

Console.Write(" Preset" + j.ToString + ": ")<br />

Console.Write(" name - " + absPresetData.Name)<br />

Console.Write(" ID - " + absPresetData.ID.ToString)<br />

Console.Write(" RunMode - " + absPresetData.RunMode.ToString)<br />

Console.Write(" CmdLine - " + absPresetData.CmdLine)<br />

Console.WriteLine(" Account - " + absPresetData.Account)<br />

absPresets.moveNext()<br />

Next<br />

absMacros.moveNext()<br />

Next<br />

' History<br />

absMacros.moveLast()<br />

' Gets the ID of the last macro<br />

Dim absData As absControl.absMacroData = absMacros.item<br />

Dim Id = absData.ID<br />

Console.Write("History of the last macro:")<br />

' Obtains the macro run history<br />

Dim history As absControl.absCollection = absGadget.GetHistory(Id)<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

147


148<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

' Iterates through the history items and prints information on each<br />

macro run<br />

For i = 0 To history.Count - 1<br />

' Obtains the TabsMacroRunData object<br />

Dim historyData As absControl.absMacroRun = history.item<br />

Console.WriteLine(historyData.StartTime)<br />

history.moveNext()<br />

Next<br />

' Progress<br />

' Runs macro<br />

absGadget.SendCommand(Id, 1, 0)<br />

Console.Write("Progress of the last macro:")<br />

' Obtains the macro run progress<br />

Dim progress As absControl.absCollection<br />

= absGadget.GetProgress(Id)<br />

' Iterates through the run progress items and prints information on<br />

each progress group<br />

For i = 0 To progress.Count<br />

- 1<br />

' Obtains the TabsProgressData object<br />

Dim progressData As absControl.absProgressData = progress.item<br />

Console.WriteLine("Progress group" + i.ToString + ":")<br />

Console.WriteLine(" Name - " + progressData.Name)<br />

Console.WriteLine(" State - " + progressData.State.ToString)<br />

Console.WriteLine(" ExecTime - " +<br />

progressData.ExecTime.Hour.ToString + " hour " +<br />

progressData.ExecTime.Minute.ToString + " min" +<br />

progressData.ExecTime.Second.ToString + " sec")<br />

progress.moveNext()<br />

Next<br />

' Closes the connection to the server computer<br />

absGadget.Disconnect<br />

Console.ReadKey()<br />

End Sub<br />

End Module<br />

[C#]<br />

using System;<br />

using System.Collections.Generic;<br />

using System.Text;<br />

using System.Runtime.InteropServices;<br />

using absControl;<br />

namespace example<br />

{<br />

class Program<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

{<br />

static void Main(string[] args)<br />

{<br />

// Initializes variables<br />

object abs = null;<br />

string Address = "http://localhost/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>/"; // <strong>Build</strong><br />

<strong>Studio</strong>' s virtual directory URL on the server<br />

bool UseDCOM = false; // In our example, we will use SOAP (WebService)<br />

connection<br />

string UserName = "";<br />

string Password = "";<br />

bool WinUser = true; // Authenticate as the currently<br />

logged on Windows<br />

user<br />

const string ProgID = "absControl.absGadget";<br />

// Obtains access to absControl<br />

try<br />

{<br />

abs = Marshal.GetActiveObject(ProgID);<br />

}<br />

catch<br />

{<br />

try<br />

{<br />

abs = Activator.CreateInstance(Type.GetTypeFromProgID(ProgID));<br />

}<br />

catch<br />

{<br />

}<br />

}<br />

if (abs == null) return;<br />

/ / Obtains the absControl object<br />

absControl.absGadget absGadget = (absControl.absGadget) abs;<br />

// Connects to the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server<br />

string connect = absGadget.Connect(Address, UseDCOM, UserName,<br />

Password, WinUser);<br />

// Obtains the list of registered macros<br />

absControl.absCollection absMacros = (absControl.absCollection)<br />

absGadget.GetMacros();<br />

// Iterates through the macro list and prints information on each macro<br />

for (int i = 0; i < absMacros.Count; i++)<br />

{<br />

// Obtains the TabsMacroData object<br />

absControl.absMacroData absMacroData = (absControl.absMacroData)<br />

absMacros.item;<br />

Console.Write("Macro" + i + ":\n");<br />

Console.WriteLine(" File name - " + absMacroData.FileName);<br />

Console.WriteLine(" Description - " + absMacroData.Description);<br />

Console.WriteLine(" ID - " + absMacroData.ID);<br />

Console.WriteLine(" IsRunning - " + absMacroData.IsRunning);<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

149


150<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

// Obtains the list of the macro's presets<br />

absControl.absCollection absPresets = (absControl.absCollection)<br />

absMacroData.Presets;<br />

// Prints information on each preset<br />

for (int j = 0; j < absPresets.Count; j++)<br />

{<br />

// Obtains the TabsPresetData object<br />

absControl.absPresetData absPresetData = (absControl.absPresetData)<br />

absPresets.item;<br />

}<br />

Console.Write(" Preset" + j + ": ");<br />

Console.Write(" name - " + absPresetData.Name);<br />

Console.Write(" ID - " + absPresetData.ID);<br />

Console.Write(" RunMode - " + absPresetData.RunMode);<br />

Console.Write(" CmdLine - " + absPresetData.CmdLine);<br />

Console.Write(" Account - " + absPresetData.Account + "\n");<br />

absPresets.moveNext();<br />

}<br />

absMacros.moveNext();<br />

/ / History<br />

absMacros.moveLast();<br />

/ / Gets id of the last macro<br />

absControl.absMacroData absData = (absControl.absMacroData)<br />

absMacros.item; int ID = absData.ID;<br />

Console.Write("History of the last macro:\n");<br />

// Obtains the macro run history<br />

absControl.absCollection history = (absControl.absCollection)<br />

absGadget.GetHistory(ID);<br />

// Iterates through the history items and prints information on each<br />

macro run<br />

for (int i = 0; i < history.Count; i++)<br />

{<br />

// Obtains the TabsMacroRunData object<br />

absControl.absMacroRun historyData = (absControl.absMacroRun)<br />

history.item;<br />

Console.WriteLine(historyData.StartTime);<br />

history.moveNext();<br />

}<br />

/ / Progress<br />

// Runs a macro<br />

absGadget.SendCommand(ID, 1, 0);<br />

Console.Write("Progress of the last macro:\n");<br />

// Obtains the macro run progress<br />

absControl.absCollection progress = (absControl.absCollection)<br />

absGadget.GetProgress(ID);<br />

// Iterates through the macro run progress items and print information<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

on each progress group<br />

for (int i = 0; i < progress.Count; i++)<br />

{<br />

// Obtains the TabsProgressData object<br />

absControl.absProgressData progressData =<br />

(absControl.absProgressData) progress.item;<br />

}<br />

}<br />

}<br />

[Delphi]<br />

unit Unit1;<br />

interface<br />

Console.WriteLine("Progress group" + i + ":");<br />

Console.WriteLine(" Name - " + progressData.Name);<br />

Console.WriteLine(" State - " + progressData.State);<br />

Console.WriteLine(" ExecTime - " +<br />

progressData.ExecTime.Hour + " hour " +<br />

progressData.ExecTime.Minute + " min" +<br />

progressData.ExecTime.Second + " sec");<br />

progress.moveNext();<br />

// Closes the connection to the server computer<br />

absGadget.Disconnect();<br />

Console.ReadKey();<br />

}<br />

uses<br />

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br />

Dialogs, StdCtrls, ComObj;<br />

type<br />

TForm1 = class( TForm)<br />

Button1: TButton;<br />

procedure Button1Click(Sender: TObject);<br />

private<br />

{ Private declarations }<br />

public<br />

{ Public declarations }<br />

end;<br />

var<br />

Form1: TForm1;<br />

absGadget, absMacros, absPresets, history, progress: OleVariant;<br />

ProgID, Address, UserName, Password, connect: string;<br />

WinUser, UseDCOM: Boolean;<br />

MacroID, PresetID, PresetRunMode, ID, ProgGroupState: Integer;<br />

FileName, Description, PresetName, PresetCmdLine, PresetAccount,<br />

historyString, ProgGroupName: string;<br />

IsRunning: Boolean;<br />

LastRun, ProgGroupRunTime: TDateTime;<br />

Hour, Min, Sec, MSec: Word;<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

151


152<br />

i, j: Integer;<br />

implementation<br />

{$R *.dfm}<br />

procedur e TForm1.Button1Click(Sender:<br />

TObject);<br />

var<br />

ProgGroupRunTime: TDateTime;<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

begin<br />

// Initializes variables<br />

absGadget := null;<br />

ProgID := 'absControl.absGadget';<br />

Address := 'http://localhost/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>/'; // <strong>Build</strong> <strong>Studio</strong>'s<br />

virtual directory URL on the server<br />

WinUser := true; // Authenticate as the currently logged on Windows user<br />

UserName := '';<br />

Password := '';<br />

UseDCOM := false; // In our example, we will use the SOAP (WebService)<br />

connection<br />

// Creates an absControl object<br />

absGadget := CreateOleObject(ProgID);<br />

// Connects to the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> server<br />

connect := absGadget.Connect(Address, UseDCOM, UserName, Password,<br />

WinUser);<br />

// Obtains the list of registered macros<br />

absMacros := absGadget.GetMacros;<br />

// Iterates through the macro list and prints information on each macro<br />

for i:=0 to absMacros.Count-1 do<br />

begin<br />

FileName := absMacros.item.FileName;<br />

MacroID := absMacros.item.ID;<br />

Description := absMacros.item.Description;<br />

LastRun := absMacros.item.LastMacroRun.StartTime;<br />

IsRunning := absMacros.item.IsRunning;<br />

ShowMessage('Macro' + ': ' +<br />

' File name - ' + FileName + '; ' +<br />

' Description - ' + Description + '; ' +<br />

' ID - ' + IntToStr(MacroID) + '; ' +<br />

' IsRunning - ' + BoolToStr(IsRunning) + '; ' +<br />

' LastMacroRun - ' + DateTimeToStr(LastRun));<br />

// Obtains the list of the macro's presets<br />

absPresets := absMacros.item.Presets;<br />

// Prints information on each preset<br />

for j:=0 to absPresets.Count-1 do<br />

begin<br />

PresetName := absPresets.item.Name;<br />

PresetID := absPresets.Item.ID;<br />

PresetRunMode := absPresets.Item.RunMode;<br />

PresetCmdLine := absPresets.Item.CmdLine;<br />

PresetAccount := absPresets.Item.Account;<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

ShowMessage('preset' + IntToStr(j) + ': ' +<br />

' Name - ' + PresetName + '; ' +<br />

' ID - ' + IntToStr(PresetID) + '; ' +<br />

' RunMode - ' + IntToStr(PresetRunMode) + '; ' +<br />

' CmdLine - ' + PresetCmdLine + '; ' +<br />

' Account - ' + PresetAccount + '; ');<br />

absPresets.moveNext;<br />

end;<br />

absMacros.moveNext;<br />

end;<br />

// History<br />

historyString := 'History of the last macro:';<br />

absMacros.moveLast;<br />

// Gets the ID of the last macro<br />

ID := absMacros.item.ID;<br />

// Obtains the macro run history<br />

history := absGadget.GetHistory(ID);<br />

// Iterates through the history items and prints information on each macro<br />

run<br />

for i:=0 to history.Count-1 do<br />

begin<br />

historyString := historyString + DateTimeToStr(history.item.StartTime) +<br />

'; ';<br />

history.moveNext;<br />

end;<br />

ShowMessage(historyString);<br />

// Progress<br />

// Runs macro<br />

absGadget.SendCommand(ID, 1, 0);<br />

// Obtains the macro run progress<br />

progress := absGadget.GetProgress(ID);<br />

// Iterates through the macro run progress items and prints information on<br />

each progress group<br />

for i:=0 to progress.Count-1<br />

do<br />

begin<br />

ProgGroupName := progress.item.Name;<br />

ProgGroupState := progress.item.State;<br />

ProgGroupRunTime := progress.item.ExecTime;<br />

DecodeTime(ProgGroupRunTime, Hour, Min, Sec, MSec);<br />

ShowMessage('Group Name - ' + ProgGroupName + '; ' +<br />

' State - ' + IntToStr(ProgGroupState) + '; ' +<br />

' ExecTime - ' + IntToStr(Hour) + ' hour ' + IntToStr(Min) +<br />

' min' + IntToStr(Sec) + ' sec');<br />

progress.MoveNext;<br />

end;<br />

// Closes the connection to the server computer<br />

absGadget.Disconnect;<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

153


154<br />

end;<br />

end.<br />

<strong>Build</strong> Requests<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server lets the user request macro runs instead of directly running them. This<br />

feature lets the users, who do not have permissions for running server macros, trigger them on demand. For<br />

example, developers can request a build<br />

after they have committed changes made to the application’s sources<br />

into a version control system; testers can request a new build that will include bug fixes they need to test, and<br />

so on.<br />

For more information about build requests, see the following topics:<br />

About <strong>Build</strong> Requests<br />

Explains the purpose of build requests, how they work and how you can make use of them in your<br />

automated build environment.<br />

Preparing Macros for Request Processing<br />

Explains how to enable request submission for individual build macros and set up triggers that will<br />

start the build upon user requests.<br />

Submitting, Editing and Deleting Requests<br />

Explains how to submit build requests, modify and delete pending requests.<br />

Types of Request Triggers<br />

Describes the types of request-based build triggers.<br />

Description<br />

of the Requests Section<br />

Describes<br />

the information presented in the Requests section of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web<br />

Interface used to manage requests.<br />

Managing <strong>Build</strong> Nodes<br />

Explains how you can analyze and manage information about requested builds, which is displayed in<br />

the Requests section of the Web Interface.<br />

Viewing Reports on <strong>Build</strong> Requests<br />

Explains how you can get reports on requests submitted for a particular server macro.<br />

Related Topics of Interest<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server Web Interface<br />

Describes <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface and its main features.<br />

Automatic <strong>Build</strong> Notifications<br />

Explains how you can configure <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> on your build server so that it<br />

automatically notifies the users about changes in the build’s state.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

About <strong>Build</strong> Requests<br />

There are several ways to run builds on the build server. For example, builds can be scheduled to run<br />

daily or weekly, or can be started manually by the users (such as project leaders) who have the Run macros<br />

permission on the server. However, a tester may need a new build that will include new features or certain<br />

bug fixes in order to test them. For this purpose, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> provides users with the possibility<br />

to request build runs. This enables the users who cannot start builds directly due to insufficient<br />

permissions,<br />

trigger builds along with authorized users, just in a different way.<br />

To provide this<br />

functionality, each server macro (or macro preset) is associated with one or more build<br />

triggers<br />

that analyze requests submitted by the users and start the build if a particular condition is met. For<br />

example, a build can be started after a particular number of requests have been received, after a specific time<br />

period elapses after the latest received requests, or it can be run at a specified time in a day if at least one<br />

request has been submitted, and so on. To learn more about request-based build triggers, see Types of<br />

Request Triggers and Preparing Macros for Request Processing.<br />

Users c an submit build requests via a special form in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s Web Interface. (See<br />

Submitti ng , Editing and Deleting Requests.) In this form, the users can choose one or several build macros<br />

(or macro presets)<br />

that they want to run, specify the request description and priority. The description can, for<br />

instance, include the list of bugs fixed, new features implemented or specify a reason why the user needs a<br />

new build. The<br />

request priority is analyzed by certain build triggers, which require higher-priority requests to<br />

start the build than lower-priority ones.<br />

All submitted requests are collected by the server and processed by build triggers. Once the trigger<br />

condition is met, the build is started. You can monitor and manage the build execution in the same way as if<br />

you have di<br />

rectly started the build. For example, you can pause the build and resume it at a later time, view<br />

the build progress<br />

and so on.<br />

Preparing<br />

Macros for Request Processing<br />

In order for you builds to be started by user requests, you need to prepare the build macros (macro<br />

preset)<br />

in a special way. Namely, you need to:<br />

1. Enable request submission for the macro (macro preset).<br />

2. Configure request-based build triggers for the macro.<br />

This topic explains how you can do this. Before<br />

you proceed, please note the following:<br />

• It is only possible to perform the mentioned tasks via <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s Web Interface.<br />

So, the Web Interface<br />

must be installed on your build server.<br />

This functionality is not available in the Client panel.<br />

• To be able to perform<br />

these tasks, the user group to which your account belongs, must have the<br />

Administer server permission on the server.<br />

• This explanation assumes that you are already logged into <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web<br />

Interface.<br />

If you are not, launch your Internet<br />

browser, open the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface<br />

login page (the default address is http://ServerName_or_IP/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web/), specify<br />

your authentication information and log in.<br />

To enable request submission for a macro<br />

• In the Macros section of the Web Interface, select the desired macro (or macro preset) and click<br />

<strong>Build</strong> Settings.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

155


156<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• In the ensuing <strong>Build</strong> Settings dialog, select the General section and check the Enable build<br />

requests option.<br />

• Click OK to close the dialog and<br />

save the changes.<br />

To configure build triggers for a macro<br />

• Select the desired macro (macro preset) in the Macros section and click<br />

• In the ensuing <strong>Build</strong> Settings dialog, switch to the Triggers page.<br />

<strong>Build</strong> Settings.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

On that page:<br />

Check the triggers that you want to use. For more information about types of build triggers<br />

that monitor user requests, see Types of Request Triggers.<br />

Set up the properties of each selected trigger.<br />

- In the<br />

High field, enter the number of high-priority requests that must be submitted in<br />

order for the trigger to start the build.<br />

Otherwise, if you want the build to start only after all of the selected triggers fire, check the<br />

Wait for all active triggers option.<br />

Submitting, Editing and Deleting Requests<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server collects<br />

information about build requests submitted by the users and<br />

displays them in the Requests section of the<br />

server’s Web Interface. The users can view the requests and, if<br />

they have the appropriate permissions, submit new requests as well as modify and delete existing requests.<br />

In order for users to submit build requests and for these requests to be successfully processed on the<br />

server,<br />

the following requirements must be met:<br />

1. Request submission<br />

must be enabled for the target build macro (or macro preset). That is, the Enable<br />

build requests setting must be checked<br />

in the macro (macro preset) properties. Otherwise, the users<br />

will be unable to submit requests for this macro (macro preset). See Preparing Macros for Request<br />

Processing to learn how to enable this option.<br />

2.<br />

To set up the Time to pass after the latest request for this macro preset trigger:<br />

- In the edit box under the trigger name, enter the time period that must pass without any<br />

new requests before the trigger will start the build. Select the time unit - hours, minutes<br />

or seconds - from the dropdown list.<br />

To set up the Minimum request count to start this macro preset trigger:<br />

- Similarly, enter the number of normal- and low-priority requests required to start the<br />

build in the Normal and Low fields respectively.<br />

To set up the Triggers if at least one request exists at a given time of day trigger:<br />

- In the edit box under the trigger name, enter the build start time, in the HH:MM format.<br />

For example, 20:00.<br />

- Check the days of week on which the trigger should run. For example, to trace the<br />

trigger on workdays, check Mon, Tue, Wed, Thu and Fri.<br />

If you want the triggers to function independent on each other, make sure that the Wait for<br />

all active triggers option is unchecked. In this case, the build will be started once any of<br />

these triggers fires.<br />

• Press OK to close the dialog and save the changes.<br />

Requirements<br />

At least one request-based build trigger must be enabled for the target macro (macro preset). To learn<br />

ho w to configure these triggers, see Preparing Macros for Request Processing. Otherwise, the users’<br />

requests<br />

will be received but will not trigger the macro run.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

157


158<br />

3.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

The users, who are meant to submit requests, must have one of the following permissions on the<br />

server:<br />

• Add and modify own build requests<br />

This permission enables the users to submit new requests and modify their own requests.<br />

This permission enables the users to submit new requests, modify and delete existing requests<br />

(posted by the user themselves as well as other users), edit build descriptions and merge build<br />

nodes. It automatically includes the Add and modify own build requests permission.<br />

If a user has none of these permissions, they can only monitor requests, but not manage them. For<br />

more information on user permissions, see <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server - User Permissions.<br />

The way you can submit build requests depends on whether you are already<br />

logged into <strong>Automated</strong><br />

<strong>Build</strong><br />

<strong>Studio</strong> Web Interface or not.<br />

1. Launch your Internet browser and go to the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Server Web Interface login<br />

page (the default address is http://ServerName_or_IP/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web/).<br />

2. Enter your user name and password or check Authenticate<br />

by OS to log in using your Windows<br />

account.<br />

3.<br />

• Manage build requests<br />

To submit a new build request<br />

If you are currently off-line, follow these steps:<br />

Check the Just submit build request option (see the image below) and log in:<br />

4. In the<br />

ensuing Add <strong>Build</strong> Request dialog, check the macros (macro presets) whose run you want to<br />

requ est, enter the request description and choose the request priority - Low, Normal (default) or<br />

High.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

Click<br />

OK to submit your request.<br />

5. To submit another request, repeat step 4.<br />

6. After you have submitted all the needed requests, click Cancel to log off the Web Interface.<br />

If you are already logged into the Web Interface, do the following:<br />

1. In the Macros section, select the macro (or macro preset) whose execution you want to request.<br />

2. Switch to the Requests tab and click Add Request. The Add <strong>Build</strong> Request dialog appears.<br />

3. In the dialog, check the macros (macro presets) whose run you want to request, enter the request<br />

description, choose the request priority and click OK.<br />

Two notes:<br />

• The request description is required; it is not possible to submit an empty request.<br />

• If t he macro list is empty, it is most probably that you do not have the Run macros permission<br />

and you have enabled the Hide non-available macros in bui ld request dialog option in the<br />

Client<br />

Settings. Disable this option and try submitting your request again.<br />

To mod ify a request<br />

To modify an existing request:<br />

• In th e Macros section of the Web Interface, select the macro (or macro preset) whose run was<br />

requested<br />

and switch to the Requests tab.<br />

• Select<br />

the desired request in the list and click Edit Request.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

159


160<br />

• Modify<br />

the request description and priority as your needs dictate.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• After you have made the needed changes, press OK to commit them.<br />

Note: It is only possible to modify pending requests<br />

only (in other words, requests are displayed<br />

under<br />

the Next <strong>Build</strong> node). Other requests, which have already triggered the macro run, are<br />

read-only.<br />

To delete a request<br />

To delete a pending build request, select it in the Requests section of the Web Interface and click<br />

Remove<br />

Request.<br />

Note: It is only possible to delete pending requests only (in other words, requests that are displayed<br />

under the<br />

read-only.<br />

Next<br />

<strong>Build</strong> node). Other requests, which have already triggered the macro run, are<br />

However, you can remove implemented requests by removing information about a build that<br />

was triggered by these requests. For more information, see Managing <strong>Build</strong> Nodes.<br />

Types<br />

of Request Triggers<br />

In orde r to initiate macro runs on the server by user requests, you use special types of macro triggers. A<br />

trigger is an event that initiates the macro run when certain conditions are met. For example, when a certain<br />

number of requests have been submitted for the macro, or after a certain time period passes after the latest<br />

request.<br />

There are three types of triggers that monitor requests submitted by the users and initiate the macro runs<br />

when a particular condition is met:<br />

Trigger Type Description<br />

Time<br />

to pass after Starts the build after the specified time period (in hours, minutes or seconds) elapses<br />

the<br />

latest request after the latest request has been submitted.<br />

If a new request is posted during the wait<br />

time, the timer starts again. This helps prevent a build from being triggered<br />

if<br />

requests are being submitted quite often.<br />

The default wait time is 1 hour.<br />

Minimum request<br />

Starts the build after the given number of high-, normal- or low-priority requests<br />

count<br />

have been received. This trigger also helps you prevent builds by specifying how<br />

many requests for each priority level (high, normal and low) are needed to start the<br />

build.<br />

The default settings are: 3 high-, 10 normal- or 50 low-priority<br />

requests.<br />

At<br />

least one Starts the<br />

build at the specified time on the specified day(s) of week if there is at<br />

request<br />

exists at a least one pending request. This trigger lets you run builds daily, nightly or weekly,<br />

given time of day only on demand.<br />

Unlike continuous integration triggers, request triggers are configured via <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web<br />

Interface. See Preparing Macros for Request Processing.<br />

You can enable as many of these triggers as your needs dictate. Multiple triggers can be combined by<br />

using the logical AND or OR conditions. To specify the condition type, you can use the macro’s Wait for all<br />

active triggers setting. By default, it is disabled, which means that the triggers work independent of each<br />

other (combined via the OR condition). For example, if you have enabled the Minimum request count and At<br />

least one request exists at a given time of day triggers, the macro will be started when the specified number<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

of pending requests have been accumulated, or when the specified time of day comes provided that there is at<br />

least one pending request.<br />

If the Wait for all active triggers setting is checked, the triggers will function jointly (that is, they are<br />

combined via the AND condition).<br />

In this case, the macro will be started only after conditions of all of the<br />

enabled triggers have been met. For example,<br />

if you have enabled the Minimum request count and At least<br />

one request exists at a given time<br />

of day triggers, the build will be fired on the specified time of day provided<br />

that the given number of requests have been received.<br />

Description of the Requests Section<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> collects information about build requests submitted by the users and displays<br />

them in the Requests section of the server’s Web Interface. To open this section:<br />

• Launch your Internet browser, open the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Web Interface login page (the<br />

default address is http://ServerName_or_IP/<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>Web/) and log in.<br />

• In the Macros section, select the macro (or macro preset) for which you want to view build<br />

requests, and click the Requests section header.<br />

The Description and File Name fields in the top of the section indicate the description and file name of<br />

the selected macro (or macro preset). The grid below lists all requests for the macro run, in the reverse order:<br />

the latest submitted requests are displayed at the top and the earliest ones at the bottom of the<br />

list.<br />

Information about requests is displayed in the following columns:<br />

Column Description<br />

Description The request description that was specified by the user. The icon next to the request<br />

description indicates the request priority - low, normal or high.<br />

Launched /<br />

Posted By<br />

The user who has submitted the request.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

161


162<br />

Event Date The date and time the request was submitted.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

All requests are grouped into nodes corresponding to builds in which these requests are implemented.<br />

Each build is assigned a sequence number starting from 1. You can manage these nodes, for example, give<br />

them some meaningful description, or merge them in order to keep only specific builds in the<br />

history (see<br />

Managing <strong>Build</strong> Nodes<br />

for details). Information about build nodes displayed in the grid is as follows:<br />

Column Description<br />

Description The build description.<br />

Launched<br />

Posted<br />

By<br />

/ The way the build macro was launched:<br />

• Manual: User_Name – The macro was launched by the specified user directly<br />

from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or by <strong>Automated</strong> Macro Player.<br />

•<br />

Remote execution – The macro was launched from another macro via the Remote<br />

Macro Command operation.<br />

• Client: User_Name – The macro was launched by the specified user from the<br />

Client panel, via Web Interface or via the<br />

gadget.<br />

• Scheduler – The macro was launched by a scheduled task.<br />

•<br />

•<br />

<strong>Build</strong> requests – The macro was launched as a result of build requests.<br />

Continuous integration – The macro was launched by a continuous integration<br />

task.<br />

Event Date The date and time the build was finished.<br />

To view the most recent information on build requests, do any of the following:<br />

• Click the Refresh button in the Requests section’s toolbar.<br />

– or –<br />

• Use the Refresh command of your Internet browser, or the corresponding keyboard shortcut (in<br />

many browsers it is F5).<br />

For information about working with the Requests section, see Submitting, Editing and Deleting Requests<br />

and Managing <strong>Build</strong> Nodes.<br />

Managing <strong>Build</strong> Nodes<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> collects information about build requests (in other words, requests for server<br />

macro runs) submitted by the users and displays it in the Requests section of the Web Interface:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

To let you know which requests triggered or will trigger which builds, all requests are grouped into<br />

nodes that correspond to individual build runs. These<br />

items are named <strong>Build</strong> N, where N is a sequence<br />

number<br />

(starting from 1) assigned to a particular build. For example, <strong>Build</strong> 1, <strong>Build</strong> 2 and so on. Besides,<br />

there are also two predefined items:<br />

• Next <strong>Build</strong> – This node groups all pending requests.<br />

• Running <strong>Build</strong> – This node corresponds to the currently running build. It groups requests that<br />

the current build implements.<br />

You can manage the build nodes, for example, give them a meaningful description, or merge them in<br />

order to keep specific items in the build history. For example, you may want to merge intermediate build<br />

items into an item corresponding to the released build, which will group all requests that ultimately lead to<br />

this build.<br />

By default, the server creates these grouping nodes for all builds that take place on the server. However,<br />

it may be useful to only keep information about requested builds,<br />

so the request history is not cluttered. For<br />

this purpose, disable the Save builds without build requests option in<br />

the Server Settings dialog. To enable<br />

counting of all the builds, regardless of whether they were launched by requests or directly, check<br />

the Save<br />

builds<br />

without build requests option.<br />

Note: Disabling the Save builds without build<br />

requests option does not remove information about<br />

existing build nodes that contain<br />

no requests.<br />

To rename a build node<br />

• In the Macros section of the Web Interface, select the macro<br />

(or macro preset) whose build you<br />

want to give a specific description,<br />

and switch to the Requests<br />

tab.<br />

•<br />

Select the desired build node in the list and click Describe <strong>Build</strong>.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

163


164<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server and Web Interface<br />

• Specify the new description for the build and press OK to save the changes.<br />

Note that the Next <strong>Build</strong> and Running <strong>Build</strong> nodes cannot be renamed.<br />

To merge several build nodes<br />

• In the Macros section of the Web Interface, select the macro (or macro preset) whose build<br />

information you want to merge.<br />

• Switch to the Requests section and click Merge <strong>Build</strong>s.<br />

• In the ensuing dialog, check the builds nodes that you want to merge and enter the description<br />

for the new (merged) node.<br />

• Press OK to perform merging.<br />

Note that the Next <strong>Build</strong> and Running <strong>Build</strong> nodes cannot be merged.<br />

To delete a build node<br />

• Select the desired node in the Requests section of the Web interface.<br />

• Press Remove <strong>Build</strong>.<br />

Note: Deleting<br />

a build node from the Requests section also deletes information about requests<br />

implemented in that build.<br />

Also, note that the Next <strong>Build</strong> and Running <strong>Build</strong> nodes cannot<br />

be removed.<br />

Viewing Reports on <strong>Build</strong> Requests<br />

<strong>Automated</strong><br />

<strong>Build</strong><br />

<strong>Studio</strong> Server can generate reports on requests submitted by the users for a particular<br />

serv er macro run. The report functionality is available in <strong>Build</strong> <strong>Studio</strong>’s Web Interface. The reports include<br />

the same information that is displayed in the Requests section of the Web Interface, but in the printable<br />

form.<br />

To get a report for<br />

a specific build macro run:<br />

• In the Macros section of the Web Interface, select the macro (or macro preset) for which you<br />

want to get the report, and switch to the Requests tab.<br />

• Select the desired build<br />

in the list.<br />

• Click Show Report and select Show current build report from the drop-down menu.<br />

To get a report for all runs of a build macro:<br />

• In the Macros section of the Web Interface, select the macro (or macro preset) for which you<br />

want to get the report, and switch to the Requests tab.<br />

• Click Show Report and select Show all builds report from the drop-down menu.<br />

The report will be opened<br />

in a new browser window. You can save this report to your computer, print it,<br />

e-mail it to<br />

your colleagues<br />

or perform any other actions that are supported by your browser.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Charts<br />

Charts<br />

Charts – Overview<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can collect information about macros running on your computer and display the<br />

information as graphics in the Charts panel. You can use this information to analyze the run statistics,<br />

determine the ratio of successful and failed runs, check the runs activity and organize macro runs.<br />

Note: The statistical data is available if the Collect information about macro<br />

runs macro property is<br />

enabled. By default this property is enabled.<br />

<strong>Build</strong> <strong>Studio</strong><br />

logs the following data:<br />

•<br />

•<br />

The macro name.<br />

Configuration used for the run.<br />

• Date<br />

and time of the run.<br />

• Duration of the macro run.<br />

• Name<br />

of the user, who initiated the macro run.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> displays this information using one of several chart types. You can view<br />

statistics for al l macros that were run on your computer, or only for one macro. You can view macros<br />

running<br />

by all users or by some specific user. Of course, you can specify the date range for displaying the<br />

statistics.<br />

The following topics provide detailed information<br />

about this:<br />

Charts Panel<br />

Describes the Charts panel and contains information about viewing and printing statistics of macro<br />

runs that were performed<br />

on the current or remote computer.<br />

Char t Types<br />

Explains<br />

chart types used by <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Viewing Charts Data Stored on Another Computer<br />

Viewing charts data stored on another computer.<br />

Moving<br />

Charts Data From One Computer to Another<br />

Explains<br />

where <strong>Build</strong> <strong>Studio</strong> stores data displayed in the charts panel and describes how to move<br />

them from one computer to another.<br />

Charts Panel<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> collects information on macro runs performed on your computer and displays it<br />

in graphical form in the Charts panel. Use this panel to analyze accumulated statistics, estimate the builds<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

165


166<br />

Charts<br />

progress and determine the better time for running<br />

your macro. Using the panel, you can also view statistics<br />

on macro<br />

runs that were performed on another computer.<br />

If the Charts panel is hidden, you can make it visible by doing any of the following:<br />

• Select Charts from the View menu.<br />

• Select Charts from the Select Panel dialog, which is called by selecting View | Select Panel<br />

from the menu of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, or by selecting <strong>Build</strong> <strong>Studio</strong> | Panel List from the<br />

main menu of Visual <strong>Studio</strong>.<br />

<strong>Build</strong> <strong>Studio</strong> displays the gathered information using several<br />

chart types:<br />

• <strong>Build</strong> Results - Provides general view of macro run statistics.<br />

• <strong>Build</strong> Duration - Let’s you compare the execution time of different macro runs.<br />

• <strong>Build</strong> Frequency - Let’s you explore the load (macro runs) on your computer.<br />

The following image displays a sample view of the panel (the <strong>Build</strong> Duration chart type):<br />

Specifying the chart<br />

type<br />

The name of the currently<br />

selected chart type is displayed at the top of the panel. You can switch<br />

between different chart types by clicking the arrows shown to the right and to the left of the active chart type<br />

name<br />

or using the Right and Left arrow keys as shortcuts.<br />

You can also click Chart type at the top-right corner of the panel and choose the desired type in the<br />

ensuing Select Chart Type dialog.<br />

For more information on chart types, see Chart Types.<br />

Specifying the date range<br />

To specify the date range for the data that is displayed:<br />

• Click Data type at the top-right corner of the panel.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Charts<br />

• Choose the desired period in the ensuing Select Date Range dialog.<br />

By clicking the arrows shown on the left and on the right of the date range, you switch to the previous or<br />

next period. For instance, if you select Last month in the Select Date Range dialog, clicking the left and<br />

right arrows you can view statistics for the previous and next months. If you select custom range, then<br />

clicking on the arrows will return or advance the view to the next number of the days that are included into<br />

the specified range.<br />

Also, you can switch the date range with the Up and Down arrow keys.<br />

View results for one macro and configuration only<br />

For each macro run <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> logs information about the macro name and configuration<br />

that was used for the run (see Charts - Overview). By default, the charts display results for all macros. To<br />

only view results for one macro and configuration:<br />

• Click the third link in the top-left corner of the panel (by default, the link’s text is All macros).<br />

This will invoke the Select Macro and Configuration dialog. This dialog lists the macro-<br />

configuration pairs.<br />

• In the dialog, choose the desired macro-configuration pair and click OK.<br />

You can also switch between macro-configuration pairs by clicking the arrows that are shown to the left<br />

and to the right of the link or with the Shift-Right and Shift-Left shortcuts.<br />

To view macro runs performed by a user<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> tracks macro runs performed by all users who work with <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> or <strong>Automated</strong> Macro Player on your computer. By default, the Charts panel does not filter the macro<br />

run by the name of the user, who started the run. To view results only for one user:<br />

• Click the second link<br />

in the top-left corner of the panel (by default, the link’s text is All<br />

operators).<br />

This will invoke the Select Operator dialog. This dialog lists names of users who run macros on<br />

your computer.<br />

• In the dialog, choose the desired user name and click OK.<br />

You can also view results for users by clicking the arrows that are shown to the left and to the right of the<br />

link or with the Shift-Up and Shift-Down shortcuts.<br />

To view information on macro runs performed on another computer<br />

Using the Charts panel you can view statistics on macro runs that were performed not only on your<br />

computer, but on other computers in the network. In order for the panel to be able to display this information,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service must be installed and running on the remote computer.<br />

To view results stored on another computer:<br />

• Click the left link in the top-left corner of the panel (by default, the link’s text is Local).<br />

This will invoke the Select Server dialog.<br />

• In the dialog, specify the name of the desired computer or its IP address. You can also click the<br />

ellipsis button and choose the computer in the ensuing<br />

Browse for Computer dialog.<br />

• Click OK to close the Select Server dialog. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will retrieve data from the<br />

specified computer and display it in the Client panel.<br />

To zoom in the view<br />

• Press the left mouse button to and drag the mouse pointer toward the right bottom corner to mark<br />

the area to be enlarged.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

167


168<br />

• Release the mouse button when you specified the area to be enlarged.<br />

To zoom out the view<br />

• Press the left mouse button to and drag the mouse pointer towards the top-left corner.<br />

• Release the mouse button.<br />

To print the chart<br />

• Select the desired chart type and date range (see above for more information on this).<br />

Charts<br />

• Right-click somewhere within the chart and choose Print or Print Preview from the context<br />

menu.<br />

The Print command will open the standard Print dialog, from which you can send data to the printer. The<br />

Print Preview command will open the Print Preview Form, in which you can customize the chart before<br />

printing it.<br />

Chart Types<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> collects information about macros running on your computer and displays it in<br />

the Charts panel<br />

using one of the following chart types:<br />

• <strong>Build</strong><br />

Results<br />

• <strong>Build</strong> Duration • <strong>Build</strong> Frequency<br />

The name of the curr ently selected chart type is shown at the top of the Charts panel.<br />

To choose a chart type to display, click Chart type at the top-right corner of the Charts panel and then<br />

choose the desired type in the ensuing Select Chart Type dialog. You can change the chart type by clicking<br />

arrows on the right and on the left of the currently selected chart type or by pressing the Right and Left<br />

arrows<br />

on keyboard.<br />

<strong>Build</strong> Results<br />

When this type<br />

is selected, the Charts panel displays the bar diagram of successful and failed macro runs.<br />

The horizontal access displays dates and the vertical axis shows the number of runs. Each bar represents a<br />

day in which at least one macro run was performed. The lower section of the bar corresponds to successful<br />

macro runs, the upper section corresponds to failed<br />

runs. When you moved the mouse pointer over a bar, a<br />

hint<br />

displaying detailed information appears.<br />

Using this chart type you can see statistics and ratio of successful/failed<br />

builds and determine the builds<br />

progress.<br />

<strong>Build</strong> Duration<br />

When this type is selected, the Charts panel displays<br />

statistics about how long it takes for macro runs to<br />

execute. The horizontal axis displays dates and the vertical<br />

axis displays the run duration.<br />

Each run is represented by a dot. To view information on the run, that<br />

corresponds to a dot, simply move<br />

the mouse pointer over that dot. <strong>Build</strong> <strong>Studio</strong> will show the run information in a hint.<br />

Using this chart type<br />

you can find the slowest macro runs and determine when they happened. This<br />

information will help you<br />

find the reason of the slowdown.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Charts<br />

<strong>Build</strong> Frequency<br />

When this type is selected, the Charts panel displays<br />

information on how often builds are performed. The<br />

h orizontal axis displays dates and the vertical axis shows the time (from 00:00 to 23:59). Each run is<br />

represented by a dot. To view information on the run, that corresponds to a dot, move the mouse pointer over<br />

the dot. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will show the information in a hint.<br />

Using this chart you can find time periods when your computer is the most busy and choose the time for<br />

your builds.<br />

For more information<br />

on viewing charts, see Charts Panel.<br />

Viewing Charts Data Stored on Another Computer<br />

The Charts panel displays statistics on macro runs in a graphical form. The panel can display statistics<br />

accumulated from your computer as well as from any other computer on the network.<br />

In order for the panel to be able to retrieve statistics from the remote computer, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

m ust be installed on that computer, the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service must be running and the macro must<br />

have the Collect information about macro runs property<br />

enabled.<br />

To view charts that are built on statistics stored on<br />

a remote computer:<br />

• Switch to the Charts panel.<br />

• Click the leftmost link at the top-left corner for the panel to select the computer. The link caption<br />

specifies the<br />

name of the currently selected computer. By default, the caption is Local.<br />

• Specify the desired computer’s name or IP address in the ensuing Select Server dialog.<br />

• Click OK to close the dialog. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

will display the macro run statistics in the<br />

Charts panel.<br />

Moving Charts Data From One Computer to Another<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> can collect information about macros running on your computer and display it<br />

as graphics in the Charts panel. You may want to move the collected data to another computer and view it<br />

there or send the accumulated results to your team members for review.<br />

<strong>Build</strong> <strong>Studio</strong> stores the charts data in .xml files located in the following folder:<br />

\All Users\Application Data\<strong>Automated</strong>QA\<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>\<strong>Build</strong><br />

history<br />

Each .xml file corresponds to a macro that was run on your computer. The <strong>Build</strong>History.xml file is the<br />

“main” file and it contains references to other .xml files.<br />

The charts data for a macro is available if the Collect information about macro runs macro property is<br />

enabled on the target computer. By default this property is enabled.<br />

To move the charts data to another computer, simply copy the contents of the <strong>Build</strong> history folder to the<br />

desired computer. Note that you should paste the files to the same folder on that computer. Also, this<br />

computer must have <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> installed on it.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

169


170<br />

Debugging Macros<br />

Debugging Macros<br />

Debugging lets you fix logical errors and check whether your macro functions correctly. <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>’s macro debugger includes all modern debugging features: breakpoints, stepping over<br />

operations, watches, expression evaluation, and so forth. The following topics provide more information on<br />

debugging macros in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Note: <strong>With</strong> <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> you can only edit MS<strong>Build</strong> projects, since it does not allow<br />

running and debugging these projects. So, all debugging features are turned off when you are<br />

editing an MS<strong>Build</strong> project in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Debugging Macros in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Provides information on how to use the macro debugger.<br />

Stepping<br />

Trough The Macro<br />

Describes<br />

how to step over operations or trace into a group of operations during the debugging<br />

process.<br />

Running to the<br />

Cursor<br />

Describes<br />

how to stop the macro execution on the currently selected operation in the Macro panel.<br />

Using<br />

Breakpoints<br />

Explains how you can<br />

create and use breakpoints and how to modify their properties.<br />

Conditional<br />

Breakpoints<br />

Describes how you can create and use conditional breakpoints.<br />

Variables and Constants - Overview<br />

Watches<br />

Panel<br />

Provides information<br />

on the Watches panel and describes how you can use it to watch values of<br />

variables and expressions.<br />

Breakpoints Panel<br />

Provid es information on the Breakpoints panel and describes how you can use it to debug macros.<br />

Evaluating Expressions<br />

Describes<br />

how to evaluate expressions.<br />

Debugging<br />

Macros in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

About<br />

Auto mated <strong>Build</strong> <strong>Studio</strong> provides a macro debugger as an aid in developing macros. Debugging refers to<br />

halting the macro execution at certain lines, with the Macro panel automatically highlighting the line in<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Debugging Macros<br />

question, and then running through<br />

the macro in step with the execution, stopping at those same lines. Every<br />

time the debugger<br />

stops somewhere, there are several things it will allow you to do, such as check or change<br />

the value of variables, but, merely stopping before certain lines is often a great help in tracking what your<br />

macro is doing.<br />

Note that all debugging features are turned off when you are editing an MS<strong>Build</strong> project in <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>. <strong>With</strong> <strong>Build</strong> <strong>Studio</strong><br />

you can only edit these projects, since it does not allow running and<br />

debugging them.<br />

See the Working <strong>With</strong> MS<strong>Build</strong> Projects document or the Working <strong>With</strong> MS<strong>Build</strong> Projects<br />

section in on-line help.<br />

Using t he Macro Debugger<br />

All debug ger actions are available from the Debug menu, toolbar or shortcuts (In Visual <strong>Studio</strong>, from the<br />

<strong>Build</strong> <strong>Studio</strong> | Debug menu and the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar). The left part of the Debug<br />

Toolbar<br />

con tains the execution choices of the debugger. Each of these is the equivalent of a Run Macro button, but<br />

with two differences. First, on a new run, execution starts at the top of the first executed routine. But after<br />

each stop it will resume at the line where the debugger stopped. Second, each execution choice is a different<br />

way of selecting the next line that the debugger will stop on. These facilities function only if the Enable<br />

Macro Debugging<br />

item is pressed.<br />

When debugging<br />

macros, it is recommended that you turn off the Show on macro start option of the<br />

Summary panel,<br />

to disable activating the Summary panel upon macro start. You can turn on the Highlight<br />

operation option<br />

of the Macro panel, to command <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to highlight the operation<br />

currently being executed so you can easily trace the macro execution path.<br />

The two main<br />

ways of macro debugging:<br />

• The debugge r can stop before every enabled operation in the macro. There are two variations,<br />

tracing or stepping over. See Stepping Through the Macro.<br />

• The debugger can run through the macro from the current execution point, without stopping, to<br />

the macro operation that the cursor is on. Execution will stop just before that line. This is one<br />

way of going straight at suspect code. See Running to the Cursor for more information. Note that<br />

execution will not stop until the end of the macro run if the selected operation is never executed.<br />

Operations can also be preset for the run to stop when they are reached. These operations are called<br />

breakpoints. A breakpoint is a location set in your macro where you want the macro to pause during<br />

execution.<br />

Once the execution is paused, you can check the state of the macro, its output and its variables.<br />

Setting a plain breakpoint is the same as running to the cursor, except that you do not have to set the<br />

cursor at the operation<br />

(it is memorized) and you can have several breakpoints. You can also have<br />

conditional breakpoints, where the debugger stops only if, at that point in the run, a certain condition you<br />

defined<br />

is true. See Using Breakpoints.<br />

Once you have halted the execution, you can check the value of variables and expressions in two ways.<br />

You can use the Evaluate dialog, which lets you find the value of any expression you can define with<br />

available variables and constants and the usual arithmetic and logical operators, or by using the Watches<br />

panel where you can set up a list of these expressions to be evaluated every time the macro execution stops.<br />

Possible Issues<br />

When debugging macros in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, keep in mind that the Highlight operation option<br />

slows the macro execution speed.<br />

As well as monitoring many expressions at once in the Watches panel,<br />

especially if they involve a lot of calculations.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

171


172<br />

Stepping<br />

Through the Macro<br />

Debugging Macros<br />

Stepping<br />

means executing just one macro operation, then stopping (until the next step) to check the state<br />

of the macro,<br />

its output and its variables. The next operation to be executed is highlighted in the Macro<br />

panel.<br />

There are two ways to step through the macro, depending on what is meant by “executing just one<br />

operation”<br />

when that operation contains a call to a sub-macro: Trace Into or Step Over.<br />

Trace<br />

Into<br />

Under<br />

Trace Into, execution proceeds one operation at a time. If the operation contains a call to a sub-<br />

macro (for example, the Run Submacro operation), <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> jumps to the first operation<br />

of<br />

that sub-macro and stops there, ready to step through it again, one operation at a time. After <strong>Build</strong> <strong>Studio</strong> has<br />

reached the<br />

end of the sub-macro, it jumps to the operation following the operation that called the sub-macro.<br />

To trace into<br />

the macro, press either:<br />

•<br />

•<br />

Trace Into on the Debug toolbar (or from the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar in Microsoft<br />

Visual <strong>Studio</strong>).<br />

The Trace into shortcut. For the MS Visual <strong>Studio</strong> IDE keyboard scheme, it is F11, for the<br />

Borland IDE scheme - F7. You can also change the assigned shortcut via the Customize<br />

Keyboard<br />

dialog.<br />

To trace<br />

into the macro, press Trace Into on the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar.<br />

Step Over<br />

Tracing into library submacros is currently not supported. Being applied to the Run Library<br />

Submacro operation, the Trace Into command executes the entire library submacro and jumps<br />

to the operation that follows the submacro call.<br />

Under Step Over, execution proceeds one operation at a time<br />

within the macro or sub-macro where the<br />

execution point is now located. If the next operation contains a sub-macro call, the whole call is executed in a<br />

single step<br />

(full speed, no stop), and execution stops at the next operation in the current macro (sub-macro).<br />

To step over<br />

the macro (sub-macro), press either:<br />

•<br />

Step Over on the Debug toolbar (or from the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar in Microsoft<br />

Visual <strong>Studio</strong>).<br />

• The Step Over shortcut. For the MS Visual <strong>Studio</strong> IDE keyboard scheme, it is F10, for the<br />

Borland IDE scheme - F8. You can also change the assigned shortcut via the Customize<br />

Keyboard dialog.<br />

Running Macros Partially<br />

Besides running the entire macro<br />

or running it to the cursor position, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> offers<br />

three more ways of running a certain part of a macro (that is,<br />

you can run one or more operations of a<br />

macro). This is quite useful<br />

when testing or debugging a macro.<br />

The Run From Selected command starts the macro run from the chosen operation and continues the<br />

execution till the last operation in the macro. <strong>Build</strong> <strong>Studio</strong> executes only those operations that are currently<br />

checked in the Macro panel, unchecked operations are skipped. If the selected operation has a parent<br />

ope ration, you can run the macro only if the parent is either a Group or an If ... Then operation.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Debugging Macros<br />

The Run Selected Operation command executes only the chosen operation and stops upon executing<br />

it. The operation is launched even if it is unchecked. If the operation has child operations, they are not<br />

executed.<br />

The Run Selected Operation <strong>With</strong> Children command executes the chosen operation as well as the<br />

operation’s children and stops afterwards. The operation is launched even if it is unchecked.<br />

To call these commands, do any of the following:<br />

• Press the Run From Selected, Run Selected Operation or Run Selected Operation<br />

<strong>With</strong> Children button on the Standard<br />

toolbar of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>,<br />

or on the Macro<br />

panel toolbar of Microsoft Visual <strong>Studio</strong>.<br />

• Select the corresponding item from the Run menu of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

• Right-click<br />

within the Macro panel<br />

and select the corresponding item of the context menu.<br />

• Press the shortcut that corresponds<br />

to the command. The shortcuts are set and changed via the<br />

Customize Keyboard dialog.<br />

• The default<br />

key combinations are: Ctrl+F5 for Run From Selected, Alt+F5 for Run Selected<br />

Operation<br />

and Shift+Ctrl+F5 for Run Selected Operation <strong>With</strong> Children.<br />

Running to the Cursor<br />

Running to the cursor is<br />

the easiest way to use the macro debugger. Select the first suspected spot, test up<br />

to it (that is, run at normal speed, no stopping), check that the macro output and macro variables are as<br />

expected, and if ok, select a new check spot to test up to. At each stop, the next statement to be executed is<br />

highlighted in the Macro panel.<br />

To do this, switch to the Macro panel and select the operation where you want to run your first check.<br />

Then start the macro run using either of these methods:<br />

• Press Run Macro To The Cursor Position on the Debug toolbar (or from the <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> toolbar in Microsoft Visual <strong>Studio</strong>).<br />

• Press the Run Macro to the Cursor Position shortcut key. The default shortcut is F4, though it<br />

can be changed via the Customize Keyboard dialog.<br />

Then, check the state of the macro, its variables and results, select the new stop operation in the macro<br />

and select Run Macro To The Cursor Position again.<br />

Using Breakpoints<br />

A breakpoint is a location in your script where you want the script to pause during execution. Once<br />

execution is paused, you can check the state of the script, its output and its variables.<br />

Breakpoints only function if the Enable Macro Debugging item on the Debug toolbar is checked<br />

(the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar in Microsoft Visual <strong>Studio</strong>). If this item is unchecked, the macro<br />

execution will not pause on breakpoints.<br />

The breakpoints list is kept for each macro. Each breakpoint can be enabled or disabled and made<br />

dependent on a condition - like a pass count or a conditional expression.<br />

When a breakpoint is enabled with the optional condition set to true, and the macro execution reaches it<br />

(in a normal run or using the debugger), execution will stop just before the breakpoint operation. This<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

173


174<br />

Debugging Macros<br />

operation will be highlighted in the Macro panel. If a breakpoint is disabled, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> does<br />

not stop the macro execution.<br />

At any stop you can check the environment state as well as the macro output and the state of its<br />

variables. Using breakpoints is the<br />

easiest and most flexible way to preset spots in your macros where you<br />

want to perform these types of checks.<br />

After the pause, you can resume<br />

the macro execution, or use one of the debugger execution options for<br />

further checking.<br />

To set a breakpoint on an operation, select the desired operation in the Macro panel and click the left<br />

margin of the operation line. When you set a breakpoint, the corresponding<br />

operation is highlighted in red,<br />

and the icon appears in the left margin of the operation line. Setting breakpoints is a toggle, so repeating<br />

the set on the same line will remove the breakpoint.<br />

To set a breakpoint on an operation, select the desired operation in the Macro panel and then use one of<br />

the following methods:<br />

• Click the left margin of the operation line.<br />

• Press the Toggle breakpoint shortcut. (By default, F9. You can change the assigned shortcut via<br />

the Customize Keyboard dialog.)<br />

To work with the list of all breakpoints for the current macro, use the Breakpoints panel. This panel<br />

allows you to enable, disable<br />

or delete breakpoints. To modify breakpoint properties, use the Breakpoint<br />

Properties<br />

dialog. To call it, right-click the breakpoint icon in the gutter of the Macro panel and select<br />

Properties from the context menu. This menu also holds the Enabled item that controls whether the<br />

breakpo int is enabled or disabled. Disable d breakpoints are shown with the icon. Disabling breakpoints is<br />

useful if y ou want to deactivate the breakpoint temporarily without deleting it.<br />

Beside s setting ordinary breakpoints, which<br />

pause the macro execution when the debugger reaches them,<br />

you can make breakpoints pause the macro only<br />

if certain conditions are met. This implies assigning either<br />

conditional expressions, or pass counts (however, using both on a single breakpoint disables it). See<br />

Conditiona l Breakpoints. Condit ional breakpoints are shown with the<br />

disabled conditional breakpoint.<br />

icon. means the breakpoint is a<br />

Note th at you can set breakpoints while your macro is running. The new breakpoint will be set, and your<br />

macro will pause when it reaches the breakpoint.<br />

Conditional Breakpoints<br />

Once you have set a breakpoint, by default, script<br />

execution will pause just before the breakpoint line. By<br />

editing the breakpoint description in the Breakpoints<br />

panel or in the Breakpoint Properties dialog you can<br />

command t he execution to stop at the breakpoint under certain conditions. Such a breakpoint is called a<br />

conditiona l breakpoint.<br />

<strong>Automated</strong> <strong>Build</strong> Stud io uses a special icon for conditional breakpoints -<br />

conditional breakpoint.<br />

, means a disabled<br />

To create a conditional<br />

breakpoint:<br />

• In the Macro panel, click in the gutter on the left of the desired operation. This sets the<br />

breakpoint.<br />

• Select View | Breakpoints from the main menu to activate the Breakpoints panel, or choose<br />

View | Select Panel from <strong>Build</strong> <strong>Studio</strong>’s main menu and then choose Breakpoints from the<br />

ensuing Select Panel dialog (in Visual <strong>Studio</strong>, choose <strong>Build</strong> <strong>Studio</strong> | Panel List from Visual<br />

<strong>Studio</strong>’s main menu and then choose Breakpoints from the ensuing Select Panel dialog).<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Debugging Macros<br />

• In this panel, the new breakpoint will be at the bottom of the list. You can then set one of two<br />

types of breakpoint conditions. The two possible conditions are –<br />

To mod ify the condition and pass count properties of a breakpoint, use the Breakpoint Properties dialog.<br />

To call it, r ight-click the breakpoint icon in the Macro panel gutter and select Properties from the context<br />

menu,<br />

or right-click the desired breakpoint in the Breakpoints panel and select Properties from the context<br />

menu.<br />

Watches<br />

Panel<br />

The Watches panel displays all current watch expressions. A watch expression is a variable (global,<br />

local<br />

or stored) whose current value you wish to track during a macro debugging session. Watch expressions<br />

(watches) are added, removed, disabled or edited from the panel context menu.<br />

•<br />

conditional expressions<br />

pass counts<br />

The panel’s features are turned off when you are editing an MS<strong>Build</strong> project in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

<strong>With</strong> <strong>Build</strong> <strong>Studio</strong> you can only edit these projects, since it does not allow running and debugging them (see<br />

the Working <strong>With</strong> MS<strong>Build</strong> Projects document or the Working <strong>With</strong> MS<strong>Build</strong> Projects section in on-line<br />

help).<br />

To display the Watches panel, do one of the following:<br />

• Select View | Watches from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> main menu.<br />

Choose View | Select Panel from the main menu and choose Watches in the ensuing Select<br />

Panel dialog.<br />

• Choose <strong>Build</strong> <strong>Studio</strong> | Panels from Visual <strong>Studio</strong>’s main menu and then choose Watches from<br />

the ensuing Select Panel dialog.<br />

• Press the View | Watch List shortcut. The default shortcut is Ctrl-Alt-W, though you can<br />

change the assigned shortcut via the Customize Keyboard dialog.<br />

The panel<br />

holds two columns: Expression and Value.<br />

Column Description<br />

Expression<br />

Specifies the name of the variable to be traced. The check box next to the variable name<br />

specifies whether this watch is enabled, that is <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> traces it. If the<br />

check box is clear, the expression is not traced.<br />

Value Specifies the value of the variable specified in the Expression column.<br />

You may<br />

want to keep a watch expression available, but not allow <strong>Build</strong> <strong>Studio</strong> to calculate it. You can<br />

accomplish this by disabling the expression. The expression itself will be grayed, and no value for it will be<br />

displayed. To<br />

enable or disable a watch expression, select or clear the check box in the Expression column.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

175


176<br />

Debugging Macros<br />

You can achieve<br />

the same result if you check or uncheck Enabled in the Edit Watch dialog invoked for the<br />

selected watch<br />

expression.<br />

The Watches<br />

panel is blank until you add watch expressions to it.<br />

To add a watch expression<br />

•<br />

Right-click somewhere within the Watch<br />

List panel and select New Item from the context menu.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will display the Add Watch dialog in which you can specify the<br />

variable whose expression you want to trace.<br />

To modify<br />

a watch expression<br />

• Right-click the desired watch expression in the Watches panel and choose Edit from the context<br />

menu. This will call the Edit Watch dialog, where you can edit the expression.<br />

To delete a watch expression<br />

• Select the desired watch expression in the Watches panel.<br />

• Press Del or right-click the selected expression<br />

and choose Delete from the context menu.<br />

Breakpoints Panel<br />

The Breakpoints panel displays all of the breakpoints that are currently set in your macro. You can use<br />

this panel when debugging <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros. The panel’s features are turned off when you are<br />

editing an MS<strong>Build</strong> project in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. <strong>With</strong> <strong>Build</strong> <strong>Studio</strong> you can only edit these projects,<br />

since it does not allow running and debugging them (see the Working <strong>With</strong> MS<strong>Build</strong> Projects document or<br />

the Working <strong>With</strong> MS<strong>Build</strong> Projects section in on-line help).<br />

By defa ult, the Breakpoints panel resides at the bottom of the Macro panel. If the Breakpoints panel is<br />

hidden, you can do one of the following to display it:<br />

• Select View | Breakpoints from <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s main menu.<br />

• Choose <strong>Build</strong> <strong>Studio</strong><br />

| Panels from Visual <strong>Studio</strong>’s main menu and then choose Breakpoints<br />

from the ensuing Select Panel dialog.<br />

• Press the View | Breakpoints shortcut.<br />

The default shortcut is Ctrl-Alt-B, though you can<br />

change the assigned shortcut via the Custom ize Keyboard dialog.<br />

• Choose View | Select Panel from <strong>Build</strong> <strong>Studio</strong>’s main menu and then choose Breakpoints from<br />

the ensuing Select Panel dialog.<br />

Each row of the Breakpoints list corresponds to a breakpoint that is set in your project. Panel columns<br />

hold information about breakpoints:<br />

Column Description<br />

Enabled Specifies whether the breakpoint is enabled or disabled. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will not<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Debugging Macros<br />

stop the script execution on a disabled breakpoint. If the Enable Macro Debugging<br />

item on the Debug toolbar is not pressed, all breakpoints are treated as disabled. The<br />

disabled breakpoints are marked with the icon, enabled breakpoints - with the icon.<br />

Condition Condition parameter for the breakpoint, if any. After you specified any value in this<br />

column, the breakpoints icon is changed to (or to ) to indicate that the breakpoint is<br />

a conditional breakpoint. For more information, see Conditional Breakpoints and<br />

Breakpoints - Conditional Expressions.<br />

Pas s Count Pass count parameter for the breakpoint, if any. After you specified any value in this<br />

column, the breakpoints icon is changed to (or to ) to indicate that the breakpoint is<br />

a conditional breakpoint (see Conditional Breakpoints and Breakpoints - Using Pass<br />

Count).<br />

Description Any descriptive text on the breakpoint.<br />

You can disable or enable bre akpoints in the panel. To do this, simply<br />

select or clear the Enabled check<br />

box f or the desired breakpoint. The point of disabling a breakpoint<br />

is that you can keep its definition, even<br />

though you temporarily halt its execution. The Breakpoints panel is empty if breakpoints have not been set.<br />

To modify a breakpoint<br />

• Right-click the<br />

desired breakpoint in the Breakpoints panel and select Properties from the<br />

context menu. Use the resulting Breakpoint Properties dialog to modify breakpoint properties.<br />

To delete a breakpoint<br />

• Select the desired breakpoint in the Breakpoints panel.<br />

• Press Del, or right-click the selected breakpoint and choose Delete from the context menu.<br />

• You can also delete a breakpoint by clicking it in the Macro panel gutter.<br />

To jump to the breakpoint operation in the<br />

macro<br />

• Double-click the breakpoint<br />

in the list.<br />

Evaluating Expressions<br />

You can evaluate values of macro variables during macro debugging. To<br />

do this, pause the macro at the<br />

desired<br />

point and then use one of the ways described below.<br />

To pause the macro execution<br />

To pause the macro execution, do one of<br />

the following:<br />

• Set a breakpoint on the desired operation to pause the execution. See Using Breakpoints.<br />

• Set the cursor to the desired operation and then run the macro to the cursor. See Running to the<br />

Cursor.<br />

• Press Pause on the Debug toolbar. If the toolbar is hidden, right-click somewhere in the<br />

toolbar area and choose Debug from the ensuing context menu. (In Visual <strong>Studio</strong>, select Pause<br />

from the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> toolbar.)<br />

Once the macro execution is paused, you can evaluate variable values.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

177


178<br />

Evaluating Expressions<br />

Debugging Macros<br />

T here are two ways of evaluate variables<br />

during the macro debugging: using watches or the<br />

Evaluate<br />

dialog. You can decide which way to use by following the simple rule: If you need to trace a variable value<br />

during the whole m acro debugging session, use the Watches panel. If you need to evaluate values<br />

of certain<br />

variables once, with out tracing them during<br />

the macro run, use the Evaluate dialog.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Script Writing<br />

Script Writin g<br />

Script Writing – Basics<br />

General Information<br />

A script is a single script-language<br />

procedure or function. A script in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is part of a<br />

macro (see Script Operation ). You can modify scripts using the Edit Script Form.<br />

A script can be written in one of the three supported scripting languages: DelphiScript, VBScript or<br />

JScript. For each Script operation, the scripting language is specified in the Operation Properties dialog. All<br />

three supported scripting languages u se only OLE-compatible data types<br />

and cannot use pointers.<br />

DelphiScript support is built in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. VBScript and JScript are supported by DLLs<br />

(of the same name) supplied with Windows or Internet Explorer. To run VBScript or JScript in <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong>, Internet Explorer 5.0 or higher<br />

must be installed on the machine. If you<br />

do not have IE 5 or<br />

higher, you can install the Microsoft scripting components directly. The latest version of these DLLs (as a<br />

part of Windows Script Components)<br />

is available at http://www.microsoft.com/downloads/ .<br />

For detailed information on scripting languages, see:<br />

VBScript http://msdn.microsoft.com/en-us/library/ms950396.aspx<br />

JScript http://msdn.microsoft.com/en-us/library/ms950396.aspx<br />

DelphiScript DelphiScript Description in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> help.<br />

What can your scripts do in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>? They are used mainly to solve the following<br />

problems:<br />

• To perform specific<br />

Operations.<br />

• To assign values to macro variables. See Using Variables and Constants<br />

in Macros.<br />

Note: Macro variables cannot be used as loop variables.<br />

A loop variable should be a local<br />

script variable.<br />

• To call operations<br />

existing in the macro and access their properties. See Working <strong>With</strong><br />

Operations<br />

in Scripts.<br />

• To work with internal<br />

and external objects. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s Object Model can help<br />

you better understand how you can use scripts to work with<br />

different objects.<br />

Note that though supported script languages are quite powerful and let you perform almost any action,<br />

there can be situations when scripts are not helpful. For instance,<br />

it may be impossible to write a script<br />

routine for working with a database of an exotic or obsolete format. In such a case, you can create a custom<br />

operation that will perform the desired actions.<br />

For more information on this, see Creating Custom<br />

Operations in on-line help.<br />

179<br />

actions that cannot be executed with existing operations. See List of<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com


180<br />

Writing Scripts<br />

Script Writing<br />

Each script must have the routine called Main. When <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> runs a script, it calls the<br />

script’s Main routine, which,<br />

in its turn, can call other procedures and functions defined in the script.<br />

Let’s have a look at source code written in the Edit Script Form for a newly created script:<br />

[VBScript]<br />

Sub Main<br />

Lo g.Message("Something<br />

has happened")<br />

End Sub<br />

[JScript]<br />

function Main()<br />

{<br />

}<br />

Log.Message("Something has happened");<br />

[DelphiScript]<br />

procedure Main;<br />

begin<br />

end;<br />

Log.Message('Something has happened');<br />

As you can see, the source code that is created by default includes the Main routine only.<br />

Note that Main does not have parameters. If you need to supply parameters for this routine, you can use<br />

variables or constants defined in your macro. (See also Using Variables and Constants in Macros).<br />

Debuggin g Scripts<br />

Debugging your scripts becomes easier when you use the Log panel of the Edit Script Form. Whenever<br />

you run a scrip t , this panel logs how the script was executed, posts errors it finds and user-defined messages,<br />

so you can always<br />

find out whether there are problems in your scripts and find errors easily if there are some.<br />

Sometimes yo u may need to post custom messages to the log. For this purpose, use methods of the Log<br />

object.<br />

Object<br />

Model<br />

In your macros, the Script operation lets you<br />

perform certain actions that cannot be done with other<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> operations. In most cases, scripts deal with internal objects of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> and external objects of other applications (via OLE/COM interfaces), process variables<br />

defined in the<br />

macro, call operations that exist in the macro and access properties of these operations. <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> treats each variable, constant or operation as an object. This topic explains the object model that is<br />

used<br />

in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Each object can have one parent and one or several<br />

child objects. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> contains a<br />

number of top-level objects, which you can address in scripts directly. To get access to other objects you<br />

should use methods and properties of the top-level objects.<br />

The top-level objects defined in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> are –<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Script Writing<br />

Object Description<br />

ABSUtils Contains methods that perform operations specific to <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> and provides scripting access to the all of the macro operations.<br />

BuiltIn Lets your scripts call routines that are built into<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

See List of Built-In Routines.<br />

Constants and Variables Provides access to variables<br />

and constants defined for a macro in<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. See Using Variables and Constants in Macros.<br />

Log Use methods of this object to post custom messages to <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>’s Log panel from scripts.<br />

Operations Provides access to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> operations<br />

from scripts. In<br />

order for a script to call an operation, this operation must have a unique<br />

name. See Modifying Operation Properties and Working <strong>With</strong> Operations<br />

in Scripts.<br />

Utilities Makes certain<br />

functions and variables of the Borland VCL SysUtils unit<br />

available to your scripts.<br />

See Utilities Object - List of Supported Functions<br />

and Utilities Object<br />

- List of Supported Variables and Constants.<br />

The object model used in scripts of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> differs from that used in AQdevTeam’s<br />

Visual Macro <strong>Build</strong>er. As a result, when porting a macro including scripts between these<br />

applications, you<br />

will see that they<br />

are usually incompatible and need to be rewritten.<br />

Handling Exceptions in Scripts<br />

During the script run different exceptions may occur. For instance,<br />

a script may store improper value to<br />

an operation property or to a stored variable. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> does not provide any new functions or<br />

statements that handle exceptions in scripts. You can use the means provided by scripting<br />

languages.<br />

VBScript<br />

To handle exceptions,<br />

you can use the Err object and the On Error statement. For more information on<br />

them, see VBScript<br />

documentation (the on-line version is available at http://msdn.microsoft.com/enus/library/ms950396.aspx).<br />

The following code demonstrates how you can handle exceptions<br />

in VBScript<br />

routines:<br />

[VBScript]<br />

Err.Clear ' Resets the exception indicator<br />

On Error Resume Next ' If an exception occurs,<br />

' Do something<br />

...<br />

If Err.Number > 0 Then<br />

' An exception occurred !!!<br />

' <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will continue running<br />

' the script rather than stop it<br />

' Posts the exception messages to the test log<br />

Log.Error Err.Description<br />

Else<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

181


182<br />

' No exceptions<br />

...<br />

End If<br />

JScript<br />

Script Writing<br />

To handle exceptions in JScript, use the try{} catch{} finally{} statement. Catch holds code<br />

that is executed when an exception occurs within the try{} block. Finally contains<br />

instructions which are<br />

e xecuted always, regardless whether or not exceptions occur in the try{} block. For more information on<br />

these statements, see JScript documentation (the<br />

on-line version is available at http://msdn.microsoft.com/enus/library/ms950396.aspx).<br />

The following code illustrates how you can handle exceptions in JScript routines<br />

–<br />

[JScript]<br />

try{<br />

}<br />

// Do something<br />

...<br />

catch(e)<br />

{<br />

}<br />

// Posts the exception message to the test log<br />

Log.Error(e.description);<br />

finally{<br />

}<br />

...<br />

DelphiScript<br />

Means that handle<br />

exceptions in DelphiScript are similar to those that handle exceptions in Delphi. This<br />

includes the try... except... end and try... finally...<br />

end statements. These statements handle<br />

exceptions that occur within the try... except and try... finally blocks.<br />

The except... end block is executed only if an exception occurs. Use it to perform specific actions as<br />

a response to an exception. If there are no exceptions, the control is passed to the instruction next to the end<br />

statement.<br />

The finally.. . end block is always executed. Use it to ensure<br />

that certain operations in your code<br />

are completed whether or not exceptions occur.<br />

To obtain the exception message in scripts, use the ExceptionMessage function. The following code<br />

illustrates exception handling in DelphiScript routines –<br />

[DelphiScript]<br />

try<br />

// Do something<br />

...<br />

except<br />

// An exception occurred !!!<br />

// Posts the exception message to the test log<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Script Writing<br />

Log.Error(ExceptionMessage);<br />

end;<br />

Working <strong>With</strong> Operations in Scripts<br />

Althou gh the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> operations<br />

provide an extensive complement of customizable<br />

options, they cannot cover all possible cases. So you may need to program specific actions that cannot be<br />

done with <strong>Build</strong> <strong>Studio</strong>’s operations. You can do this using the Script operation. Scripts let you perform<br />

a<br />

wide variety of tasks: change macro variables, set special processing of data, get access to various objects via<br />

COM interfaces, etc. In addition, your scripts can initiate execution of operations<br />

or they can get and set<br />

va lues of operation properties.<br />

This topic<br />

explains how you can do this.<br />

Addressing Operations in Scripts<br />

There are two ways in which you can address macro operations from scripts:<br />

• Via the Operations object. This approach is convenient if you only need to work with a few<br />

macro operations. It lets you access a particular operation<br />

by its unique name. To assign a unique<br />

name to an operation:<br />

Right-click on the desired operation in the Macro panel and select Properties from the<br />

context menu. This will call the Operation Properties dialog.<br />

In the dialog, switch to the Properties page and specify the operation name in the Unique<br />

Name field. This name must be unique among other operations. Since this name will be used<br />

to refer to the operation in scripts, it must also be a valid scripting identifier. To make the<br />

operation’s unique name suitable for any supported scripting language, follow this simple<br />

rule: this name can include only letters, digits and underscores and must begin with a letter.<br />

Once you set a unique name for the operation, you can address this operation in script code using the<br />

following syntax:<br />

Operations.operation_unique_name<br />

For example,<br />

Operations.CompileApp<br />

•<br />

Via the ABSUtils.Macro property. This approach is convenient if you need to perform batch<br />

processing of all of the macro operations, or a group of operations. It requires that you<br />

know the<br />

position of the desired operation in the macro’s operations tree. You address the operation via its<br />

parent operations using the following syntax:<br />

ABSUtils.Macro.Children(Index1).Children(Index2)...Children(IndexN).Operation<br />

Where the Index parameters hold the zero-based index of a particular operation among<br />

its parent<br />

operation’s child list. For example, to address the second child operation of the first macro<br />

operation, you can use the following code:<br />

ABSUtils.Macro.Children(0).Children(1).Operation<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

183


184<br />

Running<br />

Operations From Scripts<br />

Script Writing<br />

To run a specific operation from a script, use the Execute method of the operation object. For example,<br />

to run a Submacro operation that has the MySubmacro1 unique name, you can use the code:<br />

Operations.MySubmacro1.Execute<br />

Or, assuming that this Submacro operation is the first operation in the macro, you can also call it in the<br />

following way:<br />

ABSUtils.Macro.Children(0).Operation.Execute<br />

If the operation was called successfully, the Execute method returns True and <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

post a message about the operation execution to the log. Otherwise, it returns False and <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> posts an error message on that matter to the log and (optionally) stops macro execution. The latter<br />

depends on the value that is set in the Stop Execution If Operation Fails property of the given operation and<br />

of its parents. See Handling Errors in Macros.<br />

Accessing Operation Properties in Scripts<br />

To access an operation’s property in the script code, use the following syntax:<br />

operationObj.property_name = property_value<br />

operationObj is the operation object (see the Addressing Operations in Scripts section above).<br />

For instance, the following code increments the Minor Version property of the Compile Delphi 3-7<br />

Project operation whose unique name is MyDelphiProjectOperation:<br />

[VBScript]<br />

Dim i<br />

i = Operations.MyDelphiProjectOperation.VersionInfo.MinorVersion<br />

Operations.MyDelphiProjectOperation.VersionInfo.MinorVersion = i+1<br />

[Jscript]<br />

Operations.MyDelphiProjectOperation.VersionInfo.MinorVersion++;<br />

[DelphiScript]<br />

Var<br />

i : OleVariant;<br />

begin<br />

i:=Operations.MyDelphiProjectOperation.VersionInfo.MinorVersion;<br />

Operations.MyDelphiProjectOperation.VersionInfo.MinorVersion := i+1;<br />

. . .<br />

end;<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> forms the names of operation properties in scripts on the base of the property<br />

name that is shown in the Operation Properties dialog. The algorithm of name building is quite simple:<br />

• <strong>Build</strong> <strong>Studio</strong> refines the “visual” name of a property from all invalid characters (such as pluses,<br />

minuses, spaces, ampersands, etc.).<br />

• All the words in the property name are capitalized and then concatenated.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Script Writing<br />

Using this algorithm, the Stack Frames property, for example, gets the stackFrames name for scripts;<br />

Generate debug info becomes generateDebugInfo, etc.<br />

If the name of the operation property is too long, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> may form the<br />

resulting property name according to another algorithem. For example, it can form the<br />

scripting name of a property based<br />

on the first few words of the original property name.<br />

Thus, the Load Settings Before Compiling property may get the LoadSettings scripting<br />

name. Alternatively, <strong>Build</strong> <strong>Studio</strong> may abbreviate the property name, skip specific words in<br />

it, and so on.<br />

It is recommended that you refer to the Code Completion window to learn property names<br />

that are available to scripts<br />

(see below).<br />

All the operation properties are shown as subnodes of the operation node in the Code Completion<br />

window of th e Edit Script form (to view additional information about operation properties, press the<br />

button):<br />

If the operation contains a large number of properties, <strong>Build</strong> <strong>Studio</strong> organizes them into child objects<br />

corresponding to the operation’s property pages. For example, the Compile Delphi 3-7 Project<br />

operation<br />

properties located on the Version Info page are available as child nodes of the operation’s VersionInfo<br />

subnode:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

185


186<br />

Script Writing<br />

Some properties may contain one of predefined values. For instance, the CheckTimeOutMode property<br />

can hold either 0, 1 or 2 (this property<br />

is a program analogue of the Timeout property that is common for all<br />

the operations). For properties like CheckTimeOutMode, the Code Completion window shows the values<br />

that can be used for setting the property<br />

value:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Script Writing<br />

Note: Though the type of the CheckTimeOutMode property is an integer, you can use strings<br />

when setting the property value. <strong>Build</strong> <strong>Studio</strong> will automatically convert the specified string<br />

to the appropriate integer<br />

value and then assign this value to the property. For instance, you<br />

can use the following strings<br />

when setting the value of CheckTimeOutMode:<br />

• None (analogue<br />

to 0)<br />

• Global (analogue<br />

to 1)<br />

• Local (analogue<br />

to 2)<br />

When you obtain the property<br />

value, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will return an integer value,<br />

not a string.<br />

You can use variables, constants and their combinations when changing property values from a script.<br />

For instance, the code below sets the File Name property of the If File Exists operation whose unique name is<br />

IfMyFileExists:<br />

[VBScript]<br />

Variables.FolderPath = "C:\ Work"<br />

Variables.FileName = "myfile.txt"<br />

Operations.IfMyFileExists.FileName = _<br />

Variables.FolderPath & "\" & Variables.FileName<br />

[Jscript]<br />

Variabl es.FolderPath = "C:\ \Work";<br />

Variables.FileName = "myfile.txt";<br />

Operations.IfMyFileExists.FileName =<br />

Varia bles.FolderPath + "\ \" + Variables.FileName;<br />

[DelphiScript]<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

187


188<br />

Variables.FolderPath := 'C:\Work';<br />

Variables.FileName := 'myfile.txt';<br />

Operations.IfMyFileExists.FileName :=<br />

Variables.FolderPath + '\' + Variables.FileName;<br />

Script Writing<br />

If you want to concatenate values of variables and constants using the syntax that is acceptable when<br />

specifying operation property values via the Operation Properties dialog (see Using Variables and Constants<br />

in Macros), use the ABSUtils.TranslateExpression method in your scripts. For example:<br />

[VBScript]<br />

V ariables.FolderPath = "C:\Work"<br />

Variables.FileName = "m yfile.txt"<br />

Operations.IfMyFileExists.FileName = _<br />

ABSUtils.TranslateExpression("%FolderPath%\%FileName%") [JScript]<br />

Variables.FolderPath = "C:\\ Work";<br />

Variables.Fi leName = "myfile.txt";<br />

Operations.IfMyFileExists.FileName =<br />

ABSUtils.TranslateExpression("%FolderPath%\\%FileName%");<br />

[DelphiScript]<br />

V ariables.FolderPath : = 'C:\ Work';<br />

Variables.FileName := 'myfile.txt';<br />

Operations.IfMyFileExists.fileName :=<br />

ABSUtils.TranslateExpression('%FolderPath%\%FileName%');<br />

Note: Macro variables cannot store<br />

references to objects, they can only store ordinary values:<br />

numbers, strings, dates, etc.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Command-Line Interface<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Command-Line Interface<br />

Command-Line Arguments<br />

This topic describes the command-line arguments of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and <strong>Automated</strong> Macro<br />

Player.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Command Line<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> (\<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe)<br />

uses the following<br />

command line arguments, which are case-insensitive:<br />

file_name<br />

Launches <strong>Build</strong> <strong>Studio</strong> and loads the specified macro (.bbp or .bxp file) into it.<br />

/ns<br />

Opens <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

without displaying the splash screen.<br />

/Run or /R<br />

Must be specified after file_name. This will run the specified macro upon loading <strong>Build</strong><br />

<strong>Studio</strong>.<br />

After the macro finishes, <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> will stay open.<br />

/RunAndExit or /RE<br />

See /Run. This option does the same as /Run but closes <strong>Build</strong> <strong>Studio</strong> after the macro finishes.<br />

/SilentMode, /ErrorAndWarningMode or /ErrorOnlyMode<br />

You can use one of these arguments to specify which message boxes and dialogs <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> will display during a macro<br />

run:<br />

• /SilentMode - If this argument<br />

is specified, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will neither display any<br />

dialogs nor inform you about any errors and warnings that occurred during a macro run.<br />

• /ErrorAndWarningMode - If this argument is used,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will not display<br />

dialogs, but it will show error and warning<br />

messages.<br />

• /ErrorOnlyMode - If this argumen t is used, <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will not display any<br />

dialogs and message boxes except for<br />

error messages.<br />

/variable_name=variable_value or -variable_name=variable_value Initializes the specified variable with th e given value. The variable (stored variable) must exist in<br />

the macro you are running. See Using V ariables and Constants in Macros. Here, variable_name<br />

and variable_value are the actual name<br />

and value of the variable. If the variable value holds<br />

spaces,<br />

the entire value must be enclosed in double-quotes. This command line argument is valid only if it<br />

is used with the /Run or/RunAndExit arguments. To initialize several variables,<br />

you can use this<br />

argument several times in the same command<br />

line.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

189


190<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Command-Line Interface<br />

/configuration_name<br />

Runs the macro with<br />

data of the specifie d configuration. See Using Macro Configurations. If this<br />

argument is not specified,<br />

the active configuration<br />

which is saved in the macro will be used. If the<br />

configuration name includes spaces, it m ust be enclosed in double-quotes: /"configuration name".<br />

To batch-run the macro<br />

in several confi gurations at once, use this argument several times in the<br />

same command line.<br />

/@all<br />

Runs a macro using all existing macro configurations. See Using Macro Configurations.<br />

Note: To determine which parameters were passed to <strong>Build</strong> <strong>Studio</strong> in its command line, add a Script<br />

operation to you macro and use the ParamStr and ParamCount functions in the script.<br />

Here are some examples of running <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> with command line arguments.<br />

• Use the following command line to run <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, load the specified macro<br />

(My.bbp) in it and start the macro execution for the Release configuration.<br />

"C:\<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>\Bin\<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe"<br />

"C:\Work\Macros\My.bbp" /Run /Release<br />

• The following line commands <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to run without<br />

the splash screen, to load<br />

the specified macro (My.bbp),<br />

to start its execution, to initialize the ProjectDir variable and to<br />

exit<br />

when the macro execution<br />

is over.<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe "C:\Work\Macros\My.bbp" /ns<br />

/RunAndExit /ProjectDir="C:\My Projects"<br />

<strong>Automated</strong> Macro Player Command Line<br />

The installation of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also includes the <strong>Automated</strong> Macro Player. This is a console<br />

application (\<strong>Automated</strong>MacroPlayer.exe) that is used to run the macro you have<br />

constructed using <strong>Build</strong> <strong>Studio</strong>. When calling the Macro Player via the command line, you can pass it the<br />

n ame of a file that holds a macro and the Macro Player will start running this macro immediately, using<br />

the<br />

active configuration. Because<br />

it is easier and faster than <strong>Build</strong> <strong>Studio</strong>, the Macro Player is a good solution<br />

to<br />

run the macros you have already checked thoroughly and proved to be reliable.<br />

In addition to the macro file name, you can pass the Macro Player all the other parameters<br />

that are<br />

supported by <strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe except for /ns, /Run and /RunAndExit, which<br />

are simply ignored by<br />

the<br />

Macro Player.<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service Command<br />

Line<br />

The <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s installation also includes<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service. This is a<br />

Windows NT service (\Bin\<strong>Automated</strong><strong>Build</strong>Service.exe) that is used to provide<br />

client-server functionality and co ntinuous integration support. It dispatches data and commands between<br />

client and server machines, stores results of macro runs, traces task triggers and starts<br />

a task when the trigger<br />

events or conditions are accomplished.<br />

<strong>Automated</strong><strong>Build</strong>Service.exe accepts<br />

the following command-line arguments:<br />

/trace:on and /trace:off<br />

For some triggers, the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service can post logs on request to resources they<br />

trace. These are the triggers of the Microsoft Visual SourceSafe File Change, PVCS File Change,<br />

StarTeam File Change, Subversion File Change, Surround SCM File Change, Team Coherence<br />

File Change and Vault File Change types. The logs are collected in the


<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Command-Line Interface<br />

<strong>Studio</strong>>\Bin\Extensions folder except for<br />

the Microsoft Visual SourceSafe File Change triggers’<br />

logs, which are posted to the VSSLog subfolder<br />

of this folder. The log files’ format depends on the<br />

trigger type, and it usually includes the entire command line of the launched process (it is used to<br />

check the state of the traced resource), the pro cess response,<br />

the request date and time and the latest<br />

date and time of the traced resource obtained during the check. New records are appended to the<br />

log file that is stored for each<br />

trigger. The /trace:on argument enables logging of triggers'<br />

activity.<br />

At that, the DWORD value, which is called TraceMode, is created<br />

in the<br />

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Service registry key and is set to 1. The / trace:off argument<br />

disables trigger logging and sets<br />

TraceMode to 0). Later, when being launched,<br />

<strong>Automated</strong><strong>Build</strong>Service.exe will read the data of the<br />

TraceMode value from the registry, and it will<br />

either enable or disable trigger logging.<br />

/poolsize:N<br />

This argument sets the number<br />

of tasks that can be run simultaneously by<br />

<strong>Automated</strong><strong>Build</strong>Service.exe. By default,<br />

this number<br />

is 5. The integer value N passed in this<br />

argument (it can range between<br />

1 and 30) is stored as the PoolSize value of the DWORD type in<br />

the HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services\<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Service registry key. Later, when being<br />

launched,<br />

<strong>Automated</strong><strong>Build</strong>Service.exe will read the data of<br />

the PoolSize value from the registry<br />

and will set the number of running tasks.<br />

/service<br />

Registers the <strong>Automated</strong><strong>Build</strong>Service.exe process as an NT service (if it is not registered<br />

yet) and<br />

runs this service. Before the service is run, it reads the values passed in the /poolsize and/or<br />

/trace<br />

command-line arguments or reads the corresponding<br />

values from the registry (see above).<br />

/restart<br />

Starts the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service if it is not running and restarts it if it is already<br />

running.<br />

/stop<br />

Stops the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Service.<br />

/exit<br />

This argument is supposed to be used with the<br />

/poolsize and /trace arguments when they are passed<br />

to <strong>Automated</strong><strong>Build</strong>Service.exe<br />

being launched<br />

as a stand-alone process, not as a service. The /exit<br />

argument simply writes the corresponding<br />

values specified by the /poolsize and/or /trace<br />

command-line arguments to the registry,<br />

but it does not run an instance of<br />

<strong>Automated</strong><strong>Build</strong>Service.exe with<br />

newly set parameters.<br />

Exit<br />

Codes<br />

Both <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and <strong>Automated</strong> Macro<br />

Player provide the following exit codes, which<br />

report<br />

on the results of the last run:<br />

Exit Code Description<br />

0 The last run was executed successfully.<br />

1 An error occurred in a macro during the last run.<br />

Normally, these codes are of use when <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> or the <strong>Automated</strong> Macro Player is<br />

launched from a batch file. Here is a simple example:<br />

REM Clears the screen<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

191


192<br />

CLS<br />

@ECHO OFF<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Command-Line Interface<br />

REM Launches <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> without splash screen<br />

REM and runs the specified macro<br />

START \W "C:\<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>\<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.exe" /ns<br />

/RunAndExit C:\Macros\MyProj.bbp<br />

REM If ERRORLEVEL is greater than 1, go to Unknown<br />

IF ERRORLEVEL 2 GOTO Unknown<br />

IF ERRORLEVEL 1 GOTO Errors<br />

IF ERRORLEVEL 0 GOTO Success<br />

:Unknown<br />

ECHO Unknown return code<br />

GOTO End<br />

:Errors<br />

ECHO There are errors<br />

GOTO End<br />

:Success<br />

ECHO No errors<br />

GOTO End<br />

:End<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Miscellaneous<br />

Miscellaneous<br />

Working <strong>With</strong> Source Control Systems<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> provides integrated source control<br />

services. This means that you can use<br />

A utomated <strong>Build</strong> <strong>Studio</strong> as a client for your source control provider.<br />

<strong>With</strong>out leaving <strong>Build</strong> <strong>Studio</strong>, you can<br />

c heck in and check out your macro,<br />

view its history, compare its versions, etc. To perform these actions,<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> that is ru<br />

nning as a standalone application includes the File | Source Control menu.<br />

Note that <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> also<br />

supports an integration with the CVS, PVCS, Perforce, Visual<br />

SourceSafe and many other<br />

source control systems within macros of<br />

corresponding operations (for the full<br />

list of supported source control systems, see Supported Tools). The difference between these operations and<br />

the menu is that the menu operates with your macro file only, while the operations deal with the files with<br />

which your macro works.<br />

When <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is running as a standalone application, it supports all Microsoft Source<br />

Code Control API compatible source control systems including:<br />

• Microsoft Visual SourceSafe<br />

• Concurrent Versions System (CVS), through the CVSProxy or Jalindi Igloo plug-in<br />

• Merant PVCS Ver sion Manager<br />

•<br />

Team Coherence<br />

• Rational<br />

ClearCase<br />

• Star base<br />

Versions (StarTeam)<br />

• Seapine Surround SCM<br />

• IBM VisualAge<br />

TeamConnection<br />

• CS-RCS<br />

• MKS Source Integrity<br />

• Perforce P4 Version<br />

Control System<br />

• CM Synergy (Continuus<br />

CM)<br />

• AllChange<br />

• Code Co-op<br />

• SourceOffSite<br />

• AllFusion Harvest Change Manager<br />

• Etc.<br />

In order for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to work with a source control system, this system must support<br />

Microsoft SCC API and your computer<br />

must have an SCC Provider registered for this source control system.<br />

Note that some of the source control systems (for instance, Subversion)<br />

are shipped without an SCC<br />

provider. In this case you ha ve to install the provider manually.<br />

Before you start using a source control system, you should add your<br />

macro to it. To do this:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

193


194<br />

• Save your macro to a file if you have not saved it yet.<br />

Miscellaneous<br />

• Select Add to Source Control from the File | Source Control menu. Specify the comment in the<br />

ensuing Comment dialog and press OK. This will call<br />

the Select SCC Provider dialog that lists<br />

source control systems installed on your computer. <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

generates this list<br />

automatically.<br />

• Select the desired source<br />

control system in the dialog and press OK.<br />

Once you press OK in the Select SCC Provider dialog, <strong>Build</strong> <strong>Studio</strong> will connect to the selected source<br />

control s ystem.<br />

Then, it will show the source<br />

control system's dialog in which you need to specify the project<br />

t o which you want to add your macro.<br />

Note: If your macro has already<br />

b een added to the chosen source control system outside of<br />

<strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>, but you want to check it in or out from <strong>Build</strong> <strong>Studio</strong>, you should add<br />

your macro to this source control<br />

system anyway as it is described above.<br />

After your macro is added to the source control system, you will be able<br />

to check it in or out, view<br />

h istory and use other services provided by the source control system. These actions will be applied to the<br />

selected source control system only. If you want to add your macro to another source control system, you<br />

must unbind the macro from the chosen sour ce control system first. To do this, select File | Source Control |<br />

Unbind From Source Control. Then you can add your macro to another<br />

source control system as it is<br />

described<br />

above.<br />

The File | Source Control menu holds some more items for working with source control systems:<br />

• Check In - Checks in your macro to the source control system chosen in the Select SCC Provider<br />

dialog. Using the Check in on close option you can command <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to check<br />

in the macro automatically every time you close it in <strong>Build</strong> <strong>Studio</strong>.<br />

• Check Out - Checks out your macro from the selected source control system. Using the Check<br />

out<br />

on open op tion you can command <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to check out the macro<br />

automatically<br />

every time you open<br />

it in <strong>Build</strong> <strong>Studio</strong>.<br />

• Undo Ch eck Out - Lets you undo the check out action. This item is enabled only when Check<br />

Out is disabled.<br />

Note: <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> traces the check-in/check-out status of a macro<br />

and enables or disables<br />

the Check In and Check Out methods according to this status. For instance, <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> disables the Check In item after the macro was<br />

checked in and enables it after the macro<br />

was<br />

checked out. The Check Out item is disabled<br />

when Check In is enabled and vice versa.<br />

However,<br />

<strong>Build</strong> <strong>Studio</strong>’s check-in/check-out status of a macro may not coincide with the status<br />

of the macro in the source control system. This happens if you<br />

checked out your macro from<br />

the source control system using <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and then<br />

checked in the macro outside<br />

of <strong>Build</strong> <strong>Studio</strong> using any other tool, for example,<br />

using a client application of the source<br />

control<br />

system. To bring <strong>Build</strong> <strong>Studio</strong>’s status<br />

of the macro to the source control system’s<br />

status, select Refresh<br />

Status from the File | Source Control menu.<br />

• History - Calls the History dialog provided by the source control system. This dialog displays the<br />

history of the selected<br />

file (creation date, check in dates, etc.) and the current version number.<br />

• Compare Files<br />

- Lets you compare a file stored in the source control system with another file<br />

stored in the<br />

source control system, or a file stored in the source<br />

control system with a file that is<br />

not stored in it, or two files that are not stored in the source control system. The actual actions<br />

performed by thi s menu item depend on the source control system you use as well as on the<br />

"nature" of the<br />

files. For instance, if you use Microsoft Visual SourceSafe and your macro is a<br />

file in the<br />

.bxp format, clicking the Compare Files item will show Visual<br />

SourceSafe's<br />

Difference Options dialog, in which you can select the files for comparison, specify comparison<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Miscellaneous<br />

options and star t comparing the files. If your macro is a file in the .bbp format, Visual<br />

SourceSafe<br />

will not show any dialogs - it will compare the<br />

files right after you select the<br />

Compare<br />

Files item. Other source control systems may provide<br />

another behavior.<br />

• Properties - Invok es the dialog that shows source-control properties of your macro. This dialog is<br />

provided by the s ource control system.<br />

• Run Source Cont rol - Launches the client application of the source control system selected in the<br />

Select SCC Provider dialog. This may be necessary if you want to do something that cannot be<br />

done with <strong>Build</strong> <strong>Studio</strong>.<br />

For more information, see the documentation on the particular client that supports the Source Code<br />

Control<br />

technology.<br />

Micrsoft Visual <strong>Studio</strong>, w hich <strong>Build</strong> <strong>Studio</strong> integrates with, also has a File | Source Control menu with<br />

similar items. However, their<br />

purpose differs from what is described above. In particular, only the Microsoft<br />

Visual SourceSafe integratio n is supported. To learn more about Visual <strong>Studio</strong>’s<br />

native support for source<br />

c ontrol systems, see Visual <strong>Studio</strong>’s<br />

documentation.<br />

Working <strong>With</strong> <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> via COM<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is a COM server and it can be controlled from other applications like any other<br />

COM server (for example, like Microsoft Word). Other <strong>Automated</strong>QA applications can use it to integrate<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> macros. This topic provides a step-by-step explanation of how you can control<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> via COM from a Visual Basic application. A description of how to work with<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> from managed applications (C#) is also included. Our sample code will:<br />

• Connect to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

via COM.<br />

• Open an <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> project.<br />

• Runs a test.<br />

• Check the results<br />

The topic includes the following sections:<br />

Setting up Visual Basic (Optional)<br />

Connecting to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Automating <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> <strong>With</strong> the Integration Object<br />

Working <strong>With</strong> <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> From Managed Code<br />

Two notes before we proceed:<br />

• A simple alternative to testing your applications with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> via COM is to run<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and pass it certain command-line<br />

arguments. See Command-Line<br />

Arguments for more information.<br />

• COM only commands work if one instance of <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> is running.<br />

Setting up Visual Basic (Optional)<br />

To work with <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> in your VB application, add<br />

a reference to the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> object library to your application that will use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> as a COM server. The<br />

following steps explain how to do this.<br />

• Open your CO M client application in Microsoft Visual Basic.<br />

• Select Project | Refere nces from Visual Basic's menu. This will call the References dialog.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

195


196<br />

Miscellaneous<br />

• In the References dialog, check <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Library and press OK. This<br />

will add a<br />

reference to the <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> object library for your COM client application:<br />

If <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>'s library is not present in the dialog, you can add it directly by pressing<br />

Browse and selecting the \Bin\<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.exe file in the ensuing<br />

Open<br />

File dialog.<br />

Connecting to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> via COM<br />

The first step in using <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> as a COM server is connecting to it. To create a<br />

connection, you have to create a referen<br />

ce to the absApplication object. This object implements methods<br />

and properties<br />

to connect and work with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. To create<br />

a connection you can use the<br />

following<br />

program and class identifiers:<br />

Application Program Id Class Id<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> ABS.Application {28180ECD-1420-4640-8C6B-A1EC7925F9E2}<br />

<strong>Automated</strong> Macro Player AMP.Application {183F38AF-EDC5-4799-8218-5F6BAF668AB3}<br />

The following code creates a connec tion by calling Visual Basic’s CreateObject function and using<br />

ABS.Application as the<br />

program id:<br />

[Visual Basic]<br />

Set ABSApp = CreateObject("ABS.Application")<br />

This line will connect your COM client application to<br />

the currently running instance of <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>.<br />

If <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> has not yet been launched, CreateObject will launch it.<br />

The absApplication<br />

object contains the following methods<br />

and properties:<br />

Property or Method Description<br />

Quit Method. Use it to exit <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Miscellaneous<br />

Manager Property. Returns a reference to the IaqBaseManager object that<br />

provides access to internal <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> interfaces. These are<br />

the same interfaces that different components of <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

use to connect and work with each other.<br />

IntegrationManager Property. Returns a reference to the IabsIntegrationManager object<br />

that provides access to a subset of higher-level functions specifically<br />

engineered to let users perform typical actions over <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>.<br />

To automate <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, we will use the<br />

IabsIntegrationManager object. The<br />

Manager object provides deep<br />

er access to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s<br />

internal objects and components, its<br />

use is more complex: the calls to methods and properties<br />

of internal objects should match<br />

certain conditions<br />

adopted in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>; execution of a simple action may require several<br />

complex calls and so<br />

on. The use of the IabsIntegrationManager object is much simpler. It includes all functionalities<br />

that let<br />

you perform most<br />

common actions: open macros, run them, and export results. The next section describes<br />

how<br />

you can use this object to automate <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Automating <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

<strong>With</strong> the Integration Object<br />

The IabsIntegrationManager object contains three properties that return references to helper<br />

objects, which you can use to open macros, run them and export results:<br />

Property Object Description<br />

Exporter IabsExporter Contains methods used to export results.<br />

Macro IabsMacro Contains methods<br />

used to open and save macros.<br />

Runner IabsRunner Contains methods used to run macros and control the<br />

macro runs.<br />

At the beginning of the topic we wanted<br />

to create sample code that will –<br />

• Connect to <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>.<br />

• Open<br />

a project.<br />

• Run a test.<br />

• Check results of the test.<br />

The IabsMacro, IabsRunner an d IabsExporter objects contain special methods to perform these<br />

steps, so the execution of almost all of these<br />

steps requires no more than a single method call:<br />

Action Description<br />

To open a macro... Use the Open method of the IabsIntegrationManager.Macro object.<br />

To obtain or change a<br />

Use the Var iableByName or ConstantByName method of the<br />

macro variable or<br />

IabsIntegrationManager.Macro.Variables<br />

object.<br />

constant...<br />

To obtain work with To obtain the active<br />

configuration name, use the ActiveConfiguration<br />

configurations... property of the IabsIntegrationManager.Macro object.<br />

To enumer ate configurations, use the ConfigurationsList property of the<br />

IabsIntegrationManager.Macro object to obtain the<br />

IabsConfigurationsIterator<br />

object. To enumerate configurations, use the<br />

methods of this object.<br />

To run a macro... Use one of the following methods of the IabsIntegrationManager.Runner<br />

object:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

197


198<br />

To trace the macro<br />

execution progress...<br />

To pause a ma<br />

run...<br />

•<br />

Miscellaneous<br />

Run - Runs the currently opened macro in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

• BatchRun - Runs the currently<br />

opened macro using the specified<br />

configurations.<br />

Before calling any of these routines make sure<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> is not<br />

executing macros. You can do this, by calling the IabsRunner.Running<br />

property in a loop.<br />

Each of these methods return after the macro run was started or after the macro<br />

failed to start.<br />

They do not pause the program execution until the macro run is<br />

over. To wait<br />

until the macro execution is over, you can check the Running<br />

property in a loop.<br />

In the sample code that goes after this table, we will use the<br />

BatchRun method<br />

to start tests.<br />

To obtain information<br />

about a macro's execution, use the RunProgress method<br />

of the IabsIntergationManager.Runner object. The method returns<br />

information about the macro execution through its parameters.<br />

You can call<br />

the RunProgress method within a loop. The loop condition will<br />

check the value of the IabsRunner.Running<br />

property. If the value is True, the<br />

loop body can call the RunProgress method to obtain information about<br />

execution progress and display this information<br />

to the user.<br />

cro To pause<br />

a macro run, use the Pause method of the<br />

IabsInte rgationManager.Runner object. To resume the macro execution,<br />

call IabsIntegrationManager.Runner.Run.<br />

To stop a macro run... To stop a macro run, use the Stop method of the<br />

IabsIntergationManager.Runner object.<br />

To check results... To check whether the last macro run finished successfully, use the RunResult<br />

property of the IabsIntegrationManager.Runner object. This property<br />

returns a boolean value indicating the result.<br />

To obtain the last error To obtain the last error's description,<br />

use the LastError property of the<br />

description. ..<br />

IabsIntegrationManager.Runner object.<br />

To export results... To export macro execution results, use one of the following<br />

methods of the<br />

IabsIntegrationManager.Exporter object:<br />

•<br />

•<br />

•<br />

ExportErrorsFromLog<br />

ExportLog<br />

ExportSummary<br />

The following code demonstrates ho w you can automate <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>:<br />

[Visual Basic]<br />

Sub RunABS<br />

Dim AbsApp As absApplication, IntegrationManager As<br />

IabsIntegrationManager<br />

' Connecting to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Set AbsApp = CreateObject("ABS.Application")<br />

' Obtaining the IntegrationManager object<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Miscellaneous<br />

Set IntegrationManager = AbsApp.IntegrationManager ' Opening the macro<br />

If Not IntegrationManager. Macro.Open("c:\Work\<strong>Automated</strong><br />

<strong>Build</strong><br />

<strong>Studio</strong>\Samples\Macros\<strong>Build</strong>Logic\<strong>Build</strong>Logic.bxp") Then<br />

' If <strong>Build</strong> <strong>Studio</strong> failed to open the macro<br />

' display notification and exit the routine<br />

MsgBox "Cannot open the specified project"<br />

ABSApp.Quit<br />

Exit Sub<br />

End If<br />

' Runs the macro<br />

IntegrationManager.Runner.BatchRun "Release"<br />

' Waiting until the macro run is over<br />

While IntegrationManager.Runner.Running<br />

DoEvents<br />

Wend<br />

' Exporting results<br />

If IntegrationManager.Runner.RunResult Then<br />

IntegrationManager.Exporter.ExportSummary "C:\MyFile.htm", False<br />

End If<br />

' Closing <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

AbsApp.Quit<br />

End Sub<br />

Two notes:<br />

• To run the tests, we used the BatchRun method. This method returns immediately after the<br />

macro<br />

run is started. If you try to close <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> when a macro is running (this<br />

happens, for example,<br />

when you call Quit right after BatchRun), <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong><br />

displays a message<br />

that asks you whether you want to close the application and terminate the<br />

macro run. To avo id this message, we used a loop that waits until profiling is over.<br />

• Macro operation properties and various settings are stored in your <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong><br />

macro. When you start<br />

running your macro using the Run or BatchRun methods of the<br />

IabsRunner object, <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> uses the settings stored in your <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> macro. Therefore, we recommend<br />

that you prepare your macro before you run that macro<br />

with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

via COM.<br />

Working with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

via COM from managed code<br />

In previous sections, we used Visual Basic to automate <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>. In this section,<br />

we will<br />

de scribe how you can perform the same tasks from C# code. Our sample code will connect to <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> and work with it via the IabsIntegrationManager object.<br />

To work with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> from managed code, add a reference for the <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong><br />

library to your project:<br />

• Select Project | Add Reference from the main menu of Visual <strong>Studio</strong>. This will call the Add<br />

Reference dialog.<br />

• In this dialog:<br />

Switch to the COM tabbed page.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

199


200<br />

Miscellaneous<br />

Find <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> Library (TypeLib Version: 1.0) in the list of available<br />

components.<br />

Choose this library in the list and click the Select button. The library will appear in the<br />

Selected Components<br />

list.<br />

Press OK to close the dialog and save your changes.<br />

After you the reference<br />

is added, you will have access to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s interfaces.<br />

In order to work with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> via COM, two Windows API functions -<br />

CoCreateInstance and GetActiveObject<br />

are used. So you need to write special code where these<br />

functions are defined.<br />

The following code demonstrates how you<br />

can use <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> via COM:<br />

[C#]<br />

// Add the following lines to your unit<br />

using System.Runtime.InteropServices; using <strong>Automated</strong><strong>Build</strong><strong>Studio</strong>;<br />

...<br />

public class Form1 : System.Windows.Forms.Form<br />

{<br />

...<br />

// Defines functions needed to obtain a reference to ABS<br />

[DllImport("Ole32.dll", PreserveSig = false, EntryPoint =<br />

"CoCreateInstance")]<br />

[return: MarshalAs(UnmanagedType.IUnknown)]<br />

private static extern object CoCreateInstance([In] ref Guid clsid,<br />

[MarshalAs(UnmanagedType.IUnknown)] Object punkOuter, int context, [In] ref<br />

Guid iid);<br />

[DllImport( "oleaut32. dll", PreserveSig = false, EntryPoint<br />

=<br />

"GetActiveObject")]<br />

[return: MarshalAs(UnmanagedType.IUnknown)]<br />

private static extern object GetActiveObject([In] ref Guid clsid, int<br />

reserved);<br />

// Defines helper constants<br />

private const int INPROC_SERVER = 1;<br />

private const int LOCAL_SERVER = 4;<br />

private void button1_Click(obj ect sender, System.EventArgs e)<br />

{<br />

Guid CLSID_ABS = new Guid("28180ECD-1420-4640-8C6B-A1EC7925F9E2");<br />

Guid IID_ABS = new Guid("8 CFC12DB-6026-486B-A563-889D1AC8A859");<br />

object ABSAppObject = null;<br />

// Obtains access to <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

try<br />

{<br />

ABSAppObject = GetActiveObject(ref CLSID_ABS, 0);<br />

}<br />

catch<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Miscellaneous<br />

{<br />

try<br />

{<br />

ABSAppObject = CoCreateInstance(ref CLSID_ABS, null,<br />

INPROC_SERVER | LOCAL_SERVER, ref IID_ABS);<br />

}<br />

catch<br />

{<br />

}<br />

}<br />

if (ABSAppObject == null) return;<br />

// Obtains the IabsIntegrationManager object<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.absApplication ABSCOMObject =<br />

(<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.absApplication) ABSAppObject;<br />

<strong>Automated</strong><strong>Build</strong><strong>Studio</strong>.IabsIntegrationManager IntegrationManager =<br />

ABSCOMObject.IntegrationManager;<br />

try<br />

{<br />

// We have a re ference to the integration object.<br />

// Now we can use its methods and properties to automate<br />

// <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

// Opening the macro<br />

if (! IntegrationManager.Macro.Open("c:\\Work\\<strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong>\\Samples\\Macros\\<strong>Build</strong>Logic\\<strong>Build</strong>Logic.bxp"))<br />

{<br />

project");<br />

}<br />

// If <strong>Build</strong><br />

<strong>Studio</strong> failed to open the macro<br />

// display notification and exit the routine<br />

System.Wind ows.Forms.MessageBox.Show("Cannot<br />

open the specified<br />

ABSCOMObject.Quit();<br />

return;<br />

// Runs the macro<br />

IntegrationManager.Runner.BatchRun("Release");<br />

// Waiting until the macro run is over<br />

while(IntegrationManager.Runner.Running)<br />

Application.DoEvents();<br />

// Exporting results<br />

if(IntegrationManager.Runner.RunResult)<br />

{<br />

IntegrationManager.Exporter.ExportSummary("C:\\MyFile.htm", false);<br />

}<br />

}<br />

catch(System.Runtime.InteropServices.COMException ex)<br />

{<br />

System.Windows.Forms.MessageBox.Show("An exception occurred:<br />

" +<br />

ex.Message);<br />

}<br />

finally<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

201


202<br />

}<br />

...<br />

}<br />

{<br />

}<br />

// Closes <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong><br />

ABSCOMObject.Quit();<br />

// Releases COM objects<br />

Marshal.ReleaseComObject(IntegrationManager);<br />

Marshal.ReleaseComObject(ABSCOMObject);<br />

Marshal.ReleaseComObject(ABSAppObject);<br />

Miscellaneous<br />

Please pay attention<br />

to the last three lines. T hey call the Marshal.ReleaseCOMObject method to<br />

release all objects that<br />

we referred to in our code. M ake sure that you call this method and release the objects.<br />

Else, the work with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> will not be finished properly<br />

and the next attempt to automate<br />

<strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> will fail.<br />

Sounds for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Events<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> has a number of events to which sounds can be assigned.<br />

Each time one of these<br />

events occurs, the computer will play the appropriate sound and thus notify you about the event.<br />

The sound<br />

notification is especially useful if you are not at the computer where<br />

the macro is running.<br />

<strong>Build</strong> <strong>Studio</strong> has the following events:<br />

Event Description<br />

Breakpoint Hit Occurs every time the macro<br />

execution is paused on a breakpoint.<br />

Macro Execution Failed Occurs when the macro execution fails.<br />

Macro Execution Succeeded Occurs when the macro<br />

execution is completed successfully.<br />

To specify the sound to be played for each of these events,<br />

use the standard Sound and Audio Device<br />

Properties<br />

dialog. You can call this dialog from the Control Panel:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Miscellaneous<br />

To associate a sound with an event:<br />

• Find the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> node in the dialog's Program events box.<br />

• Choose the desired event under the <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> node.<br />

• In the Sounds box, specify the sound to be<br />

played when the event occurs.<br />

You can either choose the sound from the<br />

dropdown list of the Sounds box, or press Browse and<br />

choose a .wav file in the ensuing Open File<br />

dialog.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

203


204<br />

Operations<br />

Reference<br />

Operation Categories<br />

Operations Reference<br />

In <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>, all operations that can be used in macros are divided into the following<br />

categories:<br />

Category Description<br />

.NET Tools Operations that can run various .NET utilities to process your<br />

.NET-connected applications.<br />

Archivers Operations that let you pack and unpack files using various<br />

compression formats.<br />

Authenticode Operations that allow to sign and check signed files using the<br />

Microsoft Authenticode technology.<br />

<strong>Automated</strong>QA Tools Operations that run other products by <strong>Automated</strong>QA Corp. and<br />

interact with them.<br />

Borland Compilers Operations<br />

that let you compile projects with Borland and<br />

CodeGear<br />

compilers<br />

installed on your computer.<br />

<strong>Build</strong> Tools Operations that run automatic builds using external build tools.<br />

Burn CD/DVD Operations that let you create ISO images, write ISO images as<br />

well as arbitrary files<br />

and folders to a CD or DVD disk, erase<br />

rewritable disks<br />

and so on.<br />

Communication Operations that let you send and receive e-mail and news messages<br />

as well as send messages via MSN Messenger<br />

or ICQ.<br />

Concurrent Versions System Operations that work with Concurrent Versions System. They let<br />

you retrieve files from CVS, put them into it, etc.<br />

Execute Operations that run programs from macros.<br />

Files and Directories Operations to work with files and folders (creating, copying and<br />

moving files<br />

and folders).<br />

Frequently Used Operations that you have most frequently used when creating<br />

macros.<br />

FTP Operations that let you browse the contents of FTP servers, as well<br />

as download and upload files from / to them.<br />

Help Compilers Operations that let you compile<br />

help files in HLP, CHM and other<br />

formats.<br />

HTTP Operations that let you browse the contents of HTTP servers, as<br />

well as ge t and post data from / to them.<br />

Installers Operations<br />

that let you build installation programs using such tools<br />

as InstallShield<br />

and Wise.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Interactive Operations that let you create various dialog<br />

boxes in order to input<br />

or select v alues, display messages and select files and folders.<br />

Internet Information Services Operations that allow you to manage Web and FTP sites on a local<br />

(IIS) or remote computer.<br />

Issue Tracking Operations that let your macros create and modify items stored in<br />

different issue<br />

tracking systems.<br />

JediVCS Operations<br />

that work with the Jedi Version Control System. For<br />

example, checking files in and out.<br />

Logging Operations that let you control the logging of macro runs and<br />

e xport the whole log contents or its part to a file.<br />

Microsoft Compilers Operations that let you compile projects with Microsoft compilers<br />

installed on<br />

your computer.<br />

Microsoft Compilers for<br />

Smart Device<br />

Operations<br />

that let you compile projects with Microsoft compilers<br />

for Smart Device installed on your computer.<br />

Microsoft Source Server Operations<br />

that let you index PDB files for various source control<br />

systems as<br />

well as read data from and write it to a PDB stream.<br />

Microsoft Virtual PC Operations that control virtual machines running via Microsoft<br />

Virtual PC.<br />

Microsoft Virtual Server Operations that control virtual machines running under Microsoft<br />

Virtual Server 2005.<br />

Microsoft Visual SourceSafe Operations that work with Microsoft Visual SourceSafe. They let<br />

you retrieve files from VSS, put them into it, etc.<br />

Misc Miscellaneous operations that let you insert comments into macros,<br />

pause the macro execution, wait until a specific window appears,<br />

etc.<br />

MySQL Operations that let you maintain MySQL Server databases and<br />

execute SQL queries and scripts over them.<br />

Oracle Operations that work with Oracle Database System. They let you<br />

back up, restore and recover databases as well as to execute<br />

RMAN<br />

and SQLPlus scripts.<br />

Other Compilers Operations that let you compile projects with miscellaneous<br />

compilers installed on your computer.<br />

Patch Management Operations used to work with patch managements<br />

tools such as<br />

IncUpdate <strong>Build</strong>ers or Visual Patch.<br />

Perforce Operations that work with Perforce. They let you retrieve files<br />

from<br />

Perforce, put them into it, etc.<br />

Prepare Code Operations used to compress, decompress and encrypt executables<br />

and libraries and include exception-handling code in them.<br />

PsTools Operations that work with system utilities from the PsTools suite.<br />

PVCS Operations that work with Merant PVCS Version Manager. They<br />

let you retrieve files from PVCS and put them into it.<br />

Rational ClearCase Operations that work with Rational ClearCase. Using them you can<br />

check in, check out, lock,<br />

unlock and perform other actions with<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

205


206<br />

files and objects stored in the Rational ClearCase repository.<br />

Operations Reference<br />

Read/Write Operations used to work with text, INI files and the system registry.<br />

Remote Macro Execution Operations that let you run macros and monitor macro runs on other<br />

computers in the network.<br />

Source Code Tools Operations that analyze source code files for different compilers.<br />

SourceGear Vault Operations that work with SourceGear Vault. They<br />

let you retrieve<br />

files from a SourceGear Vault repository, put them into it, etc.<br />

SourceOffSite Operations<br />

that work with SourceOffSite. They let you retrieve<br />

files from a SourceOffSite<br />

repository, put them into it, etc.<br />

SQL Operations that allow you to execute SQL queries and scripts as<br />

well as to maintain Microsoft SQL Server databases.<br />

Standard General operations used to organize loops, conditionally execute a<br />

group of operations, etc.<br />

StarTeam Operations that work with Borland StarTeam. They let you retrieve<br />

files from StarTeam, put them into it, etc.<br />

String Manipulation Operations that let you<br />

perform various operations over string<br />

values: concatenate strings,<br />

replace characters in a string, extract<br />

substrings, change letter case, manipulate path strings<br />

and so on.<br />

Subversion Operatio ns that work with Subversion. They let you retrieve files<br />

from Subversion,<br />

put them into it, etc.<br />

Surround SCM Operations that work with Surround SCM.<br />

They let you retrieve<br />

files from Surround SCM, put them into it, etc.<br />

Team Coherence Operations that work with Quality <strong>Software</strong> Components<br />

Team<br />

Coherence. They let you retrieve files from Team Coherence, put<br />

them into it, etc.<br />

Team Foundation Version<br />

Control<br />

Operations that work with Microsoft Team Foundation Version<br />

Control. They let you retrieve files from Team Foundation Version<br />

Control, put them into it and so on.<br />

Unit Tests Operations that can run various<br />

application.<br />

test utilities to test units of your<br />

VMware Server Operations that control virtual machines running under VMware<br />

server.<br />

VMware Workstation Operations that control virtual machines running on VMware<br />

workstation.<br />

Wait Operations<br />

used to suspend macro executions until certain events<br />

occur.<br />

WMI Operations<br />

that let you start, pause and stop services, run and<br />

terminate processes, etc. on a remote or on your local computer.<br />

These ope rations use Windows Management Instrumentation.<br />

XML Operations that let you work with XML files.<br />

You can also create custom operations. For more information on this, see on-line help.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

.NET Tools Category<br />

The .NET Tools category includes the following<br />

operations:<br />

Operation Description<br />

CLRxLint Verifies checked exceptions defined in your .NET assemblies using<br />

<strong>Software</strong>4net<br />

CLRxLint.<br />

Configure ASP.NET Configures ASP.NET on the current computer<br />

using the ASP.NET<br />

IIS Registration Tool (aspnet_regiis.exe).<br />

Dotfuscator Obfuscates your .NET code using PreEmptive Dotfuscator.<br />

Edit Assembly Information Modifies assembly attributes in one or several assembly<br />

information source files.<br />

Extract Public Key Extracts the public key from a .NET assembly, a key file or a<br />

container using<br />

the Strong Name Tool (sn.exe).<br />

Fix COM References Fixes references to the COM interop<br />

assemblies in one or more<br />

Microsoft Visual <strong>Studio</strong> .NET projects.<br />

FxCop Tool Analyzes code of your .NET assemblies using Microsoft FxCop.<br />

GAC Iterator Iterates records of the global assembly cache using the Global<br />

Assembly Cache Tool (gacutil.exe).<br />

Generate Key Pair Generates a new key pair using the Strong Name Tool (sn.exe).<br />

ILMerge Merges multiple .NET assemblies into a single one using Microsoft<br />

ILMerge.<br />

Install/Uninstall Assembly Installs or uninstalls a .NET assembly into/from the global<br />

assembly cache using the Global Assembly Cache Tool<br />

(gacutils.exe).<br />

Install/Uninstall Key Installs or uninstalls a key pair into/from the specified key<br />

container<br />

using the Strong Name Tool (sn.exe).<br />

InstallUtil Uses the Installer Tool (InstallUtil.exe) to install or uninstall server<br />

resources<br />

by executing the installer components of a specified<br />

.NET assembly.<br />

Manifest Generation and Editing Creates, signs or updates application and deployment<br />

manifests<br />

using the Manifest Generation<br />

and Editing Tool (mage.exe).<br />

Native Image Generator Installs, updates or removes native images for an assembly and its<br />

dependencies using the Native Image Generator utility (ngen.exe).<br />

Register/Unregister Assembly Registers or unregisters a .NET assembly<br />

using the Assembly<br />

Registration Tool (regasm.exe).<br />

Re-sign Assembly Re-signs a previously signed or delay-signed .NET assembly with<br />

the real key pair using the<br />

Strong Name Tool (sn.exe).<br />

Resources Generator Converts .txt or .resx files<br />

to or from .resource files using the<br />

Resource File Generator utility (resgen.exe).<br />

Run AL.EXE Runs the Assembly Linker utility (al.exe).<br />

Run SN.EXE Runs the Strong Name Tool (sn.exe).<br />

Verify Strong Name Verifies<br />

the identity of a .NET assembly installed into the global<br />

assembly cache (simple text name, version number, culture<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

207


208<br />

Operations Reference<br />

information, public key and digital signature) using the Strong<br />

Name Tool (sn.exe).<br />

WiseOwl Demeanor Obfuscates your .NET code using WiseOwl Demeanor.<br />

XenoCode Obfuscates your .NET code using Code Systems Corporation<br />

XenoCode.<br />

Xenocode Postbuild 2008 Obfuscates your .NET code using Xenocode Postbuild 2008.<br />

For more information on operations of this group, see the NET Specific Opearations document or on-line<br />

help.<br />

Archivers Category<br />

The Archivers category includes<br />

the following operations:<br />

Operation Description<br />

Extract Files From RAR File Extracts files from an archive packed with WinRAR.<br />

Extract Files From ZIP File<br />

Extracts files from an archive packed using the Zip compression<br />

format.<br />

Extract Files From Zlib File Extracts files from an archive packed using the ZLib compression<br />

format.<br />

Extract Files From 7ZIP File Extracts files from an archive packed with 7-Zip.<br />

Pack Files <strong>With</strong> WinRAR Packs files to an archive with WinRAR.<br />

Pack Files <strong>With</strong> Zip Packs files to an archive using the Zip compression format.<br />

Pack Files <strong>With</strong> ZLib Packs files to an archive using the ZLib compression format.<br />

Pack Files <strong>With</strong> 7-Zip Packs files to an archive with 7-Zip.<br />

For more information on ope rations of this group see Archievers Category in the General-Purpose<br />

Operations docum ent or in on-line help.<br />

Authenticode Category<br />

The Authenticode category includes<br />

the following operations:<br />

Operation Description<br />

Certificate Manager Manipulates the certificates, certificate trust lists and<br />

certificate revocation lists.<br />

Check Signed File Validity (ChkTrust) Verifies a signed file using the ChkTrust utility.<br />

Check Signed File Validity (SignTool) Verifies a signed file using the SignTool utility.<br />

Create Personal Information Exchange File Creates a PFX-file that holds private keys and software<br />

publishing certificates.<br />

Create <strong>Software</strong> Publishing Certificate Creates a sample software publishing certificate.<br />

Create X.509 Certificate Creates a sample X.509 certificate.<br />

Make Certificate Trust List Creates a certificate trust list.<br />

Set Registry Keys Values Defines values of the registry keys that control the<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

verification process.<br />

Signing Code (SignCode) Signs a file with a software publishing certificate using<br />

the SignCode utility.<br />

Signing Code (SignTool)<br />

209<br />

Signs a file with a software publishing certificate using<br />

the SignTool utility.<br />

Time Stamping Files Adds or updates the signed certificate’s time stamp<br />

For more information on operations of this group<br />

see Authenticode Category in the General-Purpose<br />

Operations document or in on-line help.<br />

<strong>Automated</strong>QA Tools Category The <strong>Automated</strong>QA Tools category includes<br />

the following operations that let you integrate <strong>Automated</strong><br />

<strong>Build</strong> <strong>Studio</strong> with other tools by <strong>Automated</strong>Q<br />

A Corp.:<br />

Operation Description<br />

AQtime .NET Edition 1 Profiles your application with AQtime .NET Edition version 1.X.<br />

AQtime 3 Profiles your application with AQtime 3.<br />

AQtime 4 Profiles your application with AQtime 4.<br />

AQtime 5 Profiles your application with AQtime 5.<br />

AQtrace Module Storage Modifies the build storage configuration files with the AQtrace Module<br />

Storage utility.<br />

AQtrace Packager Launches AQtrace Packager and applies AQtrace Reporter to your<br />

application.<br />

AQtrace Process Report Obtains information about a report from the report’s file and saves to<br />

mac ro variables.<br />

AQtrace Report by ID Obtains information about<br />

a report by using the report’s identifier.<br />

AQtrace Report Enumerator Iterates through reports that are located in the persistent<br />

report storage<br />

and executes<br />

child operations for each enumerated report.<br />

TestComplete Runs tests created in TestComplete 2.x and 3.x.<br />

TestComplete 4 Runs tests created in TestComplete 4.x.<br />

TestComplete 5 Runs tests created in TestComplete 5.x.<br />

TestComplete 6 Runs tests created in TestComplete 5.x.<br />

TestExecute Runs TestComplete tests with TestExecute 2.x or 3.x.<br />

TestExecute 4 Runs TestComplete tests with TestExecute 4.x.<br />

TestExecute 5 Runs TestComplete tests with TestExecute 5.x.<br />

TestExecute 6 Runs TestComplete tests with TestExecute 5.x.<br />

For more information on operations of this group<br />

see <strong>Automated</strong>QA Tools Category in the Testing,<br />

Profiling<br />

and Issue-Tracking Operations document or in on-line help.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com


210<br />

Borland<br />

Compilers Category<br />

The Borland Compilers category includes<br />

the following operations:<br />

Operation Description<br />

Compile Borland C# 2005 Project Compiles Borland C# 2005 projects.<br />

Compile Borland C# 2006 Project Compiles Borland C# 2006 projects.<br />

Compile Borland<br />

Group<br />

Operations Reference<br />

Developer <strong>Studio</strong> 2005 Project Compiles a group of Borland Developer <strong>Studio</strong> 2005<br />

projects.<br />

Compile Borland Developer <strong>Studio</strong> 2006<br />

Project Compiles a group of Borland Developer <strong>Studio</strong> 2006<br />

Group<br />

projects.<br />

Compile Borland VB .NET 2005 Project Compiles Borland VB .NET 2005 projects.<br />

Compile Borland VB .NET 2006 Project Compiles Borland VB .NET 2006 projects.<br />

Compile C++<strong>Build</strong>er 3-4 Project<br />

Compile C++<strong>Build</strong>er 3-6 Project Group<br />

Compiles Borland C++<strong>Build</strong>er projects<br />

created in<br />

Borland C++<strong>Build</strong>er 3 and Borland C++<strong>Build</strong>er<br />

4.<br />

Compiles a group of Borland C++<strong>Build</strong>er projects<br />

(supports Borland C++<strong>Build</strong>er v. 3 - 6)<br />

Compile C++<strong>Build</strong>er 5 Project Compiles Borland C++<strong>Build</strong>er 5 projects.<br />

Compile C++<strong>Build</strong>er 6 Project Compiles Borland C++<strong>Build</strong>er 6 projects.<br />

Compile C++<strong>Build</strong>er 2006 Project Compiles Borland C++<strong>Build</strong>er 2006 projects.<br />

Compile C++<strong>Build</strong>er 2007 Project Compiles CodeGear C++<strong>Build</strong>er 2007 projects.<br />

Compile C++<strong>Build</strong>er 2009 Project Compiles CodeGear C++<strong>Build</strong>er 2009 projects.<br />

Compile CodeGear C# 2009 Project Compiles CodeGear C# 2009 projects.<br />

Compile CodeGear RAD <strong>Studio</strong> Project Group<br />

Compile CodeGear RAD <strong>Studio</strong> 2009 Project<br />

Group<br />

Compile Delphi 3-7 Project<br />

Compile Delphi 4-7 Project Group<br />

Compile Delphi 8 for .NET Project<br />

Compile Delphi 8 for .NET Project Group<br />

Compile Delphi 2005 for .NET Project<br />

Compile Delphi 2005 for Win32 Project<br />

Compile Delphi 2006 for .NET Project<br />

Compile Delphi 2006 for Win32 Project<br />

Compiles a group of CodeGear RAD <strong>Studio</strong> 2007<br />

projects.<br />

Compiles a group of CodeGear RAD <strong>Studio</strong> 2009<br />

projects.<br />

Compiles Borland Delphi projects (supports Delphi v.<br />

3 - 7).<br />

Compiles a group of Borland Delphi projects<br />

(supports Delphi v. 4 - 7)<br />

Compiles Borland Delphi 8 for Microsoft .NET<br />

projects.<br />

Compiles a group of Borland Delphi 8 for Microsoft<br />

.NET projects.<br />

Compiles Borland Delphi 2005 for Microsoft .NET<br />

projects.<br />

Compiles Borland Delphi 2005 for Microsoft<br />

Windows projects.<br />

Compiles Borland Delphi 2006 for Microsoft .NET<br />

projects.<br />

Compiles Borland Delphi 2006 for Microsoft<br />

Windows projects.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Compile Delphi 2007 for Win32 Project Compiles CodeGear Delphi 2007 for Microsoft<br />

Windows projects.<br />

Compile Delphi 2009 for .NET Project<br />

Compile Delphi 2009 for Win32 Project<br />

Compile J<strong>Build</strong>er Project<br />

Compile J<strong>Build</strong>er Project Group<br />

211<br />

Compiles CodeGear Delphi 2009 for Microsoft .NET<br />

projects.<br />

Compiles CodeGear Delphi 2009 for Microsoft<br />

Windows projects.<br />

Compiles Borland J<strong>Build</strong>er projects (supports<br />

Borland J<strong>Build</strong>er 6 or later).<br />

Compiles a group of Borland J<strong>Build</strong>er projects<br />

(supports Borland J<strong>Build</strong>er 6 or later).<br />

Compile Resource Script Compiles a resource script file.<br />

For more information on operations of this group see Borland Compilers Category in the Compilers,<br />

Help Compilers and Code Preparation Operations document or in on-line help.<br />

<strong>Build</strong> Tools Category<br />

The <strong>Build</strong> Tools category includes the following operations:<br />

Operation Description<br />

Ant Runs an automatic build using Apache Ant.<br />

Incredi<strong>Build</strong> Runs a distributed build of Visual C++ projects via Xoreax<br />

<strong>Software</strong> Incredi<strong>Build</strong>.<br />

Incredi<strong>Build</strong> Command Controls the running of a distributed build performed by<br />

Incredi<strong>Build</strong>.<br />

MS<strong>Build</strong> Runs an automatic build using Microsoft MS<strong>Build</strong>.<br />

NAnt Runs an automatic build using NAnt.<br />

For more information on operations of this group see <strong>Build</strong> Tools Category in the Installation and<br />

<strong>Build</strong>ing Operations document or in on-line help.<br />

Burn CD/DVD Category<br />

The Burn CD/DVD category includes the following operations:<br />

Operation Description<br />

Burn ISO Image Burns an existing ISO image to a CD or DVD disk.<br />

Burn CD/DVD Burns arbitrary files and folders to a CD or DVD disk.<br />

Check CD/DVD Ready Checks whether a CD/DVD drive is ready for burning.<br />

Create ISO Image Creates an ISO image from arbitrary files.<br />

Erase CD/DVD Erases a rewritable CD or DVD disk.<br />

For more information on operations of this group see Burn CD/DVD Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com


212<br />

Communication Category<br />

The Communication category includes the following operations:<br />

Operation Description<br />

Operations Reference<br />

E-mail Enumerator Receives all the e-mail messages stored on the server at once or<br />

searches through the list of these messages to locate those you actually<br />

want to receive from the server.<br />

Receive E-mail Message Receives an individual e-mail message.<br />

Receive News Message Receives a news message.<br />

Send E-mail Sends an e-mail message.<br />

Send Message via ICQ Sends a message to an ICQ user.<br />

Send Message via Windows<br />

Messenger<br />

Sends a message to one or several Windows Messenger, MSN<br />

Messenger or Windows Live Messenger users.<br />

Send News Message Sends a message to a newsgroup.<br />

For more information on operations of this group see Communication Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Concurrent Versions System Category<br />

The Concurrent Versions System category includes the following operations, which are aimed to work<br />

with Concurrent Versions System (CVS):<br />

Operation Description<br />

CVS Add Adds files to the CVS repository.<br />

CVS Checkout Checks out files from the CVS repository to a working folder.<br />

CVS Commit Incorporates changes from your working files into the CVS repository.<br />

CVS Export Gets a copy of the source files from the CVS repository.<br />

CVS Import Incorporates an entire source distribution from an outside source into the CVS<br />

repository folder.<br />

CVS Init Creates a new CVS repository on the current computer.<br />

CVS Login Establishes a user session, so that further CVS operations do not need<br />

connection parameters.<br />

CVS Logout Terminates the user session that was established with the last CVS Login<br />

operation.<br />

CVS Release Safely undoes all uncommitted changes and leaves an appropriate trace in the<br />

CVS History file.<br />

CVS Remove Removes files from the CVS repository.<br />

CVS RTag Assigns symbolic tags to definite file revisions in the CVS repository.<br />

CVS Update Settles your changes to the checked-out CVS files with any revisions of these<br />

files since your last checkout or update.<br />

Get Changes From CVS Gets a list of modified, added and removed files from a CVS repository.<br />

Run CVS Command Executes an arbitrary CVS command.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

For more information on operations of this group see Concurrent Versions System Category in the<br />

Version Control Systems Operations document or in on-line help.<br />

Execute Category<br />

The Execute category includes the following operations, which let you run external applications from<br />

within your macros:<br />

Operation Description<br />

Execute ACT Script Runs a Microsoft Application Center Test project.<br />

Execute DOS Command Performs the specified DOS command.<br />

Execute Macro Executes a macro created with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>.<br />

Execute Program Launches the specified program.<br />

Open File <strong>With</strong> Registered Application Opens a file in the application associated with the file type.<br />

Run Smart Device Emulator Launches an emulator to test your projects built for<br />

Windows CE or Pocket PC.<br />

For more information on operations of this group see Execute Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Files and Directories Category<br />

The Files and Directories category includes the following operations:<br />

Operation Description<br />

Beyond Compare Compares files or folders via Beyond Compare.<br />

Beyond Compare Script Runs a Beyond Compare script that includes commands controlling Beyond<br />

Compare and performing file operations via this tool.<br />

Calculate Checksum Calculates a checksum of a file using an appropriate format.<br />

Compare Files Compares two files byte-by-byte.<br />

Copy File(s) Copies one or several files.<br />

Copy/Move Directory Copies or moves a folder to the new location.<br />

Create Directory Creates a new folder with the specified name.<br />

Delete File(s) Deletes one or several files.<br />

Directory Enumerator Obtains a collection of folders and then performs child operations for each<br />

folder in the collection.<br />

File Enumerator Obtains a collection of files and then performs child operations for each file<br />

in the collection.<br />

Get File Attributes Retrieves the attributes of a specified file.<br />

Get File Version Info Retrieves version information from a specified file.<br />

Get Size Gets the size of the specified file or folder.<br />

If Directory Exists Executes the child operation(s) if the specified directory exists.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

213


214<br />

If File Exists Executes the child operation(s) if the specified file exists.<br />

Move File(s) Moves the specified files to a new location.<br />

Remove Directory Deletes a folder.<br />

Rename Directory Renames a folder.<br />

Operations Reference<br />

Robocopy Copies files and folders using Microsoft Robust File Copy Utility<br />

(robocopy).<br />

Run Robocopy Job Runs a robocopy job file that contains settings that control what to copy and<br />

to which destination.<br />

Find/Replace in File Searches for a value in a file and replaces it with another value.<br />

Set/Clear File Attributes Modifies the file attributes.<br />

Set File Version Info Assigns version information for the specified file.<br />

Set Manifest Embeds manifest into a DLL or executable file.<br />

Set Resource Language Assigns the language of the resources stored in DLLs or executables.<br />

Validate XML File Validates an XML file against DTDs and schemas.<br />

XCopy Copies one or several files or folders, including subfolders.<br />

For more information on operations of this group see Files and Directories Category in the General-<br />

Purpose Operations document or in on-line help.<br />

Frequently Used Category<br />

The Frequently Used category contains operations that you use most frequently when creating your<br />

macros. The category is populated as you add operations to macros. When you add an operation to the<br />

macro, this operation is automatically added to the Frequently Used category. Most frequently used<br />

operations are displayed on the top of the category, less frequently used – on the bottom of the category. The<br />

maximum number of operations displayed in this category is 20.<br />

For convenience, the Frequently Used category is displayed on the top of Operations panel so that you<br />

can quickly locate the needed operation. To hide or display this category in the Operations panel, use the<br />

Show “Frequently Used” category command of the Operations panel’s context menu.<br />

FTP Category<br />

The FTP category includes the following operations:<br />

Operation Description<br />

Connect To FTP Connects to an FTP server.<br />

Create FTP Directory Creates a new folder on the FTP server.<br />

Delete FTP File Delete a file on the FTP server.<br />

Disconnect From FTP Disconnects from an FTP server.<br />

Download File(s) From FTP Downloads the specified file(s) from the FTP server.<br />

FTP File Enumerator Obtains a list of files of the current directory of the FTP server and<br />

performs child operation for each file in the list.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Get Current FTP Directory Obtains the name of the current directory on the FTP server.<br />

Get FTP File Size Obtains the size of the specified file that is located on the FTP server.<br />

If FTP Directory Exists Performs the child operation(s) if the specified directory exists on a<br />

FTP server.<br />

If FTP File Exists Executes the child operation(s) if the specified file exists on the FTP<br />

server.<br />

List Current FTP Directory Saves the contents of the current directory on the FTP server to a<br />

variable.<br />

Remove FTP Directory Deletes the specified directory on the FTP server.<br />

Rename FTP File Renames the specified file on the FTP server.<br />

Set Current FTP Directory Specifies the current directory on the FTP server.<br />

Synchronize Directories Synchronizes the contents of a local directory and the directory on a<br />

FTP server.<br />

Up One Level Change the current directory on the FTP server to its parent directory.<br />

Upload File(s) to FTP Uploads the specified file(s) to the FTP server.<br />

For more information on operations of this group see FTP Category in the General-Purpose Operations<br />

document or in on-line help.<br />

Help Compilers Category<br />

The Help Compilers category includes the following operations:<br />

Operation Description<br />

Doc-O-Matic <strong>Build</strong>s a Doc-O-Matic help project.<br />

Doc-To-Help 2008 <strong>Build</strong>s a Doc-To-Help help project.<br />

Fast-Help <strong>Build</strong>s a Fast-Help help project.<br />

Help & Manual <strong>Build</strong>s a Help & Manual help project.<br />

HelpScribble <strong>Build</strong>s a HelpScribble help project.<br />

Help<strong>Studio</strong> <strong>Build</strong>s a Help<strong>Studio</strong> help project.<br />

Microsoft Help Compiler <strong>Build</strong>s the help file in .hlp format.<br />

Microsoft HTML Help Compiler <strong>Build</strong>s the help file in .chm format.<br />

NDoc Help Compiler <strong>Build</strong>s the help file in several formats using NDoc ver 1.0-1.3.<br />

NDoc 1.31 Help Compiler <strong>Build</strong>s the help file in several formats using NDoc ver 1.3.1.<br />

RoboHelp <strong>Build</strong>s the Robohelp WinHelp project.<br />

Sandcastle HTML Generator<br />

(<strong>Build</strong>Assembler)<br />

Sandcastle Reflection Generator<br />

(MRefAssembler)<br />

Sandcastle XSL Transformer<br />

(XslTransform)<br />

Generates logically grouped HTML topics for each element of<br />

the assembly.<br />

Creates a reflection file that describes each element in the<br />

.NET assembly.<br />

Performs XSL transformation for the specified XML-file.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

215


216<br />

Operations Reference<br />

For more information on operations of this group see Help Compilers Category in the Compilers, Help<br />

Compilers and Code Preparation Operations document or in on-line help.<br />

HTTP Category<br />

The HTTP category includes the following operations:<br />

Operation Description<br />

Connect To HTTP Connects to an HTTP server.<br />

Disconnect From HTTP Disconnects from an HTTP server.<br />

HTTP Head Requests a Web server using the HEAD method.<br />

HTTP Get Sends an HTTP request of the GET type to a Web server.<br />

HTTP Post Sends an HTTP request of the POST type to a Web server.<br />

For more information on operations of this group see HTTP Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Installers Category<br />

The Installers category includes the following operations:<br />

Operation Description<br />

Advanced Installer <strong>Build</strong>s installation programs with Advanced Installer.<br />

ExpertInstall <strong>Build</strong>s installation programs with ExpertInstall.<br />

Ghost Installer <strong>Build</strong>s installation programs with Ghost Installer.<br />

Inno Setup <strong>Build</strong>s installation programs with Inno Setup.<br />

InstallAnywhere Enterprise <strong>Build</strong>s installation programs with InstallAnywhere Enterprise.<br />

InstallAnywhere.NET <strong>Build</strong>s installation programs with InstallAnywhere.NET.<br />

InstallAware <strong>Build</strong>s installation programs with InstallAware <strong>Studio</strong>.<br />

InstallShield 7-2009 Operation <strong>Build</strong>s installation programs with InstallShield v. 7-2009.<br />

InstallShield Express Borland<br />

Limited Edition<br />

<strong>Build</strong>s installation programs with InstallShield Express Borland<br />

Limited Edition.<br />

InstallShield Professional 6-7 <strong>Build</strong>s installation programs with InstallShield Professional v. 6.1-<br />

7.x.<br />

InstallShield Standalone <strong>Build</strong> <strong>Build</strong>s installation programs with InstallShield Standalone <strong>Build</strong><br />

module.<br />

InstallShield Universal <strong>Build</strong>s installation programs with InstallShield Universal.<br />

MS Setup Project <strong>Build</strong>s installation programs with Microsoft Windows Installer.<br />

MSI Factory <strong>Build</strong>s installation programs with MSI Factory.<br />

MSI Generic Executes an SQL statement against a Windows Installer Package<br />

(MSI) database.<br />

MSI Merge Merges two Windows Installer (MSI) packages into one.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

MSI Transform Applies a transform to a Windows Installer Package (MSI) or<br />

generates a transform file.<br />

MSI Update Properties Modifies property values defined in a Windows Installer Package<br />

(MSI) and/or adds new properties.<br />

MSI Validation Validates a Windows Installer Package (MSI) using Internal<br />

Consistency Evaluators (ICEs).<br />

MSI<strong>Studio</strong> <strong>Build</strong>s installation programs with MSI<strong>Studio</strong>.<br />

Nullsoft Scriptable Install System <strong>Build</strong>s installation programs with Nullsoft Scriptable Install System.<br />

Setup Factory <strong>Build</strong>s installation programs with Setup Factory.<br />

Setup<strong>Build</strong>er <strong>Build</strong>s installation programs with Setup<strong>Build</strong>er.<br />

Wise <strong>Build</strong>s installation programs with Wise installation authoring tools<br />

(Wise for Windows Installer v. 5.0 or higher, Wise for Visual <strong>Studio</strong><br />

.NET v. 5.0 or higher, Wise Package <strong>Studio</strong> v. 5.0 or higher).<br />

Wise Installation System <strong>Build</strong>s installation programs with Wise Installation System.<br />

WiX Compiler (candle) Compiles the Windows Installer XML (WiX) source files into WiX<br />

object files.<br />

WiX Decompiler (dark) Converts the MSI installation package into the Windows Installer<br />

XML (WiX) source files.<br />

WiX Linker (light) Creates the Windows Installer Package (MSI or MSM) based on the<br />

Windows Installer XML (WiX) object files.<br />

For more information on operations of this group see Installers Category in the Installation and <strong>Build</strong>ing<br />

Operations document or in on-line help.<br />

Interactive Category<br />

The Interactive category includes the following operations:<br />

Operation Description<br />

Check List Displays a dialog with a group of check boxes.<br />

Confirmation Box Displays a confirmation dialog.<br />

Input Box Displays an input dialog.<br />

Message Box Displays a message box.<br />

Radio Group Displays a dialog with a group of radio buttons.<br />

Select File Displays an Open File dialog.<br />

Select Folder Displays a Browse for Folder dialog.<br />

For more information on operations of this group see Interactive Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Internet Information Services (IIS) Category<br />

The Internet Information Services (IIS) category includes the following operations:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

217


218<br />

Operation Description<br />

Add/Remove Allowed ISAPI/CGI<br />

Extension (IIS6+)<br />

Create Application Pool (IIS6+) Creates a new application pool.<br />

Operations Reference<br />

Enables or disables ISAPI extensions and CGI applications in<br />

IIS.<br />

Create FTP Directory (IIS6+) Creates a new folder on an IIS FTP site.<br />

Create FTP Site (IIS6+) Creates a new IIS FTP site.<br />

Create Virtual Directory Creates a virtual directory on a IIS web site.<br />

Create Web Site Creates a new IIS web site.<br />

Delete Application Pool (IIS6+) Deletes an existing application pool.<br />

Delete FTP Directory (IIS6+) Removes a folder from a IIS FTP site.<br />

Delete FTP Site (IIS6+) Deletes an existing IIS FTP site.<br />

Delete Virtual Directory Deletes an existing virtual directory from an IIS web site.<br />

Delete Web Site Removes an existing IIS web site.<br />

Manage Configuration Backup Saves or restores the IIS metabase.<br />

Manage Service Starts, stops or restarts the specified IIS service.<br />

Manage Site Starts, stops or restarts the specified IIS site.<br />

For more information on operations of this group see Internet Information Services (IIS) Category in the<br />

General-Purpose Operations document or in on-line help.<br />

Issue Tracking Category<br />

The Issue Tracking category includes the following operations:<br />

Operation Description<br />

AQdevTeam Create Issue Obsolete. Creates an item in AQdevTeam.<br />

AQdevTeam Create Item Adds a new item to an AQdevTeam database.<br />

AQdevTeam Edit Item Modifies an item stored in an AQdevTeam database.<br />

AQdevTeam Item Enumerator Iterates through items stored in an AQdevTeam database.<br />

AQdevTeam History Enumerator<br />

Iterates through those items of an AQdevTeam database<br />

whose statuses were changed by particular actions and<br />

within a particular time period.<br />

Bugzilla Create Item Adds a new item to a Bugzilla database.<br />

Bugzilla Edit Item Modifies an item stored in a Bugzilla database.<br />

Bugzilla Item Enumerator Iterates through items stored in a Bugzilla database.<br />

CaliberRM Create Requirement Adds a requirement to a CaliberRM database.<br />

CaliberRM Delete Requirement Removes a requirement from a CaliberRM database.<br />

CaliberRM Edit Requirement Modifies a requirement stored in a CaliberRM database.<br />

CaliberRM Requirement Enumerator<br />

Obtains a collection of requirements stored in a CaliberRM<br />

database and then executes child operations for each<br />

requirement in the collection.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

StarTeam Create Issue<br />

StarTeam Delete Issue<br />

StarTeam Edit Issue<br />

StarTeam Issue Enumerator<br />

Team Coherence Create Issue<br />

Team Coherence Delete Issue<br />

Team Coherence Edit Issue<br />

Team Coherence Issue Enumerator<br />

Team Foundation Create Work Item<br />

Team Foundation Edit Work Item<br />

Team Foundation Work Item<br />

Enumerator Operation<br />

Team Foundation Work Item State<br />

Change Filter Operation<br />

Adds an item (a change request, a task or a topic) to a<br />

StarTeam database.<br />

Removes an item (a change request, a task or a topic) from<br />

a StarTeam database.<br />

Modifies an item (a change request, a task or a topic) stored<br />

in a StarTeam database.<br />

Obtains a collection of items (change requests, tasks or<br />

topics) stored in a StarTeam database and then executes<br />

child operations for each item in the collection.<br />

Adds an item (a bug report, feature request, etc.) to Team<br />

Coherence's database.<br />

Removes an item (a bug report, feature request, etc.) from<br />

Team Coherence's database.<br />

Modifies an item (a bug report, feature request, etc.) stored<br />

in a Team Coherence database.<br />

Obtains a collection of items (bug reports, feature requests,<br />

etc.) stored in a Team Coherence database and then<br />

executes child operations for each item in the collection.<br />

Adds a new work item to Microsoft Visual <strong>Studio</strong> 2005<br />

Team Foundation.<br />

Edits a work item stored in Microsoft Visual <strong>Studio</strong> 2005<br />

Team Foundation.<br />

Iterates through work items stored in the Team Foundation<br />

database and executes child operations for each item.<br />

Iterates through work items that are stored in the Team<br />

Foundation database and whose state was changed during<br />

the specified time period.<br />

For more information on operations of this group see IssueTracking Category in the Testing, Profiling<br />

and Issue-Tracking Operations document or in on-line help.<br />

JediVCS Category<br />

The JediVCS category includes the following operations:<br />

Operation Description<br />

JediVCS Check In Checks in one or more modules to the JediVCS repository.<br />

JediVCS Check Out Checks out module(s) from the JediVCS repository.<br />

JediVCS Get Module Retrieves one or more modules from the specified location.<br />

JediVCS Input Executes a sequence of commands from an external file.<br />

JediVCS Label Project Specifies a label for the project stored in the JediVCS repository.<br />

JediVCS Lock Enumerator Retrieves a collection of checked out modules and executes a<br />

child operation over each module in the collection.<br />

JediVCS Module Enumerator Retrieves a collection of modules that belong to a specified<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

219


220<br />

Operations Reference<br />

project and executes a child operation over each module in the<br />

collection.<br />

JediVCS Project Enumerator Retrieves a collection of projects stored in the JediVCS and<br />

executes a child operation over each project in the collection.<br />

JediVCS Synchronize Project Obtains the latest or desired version of all modules of a specified<br />

project.<br />

JediVCS Synchronize Project Group Obtains the latest or desired version of all projects from a<br />

specified project group.<br />

JediVCS Undo Check Out Undoes the checkout of module(s) in the JediVCS repository.<br />

For more information on operations of this group see JediVCS Category in the Version Control Systems<br />

Operations document or in on-line help.<br />

Logging Category<br />

The Logging category includes the following operations:<br />

Operation Description<br />

Disable Logging Filters out the messages to be posted to the log.<br />

Enable Logging Re-enables posting of messages to the log.<br />

Export Errors From Log Exports errors from <strong>Build</strong> <strong>Studio</strong>’s Log panel to a file or to a variable.<br />

Export Log Exports the contents of <strong>Build</strong> <strong>Studio</strong>’s Log panel to a file or a variable.<br />

Export Summary Exports the contents of <strong>Build</strong> <strong>Studio</strong>’s Summary panel to an HTML file<br />

or a variable.<br />

Set Log Marker Adds a marker to the log.<br />

For more information on operations of this group see Logging Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Microsoft Compilers Category<br />

The Microsoft Compilers category includes the following operations:<br />

Operation Description<br />

ASP.NET Compiler Performs in-place or deployment compilation of the<br />

ASP.NET Web application.<br />

Compile Visual C# .NET 7.x Project Compiles Visual C# .NET 7.0 and 7.1 projects.<br />

Compile Visual C# 2005 Project Compiles Visual C# 2005 projects.<br />

Compile Visual C# 2008 Project Compiles Visual C# 2008 projects.<br />

Compile Visual Basic .NET 7.x Project Compiles Visual Basic .NET 7.0 and 7.1 projects.<br />

Compile Visual Basic 2005 Project Compiles Visual Basic 2005 projects.<br />

Compile Visual Basic 2008 Project Compiles Visual Basic 2008 projects.<br />

Compile Visual C++ .NET 7.x Project Compiles Visual C++ .NET 7.0 and 7.1 projects.<br />

Compile Visual C++ 2005 Project Compiles Visual C++ 2005 projects.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Compile Visual C++ 2005 Project Compiles Visual C++ 2008 projects.<br />

Compile Visual J# .NET 7.x Project Compiles Visual J# .NET 7.1 projects.<br />

Compile Visual J# 2005 Project Compiles Visual J# 2005 projects.<br />

Compile Visual <strong>Studio</strong> Solution Project Compiles Visual <strong>Studio</strong> .NET 7.0, 7.1, Visual <strong>Studio</strong><br />

2005 and Visual <strong>Studio</strong> 2008 solutions.<br />

Compile Visual C++ 6.0 Project Compiles Visual C++ 6.0 projects.<br />

Compile Visual Basic 6.0 Project Compiles Visual Basic 6.0 projects.<br />

Compile Visual Basic 6.0 Project Group Compiles a group of Visual <strong>Studio</strong> 6.0 Projects<br />

Compile Visual <strong>Studio</strong> Workspace Compiles Visual <strong>Studio</strong> 6.0 workspaces.<br />

MSIL Assembler Generates a portable executable file (PE) from MSIL<br />

assembly language.<br />

For more information on operations of this group see Microsoft Compilers Category in the Compilers,<br />

Help Compilers and Code Preparation Operations document or in on-line help.<br />

Microsoft Compilers for Smart Device Category<br />

The Microsoft Compilers for Smart Device category includes the following operations:<br />

Operation Description<br />

Compile eMbedded Visual C++ 4.0 Project Compiles eMbedded Visual C++ 4.0 projects.<br />

Compile Visual Basic .NET 7.x Project for<br />

Smart Device<br />

Compile Visual Basic .NET 2005 Project<br />

for Smart Device<br />

Compile Visual C# .NET 7.x Project for<br />

Smart Device<br />

Compile Visual C# .NET 2005 Project for<br />

Smart Device<br />

Compile Visual C++ .NET 2005 Project for<br />

Smart Device<br />

Compiles Visual Basic .NET 7.0 and 7.1 projects for<br />

smart device.<br />

Compiles Visual Basic .NET 2005 projects for smart<br />

device.<br />

Compiles Visual C# .NET 7.0 and 7.1 projects for smart<br />

device.<br />

Compiles Visual C# .NET 2005 projects for smart<br />

device.<br />

Compiles Visual C++ .NET 2005 projects for smart<br />

device.<br />

For more information on operations of this group see Microsoft Compilers for Smart Device Category in<br />

the Compilers, Help Compilers and Code Preparation Operations document or in on-line help.<br />

Microsoft Source Server Category<br />

The Microsoft Source Server category includes the following operations:<br />

Operation Description<br />

Index PDB Files Indexes PDB files for the specified source control<br />

system.<br />

Index PDB Files For VSS Indexes PDB files for Microsoft Visual SourceSafe.<br />

Index PDB Files For Subversion Indexes PDB files for Subversion.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

221


222<br />

Index PDB Files For Perforce Indexes PDB files for Perforce.<br />

Index PDB Files For CVS Indexes PDB files for CVS.<br />

Operations Reference<br />

Read From PDB Stream Reads a value from the specified PDB stream to the<br />

specified variable.<br />

Write to PDB Stream Writes the specified data to the specifies PDB stream.<br />

For more information on operations of this group see Microsoft Source Server Category in the Version<br />

Controls Systems Operations document or in on-line help.<br />

Microsoft Virtual PC Category<br />

The Microsoft Virtual PC category includes the following operations:<br />

Operation Description<br />

Capture/Release Virtual Machine’s Device<br />

(Virtual PC)<br />

Close Virtual Machine (Virtual PC)<br />

If OS Is Loaded (Virtual PC)<br />

If Virtual Machine Is ... (Virtual PC)<br />

If Virtual Machine’s Device Is ... (Virtual PC)<br />

Manage Virtual Machine’s Window (Virtual<br />

PC)<br />

Captures a CD, DVD or floppy drive making it<br />

available to a virtual machine, or releases a drive<br />

that has been captured previously.<br />

Closes or turns off a running virtual machine or<br />

shuts down the operating system on the virtual<br />

machine. If undo disks are used, the operation also<br />

commits or discards the data changes.<br />

Executes the child operation(s) if the operating<br />

system was loaded successfully on the virtual<br />

machine.<br />

Executes the child operation(s) if a virtual machine<br />

is in a particular state.<br />

Executes the child operation(s) if a virtual machine’s<br />

CD, DVD or floppy drive is in a particular state.<br />

Modifies the onscreen position, state and dimensions<br />

of a virtual machine's window on the host<br />

computer’s desktop.<br />

Pause/Resume Virtual Machine (Virtual PC) Pauses or resumes a virtual machine.<br />

Register/Unregister Virtual Machine (Virtual<br />

PC)<br />

Registers or unregisters a virtual machine in<br />

Microsoft Virtual PC Environment.<br />

Run Virtual Machine (Virtual PC) Runs a virtual machine on Microsoft Virtual PC.<br />

Virtual Machine Enumerator (Virtual PC)<br />

Obtains a list of virtual machines installed on the<br />

current host computer and executes child operations<br />

for each machine in the list.<br />

For more information on operations of this group see Microsoft Virtual PC Category in the General-<br />

Purpose Operations document or in on-line help.<br />

Microsoft Virtual Server Category<br />

The Microsoft Virtual Server category includes the following operations:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Operation Description<br />

Capture/Release Virtual Machine’s Device<br />

(Virtual Server)<br />

Discard/Merge Undo Disks (Virtual<br />

Server)<br />

Captures a CD, DVD or floppy drive making it<br />

available to a virtual machine, or releases a drive that<br />

has been captured previously.<br />

Discards or merges changes that are stored in the undo<br />

disks file.<br />

If OS Is Loaded (Virtual Server) Executes the child operation(s) if the operating system<br />

was loaded successfully on the virtual machine running<br />

under Microsoft Virtual Server 2005.<br />

If Virtual Machine Is … (Virtual Server) Executes the child operation(s) if a virtual machine<br />

running under Microsoft Virtual Server 2005 is in a<br />

particular state.<br />

If Virtual Machine’s Device Is ... (Virtual<br />

Server)<br />

Pause/Resume Virtual Machine (Virtual<br />

Server)<br />

Register/Unregister Virtual Machine<br />

(Virtual Server)<br />

Reset/Shutdown/Turn off Virtual Machine<br />

(Virtual Server)<br />

Executes the child operation(s) if a virtual machine’s<br />

CD, DVD or floppy drive is in a particular state.<br />

Pauses or resumes a virtual machine running on<br />

Microsoft Virtual Server 2005.<br />

Registers or unregisters a virtual machine in Microsoft<br />

Virtual Server 2005.<br />

Resets or turns off a virtual machine running on<br />

Microsoft Virtual Server 2005 or shuts down the<br />

operating system on the virtual machine.<br />

Run Virtual Machine (Virtual Server) Runs a virtual machine on Microsoft Virtual Server<br />

2005.<br />

Save State/Discard Saved State (Virtual<br />

Server)<br />

Saves the state of a virtual machine running on<br />

Microsoft Virtual Server 2005 or discards the saved<br />

state.<br />

Send Key Sequences (Virtual Server) Simulates the given series of keys being typed (pressed<br />

and then released) inside the virtual machine running<br />

under Microsoft Server 2005.<br />

Virtual Machine’s Device Enumerator<br />

(Virtual Server)<br />

Virtual Machine Enumerator (Virtual<br />

Server)<br />

Obtains a list of devices installed on a virtual machine<br />

and executes child operations for each device in this<br />

list.<br />

Obtains a list of virtual machines installed on a virtual<br />

server and executes child operations for each machine<br />

in the list.<br />

For more information on operations of this group see Microsoft Virtual Server Category in the General-<br />

Purpose Operations document or in on-line help.<br />

Microsoft Visual SourceSafe Category<br />

The Microsoft Visual SourceSafe category includes the following operations:<br />

Operation Description<br />

Check In File(s) to VSS Checks in one or more files to Microsoft Visual<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

223


224<br />

SourceSafe.<br />

Check Out File(s) From VSS Checks out files from Visual SourceSafe.<br />

Operations Reference<br />

Get File(s) by Date From VSS Gets files specified by their date in Visual SourceSafe.<br />

Get File(s) by Label From VSS Operation Gets files specified by their label in Visual SourceSafe.<br />

Get Latest Version From VSS Gets the latest version of files from Visual SourceSafe.<br />

Pin File(s) in VSS Pins the files specified by their label or version number<br />

in Visual SourceSafe.<br />

Set Label to VSS File(s) Specifies labels for files stored to Visual SourceSafe.<br />

Undo Check Out File(s) From VSS Undoes the checkout of files under a Visual SourceSafe.<br />

Unpin File(s) in VSS Unpins the specified files in Visual SourceSafe.<br />

VSS File Enumerator Obtains a collection of files stored in Visual SourceSafe<br />

and then performs child operations for each file in the<br />

collection.<br />

VSS Version Enumerator Obtains a collection of history items for a project or files<br />

stored in Visual SourceSafe and then performs child<br />

operations for each history item in the collection.<br />

For more information on operations of this group see Microsoft Visual SourceSafe Category in the<br />

Version Control Systems Operations document or in on-line help.<br />

Misc Category<br />

The Misc category includes the following operations:<br />

Operation Description<br />

Comment Displays a comment in the operations tree of a macro.<br />

Create GUID Generates a new GUID and saves it to a variable.<br />

Delay Delays the macro execution for the specified time span.<br />

Get Free Disk Space Obtains the amount of free space on the specified disk.<br />

If COM Class Is Registered<br />

If Window Exists<br />

Checks if a COM class is registered in the system and performs child<br />

operations according to the result of the check.<br />

Checks if a window appears on screen and performs the child<br />

operations according to the result of the check.<br />

Map Network Drive Adds a network drive to computer system.<br />

Substitute Drive Adds a virtual drive that maps a local or shared network folder.<br />

Unmap Network Drive Removes a mapped network drive from computer system.<br />

For more information on operations of this group see Misc Category in the General-Purpose Operations<br />

document or in on-line help.<br />

MySQL Category<br />

The MySQL category includes the following operations:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Operation Description<br />

Execute MySQL Script<br />

Executes an SQL script against a MySQL Server<br />

database.<br />

MySQL BinLog Reads a binary log file, or converts it to the text format.<br />

MySQL Check<br />

Checks, analyzes, optimizes or repairs the specified<br />

table(s) in a MySQL Server database.<br />

MySQL Dump Backs up the specified MySQL Server database table(s).<br />

MySQL Import<br />

Imports data into a MySQL Server database table from a<br />

text file.<br />

For more information on operations of this group see MySQL Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Oracle Category<br />

The Oracle category includes the following operations:<br />

Operation Description<br />

Back Up Oracle Database Backs up the specified Oracle database.<br />

Execute RMAN Script Executes a block of Recovery Manager commands.<br />

Execute SQLPLUS Script Runs an SQLPlus script that accesses an Oracle database.<br />

Recover Oracle Database Recovers an Oracle database.<br />

Restore Oracle Database Restores a database from the back up.<br />

For more information on operations of this group see Oracle Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Other Compilers Category<br />

The Other Compilers category includes the following operations:<br />

Operation Description<br />

Compile Chrome Project Compiles RemObject <strong>Software</strong> Chrome projects.<br />

Compile Intel C++ Project for Visual<br />

<strong>Studio</strong> .NET 7.x<br />

Compile Visual C++ 2005 Project for<br />

Smart Device Using Intel C++ Compiler<br />

GCC Compiler<br />

Intel C++ Compiler for IA-32<br />

Intel C++ Compiler for Itanium<br />

Compiles Intel C++ for Windows projects integrated into<br />

Visual <strong>Studio</strong> .NET 7.x.<br />

Compiles your Visual C++ 2005 Project for Smart Device<br />

by using Intel C++ Compiler 2.0 for Windows CE.<br />

Preprocesses, compiles, assembles and links your C/C++<br />

files using the GNU Compiler Collection (GCC) version<br />

4.1.1.<br />

Employs Intel C++ Compiler for Windows, versions 7-<br />

9.1, to compile C++ source code into binary code that<br />

targets the IA-32 architecture based processors.<br />

Employs Intel C++ Compiler for Windows, versions 7-<br />

9.1, to compile C++ source code into binary code that<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

225


226<br />

Intel Fortran Compiler for IA-32<br />

Intel Fortran Compiler for Itanium<br />

targets Intel Itanium processors.<br />

Java Compiler Compiles Java projects.<br />

Operations Reference<br />

Employs Intel Fortran Compiler for Windows, versions 8-<br />

9, to compile Fortran source code into binary code that<br />

targets the IA-32 architecture based processors.<br />

Employs Intel Fortran Compiler for Windows, versions 8-<br />

9, to compile Fortran source code into binary code that<br />

targets Intel Itanium processors.<br />

For more information on operations of this group see Other Compilers Category in the Compilers, Help<br />

Compilers and Code Preparation Operations document or in on-line help.<br />

Patch Management Category<br />

The Patch Management category includes the following operations:<br />

Operation Description<br />

IncUpdate <strong>Build</strong>er <strong>Build</strong>s a project created in IncUpdate <strong>Build</strong>er 2.53 or later.<br />

Visual Patch <strong>Build</strong>s a project created in Visual Patch 2.0 or later.<br />

For more information on operations of this group see Patch Management Category in the Installation<br />

and <strong>Build</strong>ing Operations document or in on-line help.<br />

Perforce Category<br />

The Perforce category includes the following operations:<br />

Operation Description<br />

Get Changes From Perforce<br />

Gets a list of modified, added and removed files from a Perforce’s<br />

depot.<br />

Perforce Custom Command Executes the specified Perforce command.<br />

Perforce Edit Files Opens files kept in Perforce's client workspace for editing.<br />

Perforce Edit Jobs Creates, edits or deletes jobs.<br />

Perforce File Enumerator<br />

Gets information aobut the files kept in Perforce’s depot without<br />

accessing their contents and saves it to a variable.<br />

Perforce Fix Job Links the job to the changelist that fixes it.<br />

Perforce Lock/Unlock Files Locks the opened files against changelist submission or unlocks them.<br />

Perforce Login Logs in to a Perforce server.<br />

Perforce Logout Logs out of a Perforce server.<br />

Perforce Set Label to Files Sets a label to the file revisions kept in Perforce’s depot.<br />

Perforce Submit Files Sends changes made to opened files to the depot.<br />

Perforce Syncronize<br />

Synchronizes file revisions kept in Perforce’s depot and client<br />

workspace.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

For more information on operations of this group see Perforce Category in the Version Control Systems<br />

Operations document or in on-line help.<br />

Prepare Code Category<br />

The Prepare Code category includes the following operations:<br />

Operation Description<br />

ASPack Compresses an executable file or a library with ASPack.<br />

ASProtect Compresses and encrypts an executable file or a library and prevents<br />

unauthorized usage of your application with ASProtect.<br />

Eurekalog 4 Catches exceptions raised by memory leaks and generates a log of the<br />

call stack using EurekaLog 4.<br />

EurekaLog 5 Catches exceptions raised by memory leaks and generates a log of the<br />

call stack using EurekaLog 5.<br />

EurekaLog 6 Catches exceptions raised by memory leaks and generates a log of the<br />

call stack using EurekaLog 6.<br />

Generate Key For ASProtect Generates registration keys for files protected with ASProtect.<br />

madExcept 2 Collects information about exceptions and sends this information to<br />

the specified e-mail address using madExcept 2.<br />

madExcept 3 Collects information about exceptions and sends this information to<br />

the specified e-mail address using madExcept 3.<br />

Protect Files <strong>With</strong> Armadillo Compresses and encrypts an executable file or a library and prevents<br />

unauthorized usage of your application with Armadillo.<br />

Themida Employs Themida to protect your applications against modern<br />

cracking.<br />

UPX Compress Compresses an executable file or a library with UPX.<br />

UPX Decompress Decompresses the specified UPX-compressed executable file or a<br />

library.<br />

UPX Test Checks the integrity of the compressed data in a UPX-compressed file.<br />

WinLicense Employs WinLicense to protect your applications against modern<br />

cracking and to provide advanced license control.<br />

For more information on operations of this group see Prepare Code Category in the Compilers, Help<br />

Compilers and Code Preparation Operations document or in on-line help.<br />

PsTools Category<br />

The PsTools category includes the following operations:<br />

Operation Description<br />

Change Password (PsPasswd) Changes account passwords via the PsPasswd utility.<br />

Control Services (PsService) List and control services via the PsService utility.<br />

Get Computer or User SID (PsGetSid) Returns the security ID (SID) of a computer or a user via<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

227


228<br />

the PsGetSid utility.<br />

Operations Reference<br />

Get Event Log (PsLogList) Dumps event log records by using the PsLogList utility.<br />

Get List of Opened Files (PsFile) Lists files opened remotely via the PsFile utility.<br />

Get Logged on Users (PsLoggedOn)<br />

Get Process Information (PsList)<br />

Lists users who are logged on locally and via resource<br />

sharing, by using the PsLoggedOn utility.<br />

Lists detailed information about processes via the PsList<br />

utility.<br />

Get System Information (PsInfo) Lists information about a system by using the PsInfo utility.<br />

Run Process (PsExec) Executes processes remotely by using the PsExec utility.<br />

Shut Down Computer (PsShutdown)<br />

Suspend/Resume Process (PsSuspend)<br />

Shuts down or optionally reboots a computer by using the<br />

PsShutdown utility.<br />

Suspends and resumes processes by using the PsSuspend<br />

utility.<br />

Terminate Process (PsKill) Kills processes by name or process ID via the PsKill utility.<br />

For more information on operations of this group see PSTools Category in the General-Purpose<br />

Operations document or in on-line help.<br />

PVCS Category<br />

The PVCS category includes the following operations:<br />

Operation Description<br />

Get Changes From PVCS Gets a list of modified and added files from PVCS Version<br />

Manager.<br />

Get File(s) From PVCS Operation Checks out files or gets the latest version of files from PVCS<br />

Version Manager.<br />

Put File(s) to PVCS Checks in files to PVCS Version Manager.<br />

Get Changes From PVCS (PCLI) Gets a list of modified and added files from PVCS Version<br />

Manager via Project Command-Line Interface.<br />

Get File(s) From PVCS (PCLI) Checks out files or gets the latest version of files from PVCS<br />

Version Manager via Project Command-Line Interface.<br />

Put File(s) to PVCS (PCLI) Checks in files to PVCS Version Manager via Project Command-<br />

Line Interface.<br />

For more information on operations of this group see PVCS Category in the Version Control Systems<br />

Operations document or in on-line help.<br />

Rational ClearCase Category<br />

The Rational Clear Case category includes the following operations:<br />

Operation Description<br />

ClearCase Apply Label Assigns a label to files stored in Rational ClearCase repository.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

ClearCase Check In Checks in one or several files to Rational ClearCase repository.<br />

ClearCase Check Out Checks out one or several files stored in Rational ClearCase<br />

repository.<br />

ClearCase Create Label Assigns a new label to one or several files stored in Rational<br />

ClearCase repository.<br />

ClearCase Custom Command Executes a custom command concerning Rational ClearCase.<br />

ClearCase Lock Locks files and objects stored in Rational ClearCase repository.<br />

ClearCase Undo Check Out Undoes the check-out operation performed for one or several<br />

files stored in Rational ClearCase.<br />

ClearCase Unlock Unlocks files and objects stored in the Rational ClearCase<br />

repository.<br />

ClearCase Update View Updates snapshot view.<br />

Get Changes From ClearCase Retrieves changed files from the ClearCase repository.<br />

For more information on operations of this group see Rational ClearCase Category in the Version<br />

Control Systems Operations document or in on-line help.<br />

Read/Write Category<br />

The Read/Write category includes the following operations:<br />

Operation Description<br />

Delete Registry Key or Value Deletes a key or a value entry from the system registry.<br />

File Content Enumerator Parses the file contents into fragments and then performs child<br />

operations for each fragment.<br />

Get INI Value Returns the value of an entry from an INI file.<br />

Get Registry Value Returns the value of an entry from the system registry.<br />

If Registry Key or Value Exists Checks whether a specific key or value exists in the system registry<br />

and performs child operations according to the result of the check.<br />

INI File Enumerator Obtains a collection of sections in an INI file or a collection of<br />

values in a specified INI file section and then performs child<br />

operations for each section or value in the collection.<br />

Read From File Reads entire data from a file to a specified variable.<br />

Set INI Value Sets the value of an entry in an INI file.<br />

Set Registry Value Sets the value of an entry in the system registry.<br />

Write to File Writes the variable value to a specified file.<br />

For more information on operations of this group see Read/Write Category in the General-Purpose<br />

Operations document or in on-line help.<br />

Remote Macro Execution Category<br />

The Remote Macro Execution category includes the following operations:<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

229


230<br />

Operation Description<br />

Download Macro Downloads the macro from a remote computer.<br />

Operations Reference<br />

If Remote Macro State Is ... Checks whether the macro on a remote computer has the specified<br />

state and performs child operations according to the result of the<br />

check.<br />

Remote Execution Stack Executes child operations on several remote computers in parallel.<br />

Remote Group Executes child operations on a remote computer.<br />

Remote Macro Command Initiates, pauses, resumes or stops the macro run on a remote<br />

computer.<br />

Setup Connections Specifies the connections and connection parameters used to access<br />

remote computers.<br />

Upload Macro Uploads the macro to a remote computer.<br />

Note: In order for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> to successfully connect to a remote computer, that computer<br />

should be configured in a special way. The settings are the same as the ones you set when<br />

establishing connections to remote computers for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>’s Client panel. For<br />

detailed information, see the Connection Parameters topic.<br />

For more information on operations of this group see Remote Macro Execution Category in the General-<br />

Purpose Operations document or in on-line help.<br />

Source Code Tools Category<br />

The Source Code Tools category includes operations that let you perform analysis of your source code<br />

files. This category includes the following operations:<br />

Operation Description<br />

CodeHealer Analyzes Delphi source code using CodeHealer by SOCK <strong>Software</strong>.<br />

Pascal Analyzer Verifies Delphi or Pascal source code files by using Peganza Pascal<br />

Analyzer.<br />

Project Analyzer Analyzes Visual Basic source code using Aivosto Project Analyzer.<br />

Run<br />

Macro<br />

Project Analyzer Executes the Aivosto Project Analyzer macro.<br />

For more information on operations of this group see Source Code Tools Category in the Compilers,<br />

Help Compilers and Code Preparation Operations document or in on-line help.<br />

SourceGear Vault Category<br />

The SourceGear Vault category includes the following operations:<br />

Operation Description<br />

Get Changes From Vault Gets a list of modified and added files of a SourceGear Vault repository.<br />

Vault Add Adds files to a SourceGear Vault repository.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Vault Check In<br />

Sends changes made to working copies of files to a SourceGear Vault<br />

repository.<br />

Vault Check Out Checks out working copies of files from a SourceGear Vault repository.<br />

Vault Cloak Cloaks a folder in a SourceGear Vault repository.<br />

Vault Commit<br />

Sends changes made to working copies of files to a SourceGear Vault<br />

repository.<br />

Vault Create Folder Creates a folder in a SourceGear Vault repository.<br />

Vault Custom Command Runs an arbitrary SourceGear Vault command.<br />

Vault Delete Deletes files and folders from a SourceGear Vault repository.<br />

Vault File Enumerator<br />

Returns a collection of files stored in a SourceGear Vault repository and<br />

executes child operations for each file of this collection.<br />

Vault Get File(s) By Label Gets files from a SourceGear Vault repository by label.<br />

Vault Get File(s) By Version Gets files from a SourceGear Vault repository by version.<br />

Vault Get Latest Version Gets the latest version of files from a SourceGear Vault repository.<br />

Vault Label Sets a label to files or folders within a SourceGear Vault repository.<br />

Vault Uncloak Uncloaks a folder in a SourceGear Vault repository.<br />

Vault Undo Check Out Undoes the checkout of files under a SourceGear Vault repository.<br />

For more information on operations of this group see SourceGear Vault Category in the Version Control<br />

Systems Operations document or in on-line help.<br />

SourceOffSite Category<br />

The SourceOffSite category includes the following operations:<br />

Operation Description<br />

SourceOffSite Add Adds files to a SourceOffSite repository.<br />

SourceOffSite Check In Checks in files to a SourceOffSite repository.<br />

SourceOffSite Check Out Checks out files from a SourceOffSite repository.<br />

SourceOffSite Create Project Creates a new project within a SourceOffSite repository.<br />

SourceOffSite Custom Command Executes custom SourceOffSite command.<br />

SourceOffSite Delete Deletes files from SourceOffSite repository.<br />

SourceOffSite Enumerator Obtains a collection of files stored in a SourceOffSite<br />

repository and performs child operations for each file in the<br />

collection.<br />

SourceOffSite Get Latest Version Gets the latest version of a file from a SourceOffSite repository.<br />

SourceOffSite Get Project By Label Gets the project sprecified by label from a SourceOffSite<br />

repository.<br />

SourceOffSite Label Project Creates a label in a SourceOffSite repository.<br />

SourceOffSite Undo Checkout Undoes the checkout of files under a SourceOffSite repository.<br />

The operations require that the client application of SourceOffSite be installed on your computer.<br />

Otherwise, an error will occur.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

231


232<br />

Operations Reference<br />

For more information on operations of this group see SourceOffSite Category in the Version Control<br />

Systems Operations document or in on-line help.<br />

SQL Category<br />

The SQL category includes the following operations:<br />

Operation Description<br />

Back Up Database Backs up the specified Microsoft SQL Server database.<br />

Check Database Checks the integrity of objects in the specified Microsoft SQL Server<br />

database.<br />

Clean Up Database Removes unused space from the specified Microsoft SQL Server<br />

database.<br />

Execute DTSRun Executes the specified DTS package.<br />

Execute SQL Script Runs an SQL script that accesses a Microsoft SQL Server instance.<br />

Execute SQL Statement Executes an SQL query against the specified Microsoft SQL Server<br />

database which is accessed via OLE DB.<br />

Execute Stored Procedure Executes the specified stored procedure from a particular Microsoft SQL<br />

Server database which is accessed via OLE DB.<br />

Rebuild Indexes Rebuilds indexes on tables in the specified Microsoft SQL Server<br />

database.<br />

Restore Database Restores the specified Microsoft SQL Server database from the backup<br />

file.<br />

Run SQL Best Practices<br />

Analyzer<br />

Uses Microsoft SQL Server Best Practices Analyzer to verify whether<br />

common best practices are implemented in the specified Microsoft SQL<br />

Server database.<br />

Update Statistics Updates information about distribution of key values in the specified<br />

Microsoft SQL Server database.<br />

For more information on operations of this group see SQL Category in the General-Purpose Operations<br />

document or in on-line help.<br />

Standard Category<br />

The Standard category includes the following operations:<br />

Operation Description<br />

Break Exits the current loop or enumerator operation. This is an analogue if<br />

the break statement in programming languages such as C++ or the<br />

Exit statement in Visual Basic.<br />

Case Executes the child operation(s) if the Switch expression value<br />

matches the specified value.<br />

Catch Executes the child operations if an error occurs during execution of<br />

child operations of the preceding Try operation. This is an analogue<br />

of the catch statement in such programming languages as C++ and<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Visual Basic, or except in Delphi.<br />

Dependent Group Groups operations that are prerequisites or depend on another<br />

operation group.<br />

Else Executes the child operation(s) if the condition of the If... operation or<br />

all Case operations that precedes the Else operation is not met.<br />

Finalization Executes the child operation(s) right before the macro run is finished.<br />

Finally Executes the child operations regardless of the possible errors that<br />

occurred during execution of child operations of the preceding Try<br />

operation. Generally, it is applied to ensure that the used recourses are<br />

released. This is an analogue of the finally statement in such<br />

programming languages as C++, Visual Basic or Delphi.<br />

For Loop Executes the child operation(s) in a loop. This is an analogue of the<br />

for statement in programming languages such as C++, Visual Basic<br />

or Delphi.<br />

Go to Label Transfers macro execution to the specified Label operation. This is an<br />

analogue of the goto statement in programming languages.<br />

Group Lets you organize several operations into a group. The grouped<br />

operations can be executed one after another as well as<br />

simultaneously.<br />

If Previous Operation Fails Executes the child operation(s) if an error occurred during execution<br />

of the previous operation in the macro.<br />

If Previous Operation<br />

Succeeds<br />

Executes the child operation(s) if execution of the previous operation<br />

in the macro was successful.<br />

If ... Then Checks the condition and performs the child operation(s) if the<br />

condition is True.<br />

Initialization Executes the child operation(s) right after the macro run is started.<br />

Label Marks a particular point in the macro.<br />

List Enumerator Obtains a collection of list items and then performs child operations<br />

for each item in the collection.<br />

Log Message Posts a custom message to the log.<br />

Run Library Submacro Executes a library submacro.<br />

Run Submacro Executes operations of a submacro.<br />

Script Lets you create a custom script in any of the 3 supported scripting<br />

languages.<br />

Set\Reset Variable Value Sets or restores the default value of a variable from a macro.<br />

Stop Macro Execution Stops the macro run without any conditions.<br />

Submacro Organizes a set of operations into a submacro. You can call the same<br />

submacro using the Run Submacro operation from different places in<br />

your macro.<br />

Switch Executes one of the several operations or groups of operations,<br />

depending on the expression value. This is an analogue of the switch<br />

statement in such programming languages as C++ or Delphi, or<br />

Select Case statement if Visual Basic.<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

233


234<br />

Operations Reference<br />

Try Introduces a block of protected operations. Executes the child<br />

operation(s) and, if an error occurs, executes child operations of the<br />

following Catch or Finally operation. This is an analogue of the try<br />

statement in such programming languages as C++, Visual Basic or<br />

Delphi.<br />

While Loop Performs the child operation(s) in a loop. This is an analogue of the<br />

while statement in such programming languages as C++, Visual<br />

Basic or Delphi.<br />

For more information on operations of this group see Standard Category in the General-Purpose<br />

Operations document or in on-line help.<br />

StarTeam Category<br />

The StarTeam category includes the following operations:<br />

Operation Description<br />

Get Changes From StarTeam Gets a list of modified, added and removed items from a StarTeam<br />

repository.<br />

StarTeam Add Adds files to a StarTeam repository.<br />

StarTeam Apply Label Labels particular file revisions in a StarTeam repository with a view<br />

label or a revision label.<br />

StarTeam Check In Sends changes made to working copies of files to a StarTeam<br />

repository.<br />

StarTeam Check Out Checks out working copies of files from a StarTeam repository.<br />

StarTeam Create Label Creates a view label or a revision label in a StarTeam repository.<br />

StarTeam Custom Command Executes a StarTeam command supported by stcmd.exe.<br />

StarTeam Delete Local Deletes files from a working folder mapped to a StarTeam<br />

repository's folder.<br />

StarTeam File Enumerator Obtains a collection of files stored in a StarTeam repository and<br />

performs child operations for each file in the collection.<br />

StarTeam Lock Locks files in a StarTeam repository.<br />

StarTeam Remove Removes files from a StarTeam repository.<br />

StarTeam Unlock Unlocks files in a StarTeam repository.<br />

StarTeam Update Status Updates file statuses in a StarTeam repository.<br />

For more information on operations of this group see StarTeam Category in the Version Control Systems<br />

Operations document or in on-line help.<br />

String Manipulation Category<br />

The String Manipulation category includes the following operations:<br />

Operation Description<br />

Path Manipulation Allows you to perform various actions over path strings:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

String Add Breaks<br />

extract path parts, convert long file names to short ones and<br />

vice versa, convert relative paths to absolute ones and so on.<br />

Inserts line breaks at specified locations in a string.<br />

String Casing Changes the string case to lowercase, uppercase or sentence<br />

case.<br />

String Concatenation Concatenates two strings.<br />

String Encryption Encrypts or decrypts a string.<br />

String Padding Pads a string with the specified character.<br />

String Quoting Encloses a string in single or double quotes or removes<br />

enclosing quotes.<br />

String Replace Replaces the specified substring with another one.<br />

String Reverse Reverses characters or words in a string.<br />

String Substring Extracts a substring from a string.<br />

String Trimming Removes leading and/or trailing spaces from a string.<br />

For more information on operations of this group see String Manipulation Category in the General-<br />

Purpose Operations document or in on-line help.<br />

Subversion Category<br />

The Subversion category includes the following operations:<br />

Operation Description<br />

Get Changes From Subversion Gets a list of modified, added and removed files from a Subversion<br />

repository.<br />

Subversion Add Adds files, directories, or symbolic links to Subversion’s repository.<br />

Subversion Checkout Checks out working copies of files from the repository.<br />

Subversion Cleanup Cleans up working copies by removing locks that resume unfinished<br />

operations.<br />

Subversion Commit Sends changes made to working copies of files to the repository.<br />

Subversion Copy Copies files between a working copy and the repository.<br />

Subversion Custom Command Executes a Subversion command.<br />

Subversion Export Exports a clean directory tree.<br />

Subversion File Enumerator Gets information about files kept in Subversion’s depot without<br />

accessing their contents and saves this information to a variable.<br />

Subversion Import Commits a copy of PATH to URL recursively.<br />

Subversion Info Iterates through files and folders in a working copy and saves<br />

information about each item to a variable.<br />

Subversion MkDir Creates a new directory under Subversion.<br />

Subversion Revert Undoes all changes made to local copies of files kept in the<br />

repository.<br />

Subversion Status Gets the status of working copies of files and directories and posts it<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

235


236<br />

to the log or saves it to a variable or to a file.<br />

Subversion Update Updates working copies of files.<br />

Subversion Version Gets the version of a working copy.<br />

Operations Reference<br />

For more information on operations of this group see Subversion Category in the Version Control System<br />

Operations document or in on-line help.<br />

Surround SCM Category<br />

The Surround SCM category includes the following operations:<br />

Operation Description<br />

Get Changes From Surround SCM Gets a list of modified, added and removed files from a<br />

Surround SCM repository.<br />

Surround SCM Add Adds files to a Surround SCM repository.<br />

Surround SCM Check In Sends changes made to working copies of files to a Surround<br />

SCM repository.<br />

Surround SCM Check Out Checks out working copies of files from a Surround SCM<br />

repository.<br />

Surround SCM Commit Changelist Sends changes made to working copies of files within the<br />

specified changelist to a Surround SCM repository.<br />

Surround SCM Create Branch Creates a new branch in a Surround SCM repository.<br />

Surround SCM Create Repository Creates a new folder in a Surround SCM repository.<br />

Surround SCM Custom Command Runs an arbitrary Surround SCM command.<br />

Surround SCM Delete Deletes files and folders from a Surround SCM repository.<br />

Surround SCM File Enumerator Returns a collection of files stored in a Surround SCM<br />

repository and executes child operations for each file of this<br />

collection.<br />

Surround SCM Freeze Branch Prevents users from making changes to files stored in the<br />

specified branch.<br />

Surround SCM Get Gets files from a Surround SCM repository.<br />

Surround SCM Label Sets a label to files or folders within a Surround SCM<br />

repository.<br />

Surround SCM Undo Check Out Undoes the checkout of files within a Surround SCM<br />

repository.<br />

Surround SCM Unfreeze Branch Unfreezes the previously frozen branch.<br />

For more information on operations of this group see Surround SCM Category in the Version Control<br />

Systems Operations document or in on-line help.<br />

Team Coherence Category<br />

The Team Coherence category includes the following operations:<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Operation Description<br />

Get Changes From Team Coherence Gets a list of modified and added files of a Team Coherence<br />

repository.<br />

Run Team Coherence Command Runs a Team Coherence command.<br />

Team Coherence Add File(s) Adds files to a Team Coherence repository.<br />

Team Coherence Assign Label Assigns a version label to a specific revision of files under a<br />

Team Coherence repository.<br />

Team Coherence Check In File(s) Checks in files from your working folder to a Team Coherence<br />

repository.<br />

Team Coherence Check Out File(s) Checks out files from a Team Coherence repository to your<br />

working folder.<br />

Team Coherence File Enumerator Obtains a collection of files stored in a Team Source repository<br />

and then performs child operations for each file in the<br />

collection.<br />

Team Coherence Get File(s) Obtains a specific revision of files stored in a Team Coherence<br />

repository.<br />

Team Coherence Promote File(s) Promotes files stored in a Team Coherence repository to the<br />

next promotion level defined in that repository.<br />

Team Coherence Remove File(s) Removes files from a Team Coherence repository.<br />

Team Coherence Remove Project or<br />

Folder<br />

Removes a project or a folder from a Team Coherence<br />

repository.<br />

Team Coherence Undo Check Out Undoes the checkout of files under a Team Coherence<br />

repository.<br />

For more information on operations of this group see Team Coherence Category in the Version Control<br />

Systems Operations document or in on-line help.<br />

Team Foundation Version Control Category<br />

The Team Foundation Version Control category includes the following operations:<br />

Operation Description<br />

Add File(s) And Folder(s) to TFVC<br />

Adds files and folders to the Team Foundation Version Control<br />

repository.<br />

Copies an item from one location to another in the Team<br />

Branch in TFVC<br />

Foundation Version Control repository and in the local<br />

workspace.<br />

Check in File(s) to TFVC<br />

Checks in files to the Team Foundation Version Control<br />

repository.<br />

Check Out File(s) From TFVC<br />

Checks out files from the Team Foundation Version Control<br />

repository.<br />

Delete File(s) And Folder(s) From Removes files and folders from the Team Foundation Version<br />

TFVC<br />

Control repository.<br />

Delete Label From TFVC Deletes labels from files kept in the Team Foundation Version<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

237


238<br />

Get Changes From TFVC<br />

Control repository.<br />

Operations Reference<br />

Gets a list of modified, added and deleted items from the Team<br />

Foundation Version Control repository.<br />

Get File(s) From TFVC<br />

Gets the specified files from the Team Foundation Version<br />

Control repository.<br />

Creates, modifies, or displays information about mappings<br />

TFVC Working Folder<br />

between workspace folders and corresponding Team<br />

Lock in TFVC<br />

Foundation Version Control repository folders.<br />

Locks or unlocks files or folders in the Team Foundation<br />

Version Control repository.<br />

Merge in TFVC<br />

Applies changes from one branch of the Team Foundation<br />

Version Control repository into another.<br />

Rename or Move in TFVC<br />

Renames or moves files stored in the Team Foundation Version<br />

Control repository.<br />

Set Label to TFVC File(s)<br />

Specifies labels for files stored in the Team Foundation<br />

Version Control repository.<br />

Undelete in TFVC<br />

Restores items that were previously deleted from the Team<br />

Foundation Version Control repository.<br />

Undo the Pending Changes in TFVC<br />

Deletes pending changes from the workspace of the Team<br />

Foundation Version Control repository.<br />

Unlabel in TFVC<br />

Removes a label from an item in the Team Foundation Version<br />

Control repository.<br />

For more information on operations of this group see Team Foundation Version Control Category in the<br />

Version Control Systems Operations document or in on-line help.<br />

Unit Tests Category<br />

The Unit Tests category includes the following operations:<br />

Operation Description<br />

Run JUnit Test Runs a unit test of your .NET code using JUnit.<br />

Run MSTest Runs a unit test of your .NET code using MSTest.<br />

Run NUnit Test Runs a unit test of your .NET code using NUnit.<br />

For more information on operations of this group see Unit Tests Category in the Testing, Profiling and<br />

Issue-Tracking Operations document or in on-line help.<br />

VMware Server Category<br />

The VMware Server category includes the following operations:<br />

Operation Description<br />

Capture/Release Virtual Machine’s Captures a CD, DVD or floppy drive making it available to a<br />

Device (VMware Server)<br />

virtual machine, or releases a drive that has been captured<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

previously.<br />

Get Shared Variable Values (VMware Obtains the values of one or more shared variables from the<br />

Server)<br />

guest operating system running on virtual machine.<br />

If OS Is Loaded (VMware Server) Executes the child operation(s) if the operating system was<br />

loaded successfully on the virtual machine.<br />

If Virtual Machine Is ... (VMware<br />

Server)<br />

If Virtual Machine’s Device Is ... (VM<br />

ware Server)<br />

Pause/Resume Virtual Machine<br />

(VMware Server)<br />

Reboot/Reset Virtual Machine<br />

(VMware Server)<br />

Register/Unregister Virtual Machine<br />

(VMware Server)<br />

Run Virtual Machine (VMware<br />

Server)<br />

Set Shared Variable Values (VMware<br />

Server)<br />

Shut Down/Turn Off Virtual Machine<br />

(VMware Server)<br />

Virtual Machine Enumerator<br />

(VMware Server)<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

239<br />

Executes the child operation(s) if a virtual machine is in a<br />

particular state.<br />

Executes the child operation(s) if a virtual machine’s CD,<br />

DVD or floppy drive is in a particular state.<br />

Pauses or resumes a virtual machine.<br />

Resets a virtual machine or reboots the operating system on<br />

the virtual machine.<br />

Registers or unregisters a virtual machine on VMware server.<br />

Runs a virtual machine on VMware server.<br />

Assigns the values to existing shared variables or creates new<br />

shared variables.<br />

Turns off a virtual machine or to shuts down the operating<br />

system on the virtual machine.<br />

Obtains a list of virtual machines installed on current<br />

VMware server and executes child operations for each<br />

machine in the list.<br />

For more information on operations of this group see VMware Server Category in the General-Purpose<br />

Operations document or in on-line help.<br />

VMware Workstation Category<br />

The VMware Workstation category includes the following operations:<br />

Operation Description<br />

Capture/Release Virtual Machine’s Device Captures a CD, DVD or floppy drive making it<br />

(VMware Workstation)<br />

available to a virtual machine, or releases a drive<br />

that has been captured previously.<br />

Create Virtual Machine Snapshot (VMware Creates a snapshot storing the current state of a<br />

Workstation)<br />

virtual machine.<br />

Delete Virtual Machine Snapshot (VMware<br />

Workstation)<br />

Deletes a snapshot specified by name.<br />

Execute Guest OS Command (VMware Executes the chosen command on a guest<br />

Workstation)<br />

operating system.


240<br />

Operations Reference<br />

If OS Is Loaded (VMware Workstation) Executes the child operation(s) if the operating<br />

system was loaded successfully on the virtual<br />

machine.<br />

If Virtual Machine Is ... (VMware Workstation) Executes the child operation(s) if a virtual<br />

machine is in a particular state.<br />

If Virtual Machine’s Device Is ... (VMware Work<br />

station)<br />

Pause/Resume<br />

Workstation)<br />

Virtual Machine (VMware<br />

Powered On Virtual Machine Enumerator<br />

(VMware Workstation)<br />

Reboot/Reset Virtual Machine (VMware<br />

Workstation)<br />

Revert To Virtual Machine Snapshot (VMware<br />

Workstation)<br />

Executes the child operation(s) if a virtual<br />

machine’s CD, DVD or floppy drive is in a<br />

particular state.<br />

Pauses or resumes a single virtual machine or a<br />

group of virtual machines.<br />

Obtains a list of VMware virtual machines that are<br />

currently powered on and executes child<br />

operations for each machine in the list.<br />

Resets a single virtual machine or a group of<br />

virtual machines or reboots the guest operating<br />

system on the virtual machine(s).<br />

Restores the virtual machine to the state of a<br />

specified snapshot.<br />

Run Virtual Machine (VMware Workstation) Runs a single virtual machine or a group of virtual<br />

machines on VMware Workstation.<br />

Shut Down/Turn Off Virtual Machine (VMware<br />

Workstation)<br />

Virtual Machine Snapshot Enumerator<br />

(VMware Workstation)<br />

Turns off a single virtual machine or a group of<br />

virtual machines or shuts down the operating<br />

system on the virtual machine(s).<br />

Obtains a list virtual machine snapshots and<br />

executes child operations for each snapshot in the<br />

list.<br />

For more information on operations of this group see VMware Workstation Category in the General-<br />

Purpose Operations document or in on-line help.<br />

Wait Category<br />

The Wait category includes the following operations:<br />

Operation Description<br />

Wait for Date and Time Delays the macro execution for the specified time period, or<br />

until the specified date and time occur.<br />

Wait for File Delays the macro execution until the file attributes are<br />

checked, file exists or does not exist, file contents are<br />

changed or meets the condition, or until the specified time<br />

period elapses.<br />

Wait for INI File Delays the macro execution until the specified section, key or<br />

key value exists or does not exist, the specified key value is<br />

changed or meets the condition, or until the specified time<br />

period elapses.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Operations Reference<br />

Wait for Process Delays the macro execution until the desired process is<br />

created, or until the specified time period elapses.<br />

Wait for Registry Delays the macro execution until the predefined key or key<br />

value exists or does not exist, the specified key value is<br />

changed or meets the condition, or until the specified time<br />

period elapses.<br />

Wait for Remote Computer Delays the macro execution until the specified remote<br />

computer responds, or until the specified time period elapses.<br />

Wait for Variable Delays the macro execution until a macro variable is assigned<br />

the specified value, or until the specified time period elapses.<br />

Wait for Window Delays the macro execution until the desired window is<br />

created, or until the specified time period elapses.<br />

Wait for XML File Delays the macro execution until the specified node, attribute<br />

or its value exists or does not exist, the specified node or<br />

attribute value is changed or meets the condition, or until the<br />

specified time period elapses.<br />

For more information on operations of this group see Wait Category in the General-Purpose Operations<br />

document or in on-line help.<br />

WMI Category<br />

The WMI category offers operations that let you use functionality of Windows Management<br />

Instrumentation in your macros. Windows Management Instrumentation is a component of Windows<br />

operating systems that is aimed at collecting computer management information in the enterprise<br />

environment and performing various administrative tasks. The WMI operations operations that let you<br />

automate these tasks with ease. The category includes the following operations:<br />

Operation Description<br />

COM Class Enumerator (WMI) Obtains the collection of COM classes registered on a<br />

computer and performs child operations for each element of<br />

this collection.<br />

Control NT Service (WMI) Starts, stops or pauses the service run.<br />

Get COM Class Extended Info (WMI) Obtains extended information about a COM class registered<br />

on a computer.<br />

If COM Class Is Registered (WMI) Checks whether a COM class is registered on a computer and<br />

performs child operations according to the result of the<br />

check.<br />

If Process Is Running (WMI) Checks whether a process is running and performs child<br />

operations according to the result of the check.<br />

If Service Is Running/Stopped/Paused<br />

(WMI)<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

241<br />

Checks whether a service is running (stopped or paused) and<br />

performs child operations according to the result of the<br />

check.<br />

Install Application (WMI) Installs or advertises an application on the local or remote<br />

computer.


242<br />

Operations Reference<br />

NT Service Enumerator (WMI) Obtains the collection of services registered on a computer<br />

and performs child operations for each element of this<br />

collection.<br />

Process Enumerator (WMI) Obtains the collection of processes running on a computer<br />

and performs child operations for each element of this<br />

collection.<br />

Remote Shutdown/Power Off/Reboot Shuts down, powers off or reboots a remote computer.<br />

(WMI)<br />

Run Process (WMI) Launches an application.<br />

Terminate Process (WMI) Terminates a running process.<br />

Uninstall/Reinstall Application (WMI) Uninstalls or reinstalls an application on the local or remote<br />

computer.<br />

Upgrade Application (WMI) Upgrades an application installed on the local or remote<br />

computer.<br />

For more information on operations of this group see WMI Category in the General-Purpose Operations<br />

document or in on-line help.<br />

XML Category<br />

The XML category includes the following operations:<br />

Operation Description<br />

Create XML File Creates a new XML file.<br />

Create XML Node Creates a new node in an XML file.<br />

Delete XML Node/Attribute Deletes a specific node or node attribute from an XML file.<br />

Get XML Value Obtains a value from an XML file.<br />

If XML Node/Attribute Exists Checks whether a specific node or attribute exists in an XML<br />

file and performs child operations according to the result of<br />

the check.<br />

Merge XML Files Merges two XML files.<br />

Set XML Value Sets a value stored in an XML file.<br />

Transform XML File Applies an XSL transformation to an XML file.<br />

Validate XML File Validates an XML file against DTDs and schemas.<br />

XML Attribute Enumerator Obtains a collection of nodes in an XML file and then<br />

performs child operations for each node in the collection.<br />

XML Node Enumerator Obtains a collection of XML node attributes and then<br />

performs child operations for each attribute in the collection.<br />

For more information on operations of this group see XML Category in the General-Purpose Operations<br />

document or in on-line help.<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Index<br />

Index<br />

.bbp files .............................................................47<br />

.bxp files .............................................................47<br />

.msbuild files ......................................................47<br />

.NET Tools Category........................................207<br />

.proj files.............................................................47<br />

.target files ..........................................................47<br />

.tasks files ...........................................................47<br />

.vmp files ............................................................47<br />

A<br />

absControl – About...........................................142<br />

ABSOPENEDPROJECTDIR.............................96<br />

Adding operations to macros..............................40<br />

Adjusting operations in macros ..........................40<br />

Analyzing results of macro runs.........................57<br />

Append From File – menu and toolbar item.......47<br />

AQCommunity ...................................................21<br />

Archivers Category...........................................208<br />

Authenticode Category.....................................208<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> .......................................7<br />

Basic concepts ................................................26<br />

Command-line arguments.............................189<br />

Community site ..............................................21<br />

Exit codes .....................................................191<br />

FAQ ................................................................21<br />

<strong>Getting</strong> support ...............................................21<br />

Macro libraries..............................................104<br />

Newsgroups ....................................................21<br />

Overview ..........................................................7<br />

Samples...........................................................22<br />

Using <strong>With</strong> Windows Firewall .......................23<br />

What’s new.....................................................16<br />

Working via COM........................................195<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server.....119, 133<br />

API................................................................142<br />

<strong>Build</strong> notifications ........................................135<br />

Connection parameters .................................127<br />

Gadget for Windows Vista Sidebar ..............139<br />

Overview ......................................................119<br />

User permissions ..........................................125<br />

Using the Client/Server functionality ...........119<br />

Web Interface ...............................................133<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Gadget – About.........139<br />

<strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>System requirements....10<br />

<strong>Automated</strong> Macro Player....................67, 189, 191<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

243<br />

About ..............................................................67<br />

Command-line arguments.............................189<br />

Exit codes .....................................................191<br />

Using <strong>With</strong> Windows Firewall .......................23<br />

<strong>Automated</strong>QA Tools Category.........................209<br />

B<br />

Basic concepts ....................................................26<br />

Batch Run – menu and toolbar item ...................55<br />

bbp files ..............................................................47<br />

Begin a progress group – property......................43<br />

Borland Compilers Category ............................210<br />

Breakpoints.......................................................173<br />

About ............................................................173<br />

Conditional breakpoints................................174<br />

Breakpoints panel .............................................176<br />

<strong>Build</strong> requests ...................................................154<br />

About ............................................................155<br />

About request-based build triggers...............160<br />

Configuring build triggers ............................155<br />

Managing build nodes...................................162<br />

Preparing macros for request processing......155<br />

Submitting, editing and deleting requests.....157<br />

Viewing reports ............................................164<br />

<strong>Build</strong> strategies ...................................................70<br />

<strong>Build</strong> Tools Category........................................211<br />

Burn CD/DVD Category ..................................211<br />

bxp files ..............................................................47<br />

C<br />

Changing operation properties............................43<br />

Charts................................................................165<br />

About ............................................................165<br />

Chart types....................................................168<br />

Charts panel ..................................................165<br />

Moving data from one computer to another .169<br />

Viewing data stored on another computer ....169<br />

CheckTimeOutMode property..........................183<br />

Child operations..................................................26<br />

Client/Server............. See <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Client/Server<br />

COM – Working with <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

via .................................................................195<br />

Command-line arguments.................................189<br />

Communication Category.................................212


244<br />

Community site ..................................................21<br />

Concurrent execution of operations....................91<br />

Concurrent Versions System Category.............212<br />

Conditional breakpoints....................................174<br />

Configurations ....................................................47<br />

Connection parameters .....................................127<br />

Constants ......................................................94, 96<br />

About ..............................................................96<br />

Basic concepts ................................................26<br />

Creating ..........................................................97<br />

Using in macros..............................................94<br />

Using in operation properties .........................99<br />

Using in scripts .............................................101<br />

Continuous integration support ..........................70<br />

Creating a new macro.........................................37<br />

D<br />

Debugging macros............................................170<br />

About ............................................................170<br />

Breakpoints panel .........................................176<br />

Conditional breakpoints................................174<br />

Running macros partially..............................172<br />

Running to the cursor ...................................173<br />

Stepping through the macro..........................172<br />

Using breakpoints.........................................173<br />

Watches panel...............................................175<br />

DelphiScript......................................................179<br />

Dependencies between macro operations...........85<br />

Dependent groups...............................................86<br />

About ..............................................................86<br />

Example..........................................................87<br />

Description – property........................................43<br />

Different Configuration Settings – column ........47<br />

Distributed builds ...............................................77<br />

About ..............................................................77<br />

Creating macros for ........................................79<br />

Scenarios.........................................................78<br />

E<br />

Enable build request – option (Client/Server) ..155<br />

Enabled – property .............................................43<br />

Enabled in Configurations – column ..................47<br />

Environment attribute.........................................94<br />

Environment variables......................See Variables<br />

Errors ..........................................................60, 181<br />

Handling errors in macros ..............................60<br />

Handling exceptions in scripts......................181<br />

Exceptions – Handling exceptions in scripts....181<br />

Execute Category..............................................213<br />

Execute method ................................................183<br />

Exit codes .........................................................191<br />

Export – menu item ............................................57<br />

Index<br />

Exporting macro run results................................59<br />

F<br />

FAQ ....................................................................21<br />

Files and Directories Category .........................213<br />

Firewall – Using <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> and<br />

Windows Firewall...........................................23<br />

Frequently asked questions.................................21<br />

Frequently Used Category ................................214<br />

FTP Category....................................................214<br />

G<br />

Gadget...............................................................139<br />

<strong>Getting</strong> support ...................................................21<br />

Global variables................................See Variables<br />

Go to Message – menu and toolbar items...........57<br />

H<br />

Handling .....................................................60, 181<br />

Errors in macros..............................................60<br />

Exceptions in scripts.....................................181<br />

Help Compilers Category .................................215<br />

HTTP Category.................................................216<br />

I<br />

Incrementing the <strong>Build</strong> Version Number ...........65<br />

Inserting one macro into another ........................47<br />

Installers Category............................................216<br />

Integration <strong>With</strong> Visual <strong>Studio</strong>.................111, 114<br />

About ............................................................111<br />

Key features..................................................111<br />

Running ABS macros from Team Explorer .114<br />

Interactive Category .........................................217<br />

Internet Information Services (IIS) Category ...217<br />

Issue Tracking Category...................................218<br />

J<br />

JediVCS Category ............................................219<br />

JScript ...............................................................179<br />

L<br />

Libraries............................................................104<br />

About macro libraries ...................................104<br />

Tutorial .........................................................105<br />

Library submacros ............................................104<br />

Loading macros ..................................................47<br />

Local variables..................................See Variables<br />

Log panel ......................................................26, 57<br />

About ..............................................................26<br />

Working with..................................................57<br />

Log to summary – property ................................43<br />

Logging Category .............................................220<br />

Logging macro runs............................................56<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Index<br />

M<br />

Macro configurations..........................................47<br />

Macro File node (Integration with Team Explorer)<br />

......................................................................114<br />

Macro libraries..................................................104<br />

Macro panel ........................................................26<br />

Macro presets....................................................121<br />

Macro run results – Exporting............................59<br />

Macro runs..............................................55, 57, 67<br />

Analyzing results of macro runs.....................57<br />

How to run a macro ........................................55<br />

Pausing macro runs.........................................55<br />

Scheduling macro runs ...................................67<br />

Stopping macro runs.......................................55<br />

Triggered by changes in files under source<br />

control.........................................................70<br />

Macro Runs node (Integration with Team<br />

Explorer).......................................................114<br />

Macros ..........................................................37, 47<br />

About ..............................................................26<br />

Calling operations from scripts.....................183<br />

Changing operation properties........................43<br />

Changing operation properties from scripts .183<br />

Creating a new macro.....................................37<br />

Debugging ....................................................170<br />

Dependencies between operations..................85<br />

Handling errors in macros ..............................60<br />

Incrementing the build version number..........65<br />

Inserting one macro into another ....................47<br />

Libraries........................................................104<br />

Loading of ......................................................47<br />

Logging macro runs........................................56<br />

Saving of.........................................................47<br />

Sending notifications from macros.................58<br />

Using variables and constants.........................94<br />

Working with operations and operation<br />

properties in scripts...................................183<br />

Message – column ..............................................26<br />

Microsoft Compilers Category .........................220<br />

Microsoft Compilers for Smart Device Category<br />

......................................................................221<br />

Microsoft Source Server Category ...................221<br />

Microsoft Virtual PC Category.........................222<br />

Microsoft Virtual Server Category ...................222<br />

Microsoft Visual SourceSafe Category ............223<br />

Misc Category ..................................................224<br />

Modifying operation properties ..........................43<br />

Moving charts data from one computer to another<br />

......................................................................169<br />

msbuild files .......................................................47<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

245<br />

MS<strong>Build</strong> projects – Running ABS macros from<br />

......................................................................113<br />

MS<strong>Build</strong>ABSTask.dll assembly – About .........113<br />

Multi-threaded execution of operations..............91<br />

MySQL Category .............................................224<br />

N<br />

Newsgroups about <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> ......21<br />

Next <strong>Build</strong> – Item in Web Interface .................162<br />

Notifications ...............................................58, 135<br />

Automatic build notifications .......................135<br />

Sending from macros......................................58<br />

O<br />

Object Model ....................................................180<br />

Operation order in macros – Changing of ..........40<br />

Operation properties ...................................43, 183<br />

About ..............................................................43<br />

Changing from scripts...................................183<br />

Operations<br />

About ..............................................................26<br />

Adding operation to macros............................40<br />

Calling operations from scripts.....................183<br />

Changing operation properties in scripts ......183<br />

Changing the operations order in macros .......40<br />

Dependencies between operations..................85<br />

Removing from macros ..................................40<br />

Working with operations in scripts...............183<br />

Operations panel .................................................26<br />

Oracle Category................................................225<br />

Order of operations in macros – Changing of ....40<br />

Other Compilers Category................................225<br />

P<br />

Parallel builds .....................................................77<br />

Parallel execution of operations..........................91<br />

Patch Management Category............................226<br />

Pause – menu and toolbar item...........................55<br />

Perforce Category .............................................226<br />

Prepare Code Category.....................................227<br />

proj files..............................................................47<br />

PSTools Category .............................................227<br />

PVCS Category.................................................228<br />

R<br />

Rational ClearCase Category............................228<br />

Read/Write Category ........................................229<br />

Remote Macro Execution Category..................229<br />

Removing operations from macros.....................40<br />

Requests section (Web Interface) .....................161<br />

Results of macro runs ...................................57, 59<br />

Analyzing........................................................57<br />

Exporting ........................................................59


246<br />

Run – menu and toolbar item .............................55<br />

Run From Selected Operation – menu and toolbar<br />

item.................................................................55<br />

Run Selected Operation – menu and toolbar item<br />

........................................................................55<br />

Run Selected Operation with Children – menu and<br />

toolbar item.....................................................55<br />

Run submacro if operation fails – property ........43<br />

Running <strong>Build</strong> – Item in Web Interface ...........162<br />

Running macros......................................55, 67, 70<br />

Analyzing results of macro runs.....................57<br />

From MS<strong>Build</strong> projects ................................113<br />

From Visual <strong>Studio</strong> Team Explorer..............114<br />

How to run macros .........................................55<br />

Running at certain point in time .....................67<br />

Running when files under source control get<br />

changed.......................................................70<br />

Scheduling macro runs ...................................67<br />

Running macros partially..................................172<br />

Running to the cursor .......................................173<br />

S<br />

Samples...............................................................22<br />

Saving macros ....................................................47<br />

Scheduling macro runs .......................................67<br />

Scripts in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>...........179, 181<br />

Basics............................................................179<br />

Calling operations from scripts.....................183<br />

Changing operation properties from scripts .183<br />

Handling exceptions in scripts......................181<br />

Object model ................................................180<br />

Using variables and constants in scripts .......101<br />

Working with operation properties in scripts183<br />

Select Message – menu and toolbar item ...........57<br />

Sending notifications ..................................58, 135<br />

Automatically ...............................................135<br />

From macros...................................................58<br />

Server..See <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Client/Server<br />

Show History – toolbar item...............................57<br />

Sounds for <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> Events.....202<br />

Source Code Tools Category............................230<br />

SourceGear Vault Category..............................230<br />

SourceOffSite Category....................................231<br />

SourceSafe Category ........................................223<br />

SQL Category...................................................232<br />

Standard Category ............................................232<br />

StarTeam Category...........................................234<br />

Stepping through macros..................................172<br />

Stop – menu and toolbar item.............................55<br />

Stop execution if operation fails – property .......43<br />

Stored variables ................................See Variables<br />

Index<br />

String Manipulation Category ..........................234<br />

Subversion Category.........................................235<br />

Support – Contacting <strong>Automated</strong>QA support team<br />

........................................................................21<br />

Supported tools...................................................11<br />

Surround SCM Category ..................................236<br />

System constants.............................. See Constants<br />

System requirements...........................................10<br />

System variables...............................See Variables<br />

T<br />

target files ...........................................................47<br />

tasks files ............................................................47<br />

Team Coherence Category ...............................236<br />

Team Explorer – Running ABS macros from ..114<br />

Team Foundation Version Control Category....237<br />

Technical support ...............................................21<br />

Thread-relative attribute .....................................94<br />

Time with Children – column.............................26<br />

Timeout – property .............................................43<br />

Tracing Task Triggers ........................................74<br />

Triggers.............................................................160<br />

About request-based build triggers...............160<br />

<strong>Build</strong> requests' processing ............................160<br />

U<br />

Unique name – property .....................................43<br />

Unit Tests Category ..........................................238<br />

User interface – Overview..................................31<br />

User permissions – <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong><br />

Client/Server.................................................125<br />

Using breakpoints.............................................173<br />

Using macro configurations................................47<br />

Using the Client/Server functionality ...............119<br />

V<br />

Variables.............................................................94<br />

About ..............................................................94<br />

Basic concepts ................................................26<br />

Command line initialization .........................102<br />

Creating ..........................................................97<br />

Using in macros..............................................94<br />

Using in operation properties..........................99<br />

Using in scripts .............................................101<br />

VBScript ...........................................................179<br />

Version Number – Incrementing ........................65<br />

Viewing charts data stored on another computer<br />

......................................................................169<br />

Viewing results of macro runs............................57<br />

Visual SourceSafe Category.............................223<br />

Visual <strong>Studio</strong> ............................................111, 114<br />

About integration with..................................111<br />

www.automatedqa.com <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> by <strong>Automated</strong>QA Corporation


Index<br />

Running ABS macros from Team Explorer .114<br />

vmp files .............................................................47<br />

VMWare Server Category................................238<br />

VMWare Workstation Category.......................239<br />

W<br />

Wait Category...................................................240<br />

Watches panel...................................................175<br />

Web Interface – About .....................................133<br />

What’s new.........................................................16<br />

Windows Firewall – Using <strong>Automated</strong> <strong>Build</strong><br />

<strong>Studio</strong> and Windows Firewall ........................23<br />

WMI Category..................................................241<br />

Copyright © 2002-2008 <strong>Automated</strong>QA Corp. support@automatedqa.com<br />

247<br />

Working <strong>With</strong> <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong> via COM<br />

......................................................................195<br />

Working <strong>With</strong> Source Control Systems ...........193<br />

Writing Scripts in <strong>Automated</strong> <strong>Build</strong> <strong>Studio</strong>......179<br />

Basics............................................................179<br />

Calling operations from scripts.....................183<br />

Changing operation properties from scripts..183<br />

Handling exceptions in scripts......................181<br />

Object model.................................................180<br />

Using variables and constants in scripts .......101<br />

X<br />

XML Category..................................................242

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!