QA Wizard Pro User Guide v2016.2.1

Embed Size (px)

Citation preview

  • QA Wizard ProUser GuideVersion 2017.1

  • Copyrights 1996-2017 Perforce Software, Inc. and its subsidiaries. All rights reserved.Defect Scribe, HelixALM, HelixALMSuite, Helix IssueManagement, HelixRequirementsManagement, Helix Test CaseManagement,QAWizard Pro, Resource Thief, SoloBug, SoloSubmit, Surround SCM, and TestTrackare trademarksor registered trademarksofPerforce Software, Inc. and its subsidiaries in the United Statesand other countries.

    Acrobat Reader is a registered trademarkof Adobe, Inc. in the United Statesand other countries.

    UNIX is a registered trademark in the United Statesand other countries, licensed exclusively through X/Open CompanyLimited.

    Apple, Mac, MacOS,macOS,Macintosh, Objective-C, and Safari are registered trademarksof Apple Computer, Inc.

    Chrome is a registered trademarkof Google Inc.

    Debian is a registered trademarkof Software in the Public Interest, Inc.

    Firefox is a registered trademarkof theMozilla Foundation.

    Linux is a trademarkof LinusTorvalds.

    Microsoft, Windows,WindowsServer,WindowsVista, MSWindows, Active Directory, Internet Explorer, Outlook, SQL Server, VisualSourceSafe, and VisualStudio are either registered trademarksor trademarksof Microsoft Corporation in the United Statesand/orother countries.

    openSUSEand SUSEare registered trademarksof Novell Inc. in the United Statesand other countries.

    Oracle and Java are registered trademarksof Oracle and/or its affiliates.

    Red Hat, Red Hat Enterprise Linux, and Fedora are registered trademarksof Red Hat, Inc. in the United Statesand other countries.

    Ubuntu is a registered trademarkof Canonical Ltd.

    All other product namesmentioned herein are the trademarksof their respective owners. All other trademarksare the property of theirrespective owners.

    No part of this publicationmaybe reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language inany form byanymeanswithout the written permission of Perforce Software, Inc. and its subsidiaries.

    Your license agreement with Perforce Software, Inc. or anyof its subsidiaries, which is included with the product, specifies the permittedand prohibited usesof the product. Anyunauthorized duplication or use of this software, in whole or in part, in print, or in anyotherstorage and retrieval system is forbidden.

    Information in this document is subject to change without notice and doesnot represent a commitment on the part of Perforce Software,Inc. or anyof its subsidiaries. Unlessotherwise noted, all companies, products, street addresses, and persons contained herein arepurely fictitious. Mention of third-party companiesand products is for informational purposesonly and doesnot constitute anendorsement.

    Perforce Software, Inc. and its subsidiaries400 N 1st AvenueSuite 200Minneapolis, Minnesota 55401USA+1 510.864.7400

    [email protected]

    mailto:[email protected]

  • Contents

    What's New 1Installing QA Wizard Pro 3

    Before you install 3

    Running the installer 4

    After installation 6

    Getting Started with QA Wizard Pro 7Key QAWizard Pro concepts 8

    Understanding the testing process 9

    Starting QAWizard Pro 11

    Managing licenses 11

    QAWizard Pro interface 11

    Application Repository pane 13

    Call Stack pane 14

    Errors pane 15

    Find Results pane 15

    Output pane 15

    Pending Changes pane 16

    Preview pane 16

    References pane 17

    Reports pane 17

    Script pane 18

    Statements pane 19

    Helix ALM panes 20

    Variables pane 20

    Workspace pane 21

    Sample scripts and applications 22

    Creating workspaces 23

    Adding existing files to workspaces 23

    Using folders 24

    Modifying workspace properties 25

    Opening workspaces 26

    Using Keyword View 27

    Using Text View 28

    Declaring variables in Text View 29

    Declaring arrays in Text View 31

    i

  • Creating functions and subroutines in Text View 32

    Setting Text View font and color options 34

    Customizing QA Wizard Pro 35Customizing the interface 35

    Customizing toolbars 36

    Creating toolbars 37

    Adding toolbar andmenu commands 37

    Modifying toolbar andmenu commands 38

    Setting toolbar andmenu options 38

    Customizing keyboard shortcuts 39

    Setting general options 40

    Setting server connection options 43

    Setting email notification options 44

    Managing Applications 47Adding applications 47

    Copying applications 49

    Exporting applications 49

    Importing applications 50

    Promoting applications 50

    Modifying application properties 51

    Adding versions 51

    Modifying version properties 53

    Deleting versions 54

    Deleting applications 54

    Managing Application Repositories 57About application repositories 57

    Setting up repositories 59

    Maintaining repositories 60

    Populating repositories 60

    Overriding global application startup information 62

    Connecting to the global repository 63

    Recording Scripts 65Recording new scripts 65

    Selecting the default web browser 68

    Recording additional script steps 69

    ii

  • Recording low-level actions 70

    Adding new scripts 71

    Understanding recorded scripts 71

    Running Scripts to Perform Tests 73Running scripts 73

    Setting and running amain script 74

    Entering login information when running scripts 74

    Viewing results reports 75

    Exporting results reports 76

    Setting playback options 76

    Setting reporting options 78

    Runningmultiple scripts 79

    Running scripts against a global repository 79

    Running scripts from a command prompt 80

    Creating batch files 83

    Modifying batch files 86

    Running batch files 87

    Monitoring Script Playback 89Viewing playback information in the dashboard 90

    Dashboard widget types 92

    Changing information displayed in dashboard widgets 95

    Installing and configuring the dashboard 97

    Viewing playback information in the status tool 99

    Load Testing 103Recording load test scripts 103

    Running load tests 104

    Running load tests from a command prompt 106

    Viewing load test results reports 109

    Stress Testing 111Creating and running stress tests 111

    Applying stresses 112

    Managing Windows and Controls 115Capturing window and control data 115

    Reviewing and saving repository changes 116

    Repository change reasons 118

    iii

  • About smart matching 118

    Overriding naming conventions for new controls 119

    Default control naming convention 121

    Modifying window and control properties 122

    About searchmethods 124

    Changing standard search criteria 124

    Editing window and control properties 126

    Using regular expressions 127

    Changing the searchmethod for multiple controls 128

    Using the Function searchmethod 129

    Setting advanced control properties 131

    Changing control types 132

    Renaming windows and controls 133

    Finding and replacing property values 134

    Merging controls 136

    Configuring user-added windows and controls 136

    Manually adding windows and controls to application repositories 138

    Adding properties to user-added windows and controls 140

    Deleting properties from user-added windows and controls 142

    Duplicating windows and controls 142

    Editing and deleting user-added windows and controls 143

    Synchronizing with the application repository 143

    Synchronizingmultiple scripts with the application repository 144

    Testing context menus 144

    Modifying Scripts 145Adding statements 146

    Statement value types 147

    Using function results as statement arguments 148

    Adding browser actions 149

    Cleaning up scripts 150

    Editing statements 151

    Deleting statements 151

    Calling scripts from other scripts 151

    Finding variable, function, and subroutine references in scripts 153

    Finding variable, function, and subroutine definitions in scripts 153

    iv

  • Commenting blocks of steps 154

    Handling known exceptions 155

    Handling script errors 155

    Identifying files and directories in statements 156

    Finding and replacing text in scripts 157

    Finding and replacing text inindividual scripts 158

    Finding text in multiple scripts 159

    Replacing text in multiple scripts 160

    Encrypting text 162

    Working with text in HTML elements 162

    Modifying script properties 163

    About drag-and-drop scripting 164

    Using Checkpoints 165Checkpoint types 165

    Creating record-time checkpoints 166

    Creating record-time check exists checkpoints 168

    Creating checkpoints 169

    Editing checkpoints 171

    Creating exists checkpoints 171

    Creating image checkpoints 173

    Editing image checkpoints 175

    Creating expression checkpoints 176

    Creating string exists checkpoints 177

    Deleting checkpoints 177

    Checkpoint examples 178

    Capturing and checking property values during playback 179

    Using OCR to Work withGraphical Text 181Creating OCR checkpoints 183

    Troubleshooting OCR issues 186

    Creating Data-Driven Scripts 187About datasheets 187

    Creating local datasheets 187

    Adding existing local datasheets 188

    Importing external test data 189

    Linking to external test data 189

    v

  • Configuring external datasheets 190

    CreatingMicrosoft Access datasheets 190

    CreatingMicrosoft Excel datasheets 192

    CreatingMicrosoft SQL Server datasheets 193

    Creating Oracle datasheets 195

    Creating PostgreSQL datasheets 197

    Creating SQLite datasheets 199

    Creating text file datasheets 200

    Associating datasheets with scripts 203

    Using datasheet values in scripts 203

    Navigating datasheets 205

    Retrieving external data with database queries 206

    Retrieving external data with script-generated queries 207

    Editing local datasheets 208

    Modifying local datasheet properties 208

    Deleting local datasheets 209

    Modifying external datasheet properties 209

    Deleting external datasheets 210

    Debugging Scripts 211Running scripts in debugmode 211

    Using breakpoints 212

    Using the INDEBUGMODE variable 213

    Troubleshooting variables 213

    Using Repository Variables 215Creating repository variables 215

    Editing repository variables 217

    Deleting repository variables 217

    Managing repository variable list values 217

    Adding repository variable list values 218

    Editing repository variable list values 219

    Deleting repository variable list values 219

    About the URLROOT repository variable 220

    Using repository variables in scripts 220

    Entering repository variable values during recording and playback 221

    vi

  • Testing Dynamic Web Applications 223About XPath queries 223

    Using the XPath searchmethod 223

    Using XPath queries in statements 225

    Running web scripts against different servers 226

    Using URL format rules 227

    Creating URL format rules 227

    Applying URL format rules 229

    Editing URL format rules 230

    Editing URL format rules in control properties 230

    Deleting URL format rules 232

    Testing Nested Controls 233Supported nested controls 233

    Adding statements to test nested controls 233

    Nested control object action examples 234

    Testing HTML Tables 237Adding statements to test HTML tables 237

    HTML table object action statement examples 239

    Creating HTML table checkpoints 240

    HTML table checkpoint examples 242

    Using the GetControlFromTable statement 243

    Capturing HTML table control property values during playback 244

    Finding HTML table row and column index values 244

    Testing nested HTML tables 245

    Nested HTML table examples 246

    Running Scripts on Remote Computers 249Configuring remote computers 249

    Starting QAWRemote.exe 250

    Running scripts remotely 250

    Runningmultiple scripts remotely 251

    Managing the QA Wizard Pro Server 253Installing the QAWizard Pro Server 253

    Starting the QAWizard Pro Server 254

    Starting the QAWizard Pro Server Admin Utility 254

    Configuring general server options 254

    vii

  • Configuring the server database 255

    Removing playback data 256

    Scheduling playback data removal 257

    Adding scheduled playback data removals 257

    Editing scheduled playback data removal filters 259

    Editing playback data removal schedules 260

    Deleting scheduled playback data removals 260

    Manually removing playback data 261

    Changing the playback data removal password 262

    Backing up theQAWizard ProServer 262

    Integrating with Helix ALM 265Configuring the Helix ALM integration 265

    Using Helix ALM list windows 267

    Working with Helix ALM test cases and test runs 268

    Adding Helix ALM test cases 269

    Recording Helix ALM test case steps 270

    Creating scripts from Helix ALM test cases 272

    Viewing Helix ALM test cases 274

    Editing and deleting Helix ALM test cases 275

    Running Helix ALM tests 275

    Viewing Helix ALM test runs 276

    Editing and deleting Helix ALM test runs 276

    Working with Helix ALM issues 276

    Adding Helix ALM issues 277

    Adding Helix ALM issues from run reports 278

    Adding Helix ALM issues from scripts 279

    Viewing Helix ALM issues 280

    Editing and deleting Helix ALM issues 281

    Moving Helix ALM items through the workflow 281

    Duplicating Helix ALM items 282

    Using the Helix ALM workbook 283

    Adding Helix ALM workbook tasks 283

    Viewing Helix ALM workbook tasks 284

    Editing and deleting Helix ALM workbook tasks 284

    viii

  • Integrating with Source Control Tools 285Configuring source control integration 285

    Setting source control options 286

    Understanding source control file status icons 287

    Opening workspaces under source control 288

    Excluding files from source control 289

    Working with source control files 289

    Adding files to source control 289

    Getting files from source control 290

    Checking out files from source control 291

    Viewing source control file properties 291

    Viewing source control file history 292

    Viewing line-by-line source control file changes 294

    Viewing pending changes 296

    Viewing file differences 296

    Checking in files to source control 298

    Managing changelists 298

    Undoing source control check out 300

    Renaming source control files 301

    Removing source control files 301

    Converting QuickTest Pro Data to QA Wizard Pro 303Understanding QTP data conversion 304

    Exporting QTP repository and checkpoint data 304

    Converting QTP data 305

    Converting QTP repository objects and checkpoints 306

    Converting QTP tests and function libraries 309

    Reviewing QTP conversion results 312

    Viewing the QTP conversion log 314

    Troubleshooting QTP conversions 314

    Setting Up RDBMS Databases 317Setting upOracle databases 317

    Setting up PostgreSQLdatabases 318

    Setting up SQL Server databases 318

    Troubleshooting RDBMS connections 319

    ix

  • Statements 321Application control statements 321

    Checkpoint statements 324

    Comment statements 325

    Conditional statements 325

    Datasheet statements 325

    Date/time statements 327

    Error handling statements 328

    File statements 329

    Helix ALM statements 331

    Image statements 332

    Integrated action statements 332

    JSON statements 333

    Keyboard action statements 335

    Load testing statements 336

    Loop statements 339

    Math statements 339

    Mouse action statements 340

    Object action statements 341

    OCR statements 342

    Programming statements 343

    PropertyMap statements 344

    QAWizard Pro statements 345

    Script control statements 345

    Stress statements 346

    String statements 346

    System statements 348

    Timing statements 349

    Touch action statements 349

    Web statements 350

    Web browser action statements 350

    Window action statements 351

    # (Outline Block) 351

    Abs 352

    AddFileAttachment 352

    x

  • AddIssue 353

    AddToHelixALM 354

    Alert 355

    AppendToFile 355

    ArrayClear 356

    ArraySize 356

    ArrayToJSONArray 357

    ASCII 357

    Assignment 358

    Back 358

    Beep 359

    Boolean 359

    BoundaryChecks 360

    CaptureScreenshot 360

    Case 361

    Cell 362

    CheckExists 362

    Checkpoint 363

    CheckpointExpression 364

    CheckpointImage 364

    CheckpointStringExists 365

    CheckpointStringNotExists 366

    Chr 366

    Clear 367

    ClearOutput 367

    Click 367

    Close 368

    CloseTab 368

    Collapse 368

    CombinePaths 369

    CommitRecordsetRow 370

    CompareFileContents 370

    CompareImage 371

    ComputerName 372

    ContainsSubStr 372

    xi

  • CopyFile 373

    Cos 373

    CreateDirectory 374

    CreateGUID 374

    CreateObject 375

    CreateRecordsetRow 375

    CreateTempFile 376

    Date 376

    DateAdd 377

    DateDiff 378

    DatePart 379

    DateTime 380

    DateTimeFormat 381

    Day 383

    DecimalSeparator 384

    DecryptString 384

    Delay 385

    DeleteDirectory 385

    DeleteFile 386

    DeleteRecordsetRow 386

    DirectoryExists 387

    DisableNetworking 387

    Do...Loop Until 388

    Do...LoopWhile 389

    DoubleClick 390

    Drag 391

    DragTo 391

    Else 392

    ElseIf 392

    EnableNetworking 393

    EncryptString 394

    EndsWithSubStr 394

    Err.CallStack 395

    Err.Clear 396

    Err.Description 396

    xii

  • Err.LineNumber 397

    Err.LineText 398

    Err.Number 399

    Err.Raise 400

    Err.ScriptName 401

    Err.Source 401

    EvaluateRegExpression 402

    Exit 403

    Expand 404

    ExternalAssemblyCall 404

    ExternalCall 406

    ExtractHTML 407

    ExtractHTMLToString 407

    Fail 408

    FileBaseName 408

    FileDateCreated 409

    FileDateLastModified 409

    FileDirectoryName 410

    FileExists 410

    FileExtension 411

    FileFullPath 412

    FileName 412

    FileReadOnly 413

    FileRootDirectoryName 413

    FileSize 414

    FileType 414

    FindColumnByRowIndex 415

    FindRowByColumnIndex 416

    FindSubStr 417

    FirstRow 417

    Float 418

    For Each...Next 418

    For...Next 419

    Format 420

    Forward 422

    xiii

  • General 422

    GetAllValues 422

    GetBrowserVersion 423

    GetCallStack 423

    GetControlFromTable 424

    GetControlFromXPathQuery 425

    GetControlSearchTimeout 425

    GetCurDir 426

    GetCurrentBrowserType 426

    GetDataSourceColumnNames 427

    GetDiagnostics 427

    GetDirectory 428

    GetDirectoryNames 428

    GetDotNETProperty 429

    GetDotNETPropertyWithArgs 430

    GetEnv 431

    GetFieldValue 431

    GetFileNames 432

    GetFilePath 433

    GetLength 433

    GetLowLevelSpeed 434

    GetMouseXCoordinate 435

    GetMouseYCoordinate 435

    GetNumItems 436

    GetPlaybackDelay 436

    GetPlaybackSessionName 437

    GetPropertyMap 437

    GetPropertyNames 438

    GetPropertyNames - JSONObject 439

    GetRecordsetColumnNames 439

    GetRowValue 440

    GetScreenHeight 441

    GetScreenWidth 441

    GetScriptVariable 442

    GetSQLScalar 442

    xiv

  • GetStopwatchElapsedMilliseconds 443

    GetStopwatchElapsedTime 443

    GetValue - JSONArray 444

    GetValue - JSONObject 445

    GetVariableValues 446

    GetVirtualUserID 446

    GetWindowsVersion 446

    HasProperty - JSONObject 447

    HasProperty - PropertyMap 448

    Help 448

    Home 449

    Hour 449

    Hover 449

    HTMLFindByID 450

    HTMLFindByTag 451

    If 451

    IgnoreAutocompleteDropDowns 452

    IgnoreErrors 453

    IgnoreWarnings 453

    InsertAt 453

    Integer 454

    InvokeDotNETMethod 454

    InvokeDotNETMethodWithArgs 455

    InvokeJavaScript 456

    Is64BitWindows 457

    IsArray 457

    IsIgnoringAutocompleteDropDowns 458

    IsIgnoringErrors 458

    IsIgnoringWarnings 459

    IsJSONArray 459

    IsJSONObject 460

    IsJSONType 460

    IsDate 461

    IsNull 462

    IsNumeric 462

    xv

  • IsObject 463

    JSONArrayGetValue 463

    JSONArraySetValue 464

    JSONCanParseAsArray 465

    JSONCanParseAsObject 465

    JSONIsValid 466

    JSONNewArray 467

    JSONNewObject 467

    JSONObjectGetValue 467

    JSONObjectSetValue 468

    JSONParse 469

    KeyDown 470

    KeyPress 470

    KeyUp 471

    LastRow 472

    Left 472

    Length 473

    LMouseClick 473

    LMouseDoubleClick 474

    LMouseDown 475

    LMouseUp 476

    LoadExternalAssembly 476

    Lower 477

    MakeRegExpression 477

    MakeURL 478

    Max 479

    Maximize 479

    Mid 479

    Min 480

    Minimize 481

    Minute 481

    MMouseClick 481

    MMouseDoubleClick 482

    MMouseDown 483

    MMouseUp 484

    xvi

  • Month 484

    MonthName 485

    MonthNum 485

    MouseMove 486

    MouseMoveFromCurrentPosition 487

    MoveDirectory 487

    MoveFile 488

    MSAADoDefaultAction 488

    MSAASetName 488

    MSAASetValue 489

    Navigate 489

    NewIssue 490

    NewTab 490

    NextRow 491

    Now 491

    OCRCheckpoint 491

    OCRCheckpointPreviousStatement 493

    OCRConvertToGrayscale 493

    OCRGetContrast 494

    OCRGetLanguageFilePath 495

    OCRGetScale 496

    OCRGetText 497

    OCRGetTextFromFile 498

    OCRGetTextPreviousStatement 499

    OCRIsConvertingToGrayscale 500

    OCRSetContrast 501

    OCRSetLanguageFilePath 502

    OCRSetScale 503

    On Error 504

    OpenRecordset 504

    OpenRecordsetQuery 505

    ParseString 506

    PerformXPathQuery 506

    Pop 507

    PrevRow 508

    xvii

  • Print 508

    PrintLn 509

    Property 509

    Property - PropertyMap 510

    Push 511

    Rand 511

    Range 512

    ReadRegistryEntry 512

    ReadTextFile 513

    RecordsetBOF 513

    RecordsetEOF 514

    RecordsetRowCount 515

    Refresh 515

    Rem 516

    RemoveAt 516

    RemoveField 517

    RemoveProperty 518

    Replace 519

    ResetStopwatch 520

    Resize 520

    Restore 520

    Right 521

    RMouseClick 521

    RMouseDoubleClick 522

    RMouseDown 523

    RMouseUp 523

    RunBackgroundCommand 524

    RunCommand 525

    RunScriptRemote 526

    RunSQLCommand 526

    SaveRegionToImageFile 527

    Script.CallScript 528

    Script.ClearContext 529

    Script.ClearLoadTestContext 529

    Script.CloseApp 530

    xviii

  • Script.ConnectToProcess 530

    Script.GetContext 531

    Script.GetLineNumber 531

    Script.GetLoadTestContext 532

    Script.RunApp 532

    Script.SetBrowser 533

    Script.SetContext 534

    Script.SetLoadTestContext 534

    ScriptName 535

    Second 535

    Select...Case 536

    Select 537

    SelectRow 538

    SelectTab 538

    Set 538

    SetAllFilesReadOnly 539

    SetCell 539

    SetControlSearchTimeout 540

    SetDate 540

    SetDateRange 541

    SetDateTime 541

    SetDiagnostics 542

    SetFieldValue 542

    SetFileReadOnly 543

    SetDotNETProperty 544

    SetDotNETPropertyWithArgs 545

    SetLowLevelSpeed 545

    SetPlaybackDelay 546

    SetPlaybackSessionName 546

    SetRowValue 547

    SetScriptVariable 547

    SetText 548

    SetTime 548

    SetValue 549

    SetValue - JSONArray 549

    xix

  • SetValue - JSONObject 550

    SimulateDriveReadOnly 551

    SimulateDriveRemainingSpace 551

    SimulateMemoryPerAllocationLimit 552

    SimulateMemoryRemainingSpace 552

    Sin 553

    Size 554

    SRand 554

    StartStopwatch 555

    StartsWithSubStr 555

    Stop 556

    StopStopwatch 556

    Str 557

    StrCompare 557

    StrEquals 558

    TestCaseStep 559

    Throw 559

    Time 560

    Today 560

    ToString - JSONArray 561

    ToString - JSONObject 561

    TouchDown 562

    TouchMove 563

    TouchUp 564

    Trim 564

    Try...Catch...Finally 565

    TypeText 566

    Upper 566

    UserName 567

    WaitForExists 567

    WaitForExistsTimed 568

    WaitForProperty 569

    Warning 570

    WebAddNetworkCredential 570

    WebAddSessionVariable 571

    xx

  • WebClearAllCustomHeaders 572

    WebClearNetworkCredentials 572

    WebCloseAllConnections 572

    WebCloseConnection 573

    WebDelete 573

    WebGet 574

    WebGetAllCustomHeaders 574

    WebGetCookie 575

    WebGetCustomHeader 576

    WebGetReferrer 577

    WebGetUserAgent 578

    WebHead 578

    WebOptions 579

    WebPatch 579

    WebPatchFromFile 580

    WebPatchJSON 581

    WebPost 581

    WebPostFromFile 582

    WebPostJSON 583

    WebPut 584

    WebPutFromFile 584

    WebPutJSON 585

    WebRemoveAllSessionVariables 586

    WebRemoveCustomHeader 586

    WebRemoveSessionVariable 587

    WebSetCookie 588

    WebSetCustomHeader 588

    WebSetReferrer 589

    WebSetUserAgent 590

    Weekday 590

    WeekdayName 591

    WeekdayNum 591

    While 592

    WriteRegistryEntry 592

    Year 593

    xxi

  • Operators 593

    Addition operator 594

    And operator 595

    Assignment operator 595

    Concatenation operator 596

    Division operator 596

    Exponentiation operator 596

    Is operator 597

    Mod operator 597

    Multiplication operator 597

    Negation operator 598

    Not operator 598

    Or operator 598

    Subtraction operator 599

    Xor operator 599

    Constants 600

    Keywords 603

    Date/time format examples 605

    QAWizard Pro environment variables 605

    Appendix A: Supported Technologies and Controls 607Appendix B: Run Results Email Field Codes 631Appendix C: Third-Party Software Licenses 633Glossary 635Index 639

    xxii

  • What's NewQAWizard Pro 2017.1 includes the following key features. For a complete list of features, enhancements, andbug fixes, check out the release notes.

    Change the search method for multiple controls at the same time

    If QA Wizard Pro cannot locate or distinguish between controls during playback, youmay need to change thesearchmethod used. You can now switch to amore accurate searchmethod for multiple controls at the sametime without manually updating properties of each control. See Changing the searchmethod for multiplecontrols, page 128.

    Use test data fromPostgreSQL and SQLite databases

    You can now create external datasheets to import or link to existing data in PostgreSQL and SQLitedatabases for use in data-driven scripts. See Creating PostgreSQL datasheets, page 197 and CreatingSQLite datasheets, page 199.

    Improve the accuracy of optical character recognition OCR

    You can now improve the accuracy of text returned byoptical character recognition (OCR). Set defaultplayback options to control the contrast, image scale, grayscale conversion, and language file used to readgraphical text in applications. See Using OCR toWork withGraphical Text, page 181 and Setting playbackoptions, page 76.

    You can also use new OCR statements in scripts to adjust these options. SeeOCR statements, page 342.

    Manually add windows and controls touse in scripts

    If QA Wizard Pro cannot capture windows or controls you need to test because they do not exist in theapplication or cannot be displayed during recording, you can now manually add them to the applicationrepository to use them in scripts. This lets you create scripts that test new controls before they areimplemented in the application if you use a test-driven development process. It can also help save time whenyou only need to add a small number of controls to the repository because you do not have to repopulate it.See Configuring user-added windows and controls, page 136.

    Send custom header values with web requests during load tests

    Use the following statements to send custom headers and values when posting data during load tests:WebClearAllCustomHeaders, page 572, WebGetAllCustomHeaders, page 574,WebGetCustomHeader,page 576, WebRemoveCustomHeader, page 586, andWebSetCustomHeader, page 588.

    Other enhancements

    n To quickly locate source files on the computer, you can now right-click a file in theWorkspace pane andchooseOpenContaining Folder.

    n Use the SetAllFilesReadOnly, page 539 and SetFileReadOnly, page 543 statements to allow or preventscripts frommodifying files.

    1

    http://www.seapine.com/qa-wizard-pro/release-notes

  • What's New

    n Use new error handling statements to generate additional output that is helpful when debugging scripts.The Err.LineText, page 398 statement returns text where an error occurred. The Err.CallStack, page 395statement returns the call stack up to the script line where the last error occurred.

    n Use the EncryptString, page 394 statement to conceal sensitive text entered in fields, such as passwords.

    Note: TestTrack was renamedHelix ALM. The integration works the same as in previous QAWizard Proversions. Existing scripts work with both Helix ALM and earlier TestTrack versions.

    Seapine License Server was renamedHelix ALM License Server. Seapine ALM DataWarehouse wasrenamedHelix ALM DataWarehouse.

    2

  • Installing QA Wizard ProPerform the following tasks to install QA Wizard Pro.

    1. Review important information to consider before installing QAWizard Pro. See Before you install, page 3.

    2. Run the installer and select the components to install. See Running the installer, page 4.

    3. Review information about QAWizard Pro and automated testing to help you get started. See Afterinstallation, page 6.

    4. If you are an administrative user installing the QAWizard ProServer and dashboard, configure serveroptions and the web server to host the dashboard. See After installation, page 6.

    Before you installReview the following information before installing QAWizard Pro.

    System requirements

    Perform the following tasks tomake sure the computer you are installing onmeets the system requirements.

    n Review the recommended system requirements. If you are installing the QAWizard Pro Server, reviewthe server recommendations attached to the system requirements.

    n Check for and install all availableWindows updates. The computer needs the latest updates to installadditional resources required by QAWizard Pro, such as theMicrosoft VisualC++redistributablepackage.

    n Make sure you are amember of the local Administrator group on the computer you are installing QAWizard Pro on. If you do not have local administrative rights, youmay be prompted to enter a serial numberevery timeQAWizard Pro starts and youmay not be able to record scripts. Contact your systemadministrator for help.

    Windows 8 support

    To test Windows 8 applications, youmust install QA Wizard Pro in the default application directory (e.g.,C:\Program Files\Perforce\QA Wizard Pro on 32-bit Windows or C:\Program Files (x86)\Perforce\QA WizardPro on 64-bit Windows).

    Server database

    TheQAWizard ProServer stores playback data in a SQLite database by default. This database(QAWServer.db) is automatically created when the server starts and does not require any setup orconfiguration. You can also use aMicrosoft SQLServer,Oracle, or PostgreSQL database, but youmustcreate an empty database before configuring the QAWizard Pro Server.See Setting UpRDBMS Databases,page 317.

    Web server for dashboard

    Before installing the QAWizard Pro dashboard, make sureMicrosoft Internet InformationServices (IIS) isinstalled and enabled on the same computer that hosts the QAWizard Pro Server. See theWindows help forinformation.

    3

    http://www.seapine.com/knowledgebase/index.php?View=entry&EntryID=774

  • Running the installer

    Upgrades

    Before upgrading the QAWizard Pro Server,back up the server database and global application repository.See Backing up theQAWizard ProServer, page 262.

    Note: TheQAWizard ProServer is only compatible with the same version of QAWizard Pro applications.If you are upgrading the server, make sure users also upgradeQAWizard Pro applications so they cancontinue to send playback data to the server and access the global application repository.

    After upgrading, youmay be prompted to upgrade workspaces or the local application repository to the currentversion. These files cannot be reverted back to an earlier version after upgrading. As a best practice, makesure your files are backed up in a source control application before upgrading.

    Running the installerTo run the installer, double-click the qawizardproinstall.exe file.

    Usage statistics

    During installation, you can choose to allow QAWizard Pro to send usage statistics to Perforce. See Settinggeneral options, page 40 for a list of information sent.

    Components

    You can select to install the following components.

    QA Wizard Pro

    Includes the following components to help you record and run scripts.

    Component Description

    QAWizardPro.exe QAWizard Pro application. Includes a run-timemode, which is used withrun-time licenses that only provide access to run scripts.

    QAWRunScript.exe Runs scripts and batch files from a command prompt. See Running scriptsfrom a command prompt, page 80.

    QAWRunLoadTest.exe Runs load test scripts from a command prompt. See Running load testsfrom a command prompt, page 106.

    QAWRemote.exe Runs scripts on a remote computer. See Running scripts remotely, page250.

    QAWReportViewer.exe Displays results reports, which are generated after scripts run. Reportsinclude playback results, test computer configuration, how long scripts ran,and any warnings or errors that occurred. See Viewing results reports, page75.

    4

  • Running the installer

    Component Description

    SampleScripts.qawwspace Workspace that includes sample web andWindows scripts and datasheets.See Sample scripts and applications, page 22.

    BugReport.exe andWysiCRM.exe

    Sample applications used by the sample scripts.

    QA Wizard ProServer

    TheQAWizard Pro Server (QAWServer.exe) stores global application data and hosts the server database. Itis required to use the global repository, dashboard, status tool, and Helix ALM DataWarehouse integration.

    Only an administrative user needs to install the server on a networkedWindows computer. The server adminutility (QAWServerAdmin.exe), which is used tomanage the server, is also installed. SeeManaging the QAWizard Pro Server, page 253.

    Dashboard

    The dashboard lets youmonitor script playback information and statistics in a web browser.

    To use the dashboard, an administrative user must install files on the same computer that hosts the QAWizard ProServer and configure a web server. See Installing and configuring the dashboard, page 97.

    Status Tool

    The status tool (QAWStatusTool.exe) lets you review script playback information line-by-line.It does notrequire a license and can be installed on any computer to help youmonitor local and remote scripts during andafter playback. A connection to the QAWizard Pro Server is required. See Viewing playback information inthe status tool, page 99.

    Installation directories

    QAWizard Pro components are installed in the following directories by default.

    Component Default directory Notes

    QAWizard Proapplications andstatus tool

    32-bit WindowsC:\ProgramFiles\Perforce\QA Wizard Pro64-bit WindowsC:\Program Files(x86)\Perforce\QA Wizard Pro

    You can select a different application directorywhen running the installer. To test Windows 8applications, the default directory must beused.

    Server databaseand globalapplicationrepository

    QAWServer in the computer's rootdirectory (e.g, C:\QAWServer)

    Directory is automatically created when theserver is installed.

    Dashboard files C:\InetPub\wwwroot\qawdashboard Only change this directory if you are familiarwith creating virtual directories on the webserver.

    5

  • After installation

    After installationReview the following information to set up and useQAWizard Pro after installation.

    Users

    Review information to learn about using QAWizard Pro. SeeGetting Started with QAWizard Pro, page 7.

    Server administrators

    Make sure the QAWizard ProServer service is running and then use the admin utility to configure serveroptions. SeeManaging the QAWizard Pro Server, page 253.

    If you also installed the dashboard, configure the web server so users can access it. See Installing andconfiguring the dashboard, page 97.

    6

  • Getting Started with QA Wizard ProQAWizard Pro records actions you perform as you interact with a web,Windows, or Java application andadds them as steps in scripts used to automate testing. After recording scripts, you canmodify them tomakesure they perform all actions required to complete a test. When you are ready to perform tests, run scripts andthen review the results in a detailed report.This gives you all the information needed to verify tests and reportissues to the development team.

    Before you start

    Review the following information to learnmore about QAWizard Pro and automated testing.

    n Key QAWizard Pro concepts provides an overview of common terminology and concepts you should befamiliar with before using QAWizard Pro.

    n Understanding the testing process provides information about QAWizard Pro concepts in context of theautomated testing process.

    n QAWizard ProBest Practices provides recommended guidelines that can help you avoid commonmistakes and improve the quality of your automated tests.

    Starting to use QA Wizard Pro

    Following are some common tasks you should complete to get started withQA Wizard Pro. Ifyou need helpinstalling QAWizard Pro, see Installing QAWizard Pro, page 3.

    1. Start QA Wizard Pro and add your license.

    2. Get familiar with the QAWizard Pro interface.

    Tip: You can use the SampleScripts workspace installed with QAWizard Pro to view sample webandWindows scripts and experiment withQA Wizard Pro functionality before setting up your owntests. See Sample scripts and applications, page 22.

    3. Create a workspace to organize scripts, run reports, datasheets, and any other files for performing tests.

    4. Add the application to the local application repository.

    5. Record scripts against the application to capture actions to perform during the test and add the windowsand controls to the repository.

    6. Run scripts to perform tests. During playback, QAWizard Pro compares the tested application againstthe window and control information in the application repository. If differences are found, the script fails.

    7. View results reports for information about scripts that ran, any warnings or errors that occurred, and theoverall status of the playback session.

    Taking it to the next level

    After you becomemore familiar with QAWizard Pro, you can perform the following tasks to createmorecomplex tests.

    n Modify scripts to add or edit statements that perform actions during playback.

    n Use checkpoints to verify application attributes.

    7

    http://help.seapine.com/help.php?product=qawizardpro&type=qawp&topic=QAWPBestPractices

  • Key QA Wizard Pro concepts

    n Create data-driven scripts to runmultiple iterations of the same test using different sets of data fromdatasheets.

    n Modify window and control properties to optimize tests andmanage changes to the application.

    n Debug scripts to troubleshoot errors.

    n Install and configure the QAWizard ProServer to use the dashboard and status tool to monitor playback oruse the global application repository to provide application data to other users.

    Key QA Wizard Pro conceptsFollowing are some key concepts you should be familiar with before using QAWizard Pro. Understanding thetesting process, page 9 provides information about these concepts in context of the entire automated testingprocess.

    Application repository

    Application repositories store information about tested applications and versions. When you record a script,QA Wizard Pro captures the application windows and controls and their properties. This information is savedin the repository. When you run a script, the information is used to find windows and controls and performactions on them. If the window or control is not found, the script fails.

    See About application repositories, page 57.

    Workspaces

    Workspaces organize scripts, datasheets, and related files. Depending on your process, youmay use oneworkspace for each application or for each functional area you are testing. You can create folders to organizefiles in workspaces.

    See Creating workspaces, page 23.

    Scripts

    Scripts contain statements, which are instructions that control how a script runs and performs actions in thetested application. For example, you can call other scripts, declare variables, specify steps to run based onconditions, or repeat a block of steps. See Statements, page 321.

    Typically, you create scripts by recording against an application. See Recording new scripts, page 65. Youcan alsomanually create scripts. To perform a test, you run a script andQAWizard Pro performs the actionsspecified in statements in the application. Playback fails if a bug is found in the tested application or if there isa problem in the script. See Running scripts, page 73.

    You can work with scripts in Keyword View or Text View. Keyword View displays scripts in a grid format,while Text View displays scripts in a text-based editor and provides access to the scripting language. SeeUsing Keyword View, page 27 and Using Text View, page 28.

    Datasheets

    Data-driven testing allows you to test multiple scenarios and data ranges with one script. The test data isstored in a separate file, which is a datasheet. Datasheets are stored in workspaces with scripts and otherrelated test files.

    8

  • Understanding the testing process

    QAWizard Pro supports local and external datasheets. You can create test data in a local datasheet, which isa simple spreadsheet created in QAWizard Pro and stored locally. You can also link to external test datastored inMicrosoft Access, Microsoft Excel, Microsoft SQL Server, Oracle, PostgreSQL, SQLite, or textfiles.

    See About datasheets, page 187.

    Checkpoints

    Checkpoints help you verify the tested application is working as expected. Checkpoints are statements inscripts used to verify that attributes of an application exist or are correct when compared to an expected valueduring playback.

    See Using Checkpoints, page 165.

    Reports

    QAWizard Pro generates and saves a results report after a script runs. The report includes information aboutthe script, such as the test computer configuration and how long it took the script to run. Reports are stored inworkspaces with scripts and other related test files. See Viewing results reports, page 75.

    You can alsomonitor scripts in real-time using the dashboard and status tool, which display local and remotescript information during playback. You canmonitor scripts from any location, such as at home or anotheroffice. See Viewing playback information in the dashboard, page 90 and Viewing playback information in thestatus tool, page 99.

    Understanding the testing processAutomated testing with QAWizard Pro involves setting up and planning tests, recording, modifying, andrunning scripts, and analyzing test results.

    Setup

    Before you start recording scripts, perform the following setup tasks.

    n Determine which test cases to automateConsider automating a test if it has predictable results,needs to be performedmultiple times, evaluates high-risk conditions, requires testingmultiple data valuesfor the same actions, is expensive or impossible to perform manually, or needs to be performed ondifferent hardware or software configurations.

    n Set up the testing environmentMake sure you have access to the hardware, software, and networkresources that you need to record or run tests.

    n Create a workspaceWorkspaces organize scripts and related reports and datasheets. Depending onyour organization's process, youmay use one workspace for each application or for each functional area.See Creating workspaces, page 23.

    n Set up the application in the application repositoryApplication repositories store information aboutthe tested application and version. Each version contains window and control data that identifies andlocates objects. SeeManaging Application Repositories, page 57.

    n Set general and playback optionsTake a few minutes to set general options that control how QAWizard Pro works and set playback options that control how scripts run. See Setting general options, page40 and Setting playback options, page 76.

    9

  • Understanding the testing process

    n Configure Helix ALM and source control integration (optional)Integrate QAWizard Pro with HelixALM to submit issues when tests fail andmanage issues and other testing tasks. See Integrating withHelix ALM, page 265. Integrate with Surround SCM or another source control application tomanagechanges to workspaces, scripts, and local datasheets. See Integrating with Source Control Tools, page285.

    Recording

    You can record two types of scripts: standard QAWizard Pro scripts used for functional and regressiontesting and load test scripts used for testing performance under load.

    When you record a standard QAWizard Pro script, you interact with the application or web site exactly as auser would andQAWizard Pro adds the actions to the script. When you record a load test script, you alsointeract with the web application exactly as a user would but QAWizard Pro adds the information exchangedbetween the application and server to the script. See Recording Scripts, page 65 and Recording load testscripts, page 103.

    Modification

    Recorded scripts provide a baseline for application testing. You canmodify recorded scripts to createmoreflexible scripts and complex testing scenarios. In addition to recording additional steps, andmodifying ordeleting steps, you can enhance scripts by:

    n Adding statementsStatements are instructions in each step that control how the script runs. Forexample, you can call other scripts, declare variables, specify steps to run based on conditions, or repeata block of steps. See Statements, page 321.

    n Creating checkpointsCheckpoints verify that the value of a property in a window or control matches anexpected value during playback. See Using Checkpoints, page 165.

    n Creating data-driven scriptsData-driven scripts are the easiest way to createmultiple test iterations,allowing you to use data from a local datasheet, Excel spreadsheet, text file, or Access, Oracle,PostgreSQL, SQLite, or SQL Server database to test a different set of data each time a script runs. SeeCreating Data-Driven Scripts, page 187.

    Tip: You canmodify scripts in Keyword View or Text View. Keyword View displays scripts in a gridformat, while Text View displays scripts in a text-based editor and also provides access to the scriptinglanguage. See Using Keyword View, page 27 and Using Text View, page 28.

    Execution

    Execute, or run, scripts to perform a test. During playback of standard QAWizard Pro scripts, the testedapplication is compared to the information stored in the application repository. During playback of load testscripts, the web application is run under a simulated load of users.

    QAWizard Pro provides several ways to run scripts. You can run an individual script or multiple scripts, runscripts from a command prompt, run scripts on a remote computer, or run scripts in a batch file to performunattended tests. See Running scripts, page 73 and Running load tests, page 104.

    Scripts fail if a bug is found in the tested application or if there is a problem in the script. You can troubleshoota script by debugging it, which allows you to step through a script to locate the problem. You can also step intoa called script to debug it. See Running scripts in debugmode, page 211.

    10

  • Starting QA Wizard Pro

    You canmonitor scripts in real-time using thedashboard and status tool if QA Wizard Pro applications areconfigured to send playback data to the server. See Viewing playback information in the dashboard, page 90and Viewing playback information in the status tool, page 99.

    Analysis

    After scripts run, QAWizard Pro generates and saves a report that summarizes the test results. The reportcontains information about failed script steps, how long the script took to run, and the test computerconfiguration. Use this information to determine if problems exist in the application or if you need tomodify thescript. See Viewing results reports, page 75 and Viewing load test results reports, page 109.

    If QA Wizard Pro is integrated with Helix ALM, you can submit reports to add issues. This saves testing anddevelopment time and ensures all teammembers have the information they need to perform their assignedtasks. See Adding Helix ALM issues from run reports, page 278.

    Starting QA Wizard ProChooseStart > All Programs > Perforce > QA Wizard Pro > QA Wizard Pro.

    Managing licensesYoumust enter at least one serial number before you can useQAWizard Pro. SeeQAWizard Pro Pricing andLicensing for information about licensing.

    Note: A standard QAWizard Pro license includes five virtual users for load testing. Additional virtualusers require a separate load testing license.

    1. Choose Tools > Licensing.

    TheManage Licenses dialog box opens.

    2. Click Add to add a license.

    3. Enter the serial number and click OK.

    Note: Select a license and click View to see the license details. A record of maintenance extenders isalso displayed.

    QA Wizard Pro interfaceTake some time to get familiar with the interface before you start working inQA Wizard Pro.

    Tip: You canmove and hide panes to display only information you need in your preferred layout. SeeCustomizing the interface, page 35.

    11

    http://www.seapine.com/qa-wizard-pro/licensinghttp://www.seapine.com/qa-wizard-pro/licensing

  • QA Wizard Pro interface

    # Area Use to:

    Toolbars Access themost commonly usedQAWizard Pro actions. To display or hide a toolbar,chooseView > Toolbars and the toolbar name. You can also add buttons to toolbarsand create custom toolbars. See Customizing toolbars, page 36.

    Workspacepane

    Organize test data, including scripts, batches, and datasheets. SeeWorkspace pane,page 21.

    Reportspane

    View reports generated after running scripts. See Reports pane, page 17.

    Statementspane

    View statements you can add to scripts. Double-click a statement to open the AddStatement dialog box. See Statements pane, page 19.

    Script pane Edit and view scripts, reports, and datasheets. You can work with scripts in KeywordView or Text View. See Script pane, page 18.

    Add/EditStatementdialog box

    Add and edit statements in scripts. Available in both Keyword View and Text View.See Adding statements, page 146.

    12

  • Application Repository pane

    # Area Use to:

    Previewpane

    Preview application screenshots captured during playback. See Preview pane, page16.

    ApplicationRepositorypane

    Manage tested applications, versions, windows, and controls. Window and controlinformation stored in the application repository is used to locate objects and compareproperties during script playback. See Application Repository pane, page 13.

    Referencespane

    View all references to a variable, function, or subroutine found when searching scripts.See References pane, page 17.

    FindResultspane

    View text found when searching scripts. See Find Results pane, page 15.

    Call Stackpane

    View the stack of function calls made until an error or breakpoint occurs, which canhelp you debug scripts. See Call Stack pane, page 14.

    HelixALMitempanes

    Work with Helix ALM issues, test cases, test runs, and workbook tasks. Requiresintegration with Helix ALM. See Helix ALM panes, page 20.

    Variablespane

    View script and repository variables when debugging scripts. See Variables pane,page 20.

    Errors pane View errors and warnings that occur during script playback. See Errors pane, page 15.

    Outputpane

    View information based on instructions you add to scripts. For example, as a scriptruns, youmay want to capture a value from the tested application and print it in theOutput pane. SeeOutput pane, page 15.

    PendingChangespane

    View modified, checked out, and new source control files in the workspace. Requiresintegration with a source control tool, such as Surround SCM. See Pending Changespane, page 16.

    Application Repository paneTested applications, versions, and windows and controls are stored in the application repository. Duringrecording, QAWizard Pro captures information about the application's windows and controls and adds it to thecorresponding application and version repository. During script playback, QAWizard Pro compares thewindow and control properties in the repository to the tested application to locate objects.

    13

  • Call Stack pane

    Note: on the control type icon indicates the window or control was manually added by a user. SeeConfiguring user-added windows and controls, page 136.

    Call Stack paneDisplays the stack of function calls made until an error or breakpoint occurs. The function and arguments,script, and script line number are displayed, which can help you trace functions completed before an erroroccurred and view the script you are working in when using the stack to debug scripts. See Running scripts indebugmode, page 211.

    Note: You can also use the GetCallStack statement in scripts to retrieve stack information. SeeGetCallStack, page 423.

    Double-click a call stack line to go to the corresponding script step.

    Tip: To copy the call stack information, right-click the call stack and chooseCopy. This is helpful if youwant to add the information to a Helix ALM issue or email it to another teammember.

    14

  • Errors pane

    Errors paneDisplays script syntax errors and errors and warnings that occur during script playback. Each error identifiesthe script line number where the error occurs. You can select to show only errors, only warnings, or both.

    Errors and warnings may include hints for resolving playback issues. Some hints include links to controls inthe application repository or dialog boxes where youmay be able to resolve the issue.

    Tip: Right-click the error and chooseCopy to copy the error information. This is helpful if you want to addthe information to a Helix ALM issue or email it to another teammember.

    You can filter the information displayed in the Errors pane.

    n Show errors displays the errors that caused the script to fail. Show handled errors displays errors thatoccurred but were handled in the script without stopping playback.

    n Show warnings displays the warnings that youmay want to investigate but did not cause the script tofail.

    Note: You can use the call stack to trace function calls to the point when an error occurred. ChooseView>Call Stack to display the stack information. See Call Stack pane, page 14.

    Find Results paneDisplays all instances of text found when searchingmultiple scripts. Double-click a result to view the text inthe script. See Finding text in multiple scripts, page 159.

    Output paneDisplays information based on instructions you add to scripts. For example, youmay want a script to capturea value from the application and print it in the Output pane.

    15

  • Pending Changes pane

    Note: To search the Output pane, make sure the pane has focus then chooseEdit > Find.

    Pending Changes paneWhen source control integration is enabled, all modified, checked out, and new files in the workspace aredisplayed in the Pending Changes pane. You can select a file and check it in, undo the check out, or viewdifferences between the local file and the file on the source control application server. See Integrating withSource Control Tools, page 285.

    Preview paneDisplays application screenshots captured during playback. When you click a script step in Keyword View orText View, the control that the action was performed on is highlighted. You can select controls in the Previewpane to quickly locate them in the Application Repository pane.

    16

  • References pane

    Note: Click to zoom in, to zoom out, or to display the screenshot at actual size. Select Auto Fitto display the entire screenshot.

    References paneDisplays all places where a variable, function, or subroutine is referenced when searching scripts. Double-click a result to view the reference in the script. See Finding variable, function, and subroutine references inscripts, page 153.

    Reports paneDisplays the reports generated after running a script if the playback option to automatically generate a report isset. See Setting playback options, page 76. Reports are organized by their corresponding script.

    Tip: To quickly find a report, search for it by name. Click in the search field to clear the results.

    17

  • Script pane

    Script paneThe Script pane is themain area where you work with scripts, reports, and datasheets. This pane includes aKeyword View and Text View.

    Keyword View displays scripts in a grid format. Actions are grouped by the window they are performed on.See Using Keyword View, page 27.

    Text View displays scripts in a text-based editor. Text View also provides access to the scripting language,whichmakes it easy to create and edit statements, modify scripts, and add advanced logic to scripts. SeeUsing Text View, page 28.

    18

  • Statements pane

    Working with multiple itemsYou can openmultiple scripts, datasheets, and reports to work with them at the same time. Use the followingoptions to navigate between open items.

    n To view all open items whenmore tabs than can be displayed are open, click in the upper-right corner ofthe pane. Select an item from the list to view it. To go to the previous or next open item, click or .

    n To view multiple items at the same time, right-click a tab and select New HorizontalTab Group orNewVerticalTab Group. Tomove an item to a different tab group, right-click it and choose the group tomoveit to.

    n To go to the previous or next location you were working in, clicktheGo Back orGo Forward toolbarbutton. You can also chooseScript >Go Back orGoForward. QA Wizard Pro keeps track of the cursorlocation when you switch between scripts and script lines, go to definitions, find and replace text inscripts, debug scripts, and double-click errors in the Errors pane. You can go back or forward up to the 10most recent locations.

    n To close items, right-click the tab and select Close,Close All, orClose Other Tabs. You can also clickin the upper-right corner of the pane to close the open item.

    Statements paneDisplays statements that can be added to scripts. When adding instructions to a script, double-click astatement to open the Add Statement dialog box with the item selected. See Statements, page 321.

    Tip: Select a statement type from theCategory list to limit the statements displayed. To quickly find astatement, search for it by name. Click in the search field to clear the results.

    19

  • Helix ALM panes

    Helix ALM panesDisplay Helix ALM issues, test cases, test runs, and workbook tasks. If QA Wizard Pro is integrated withHelix ALM, item list windows open in these panes by default. See Integrating with Helix ALM, page 265.

    Variables paneDisplays script and repository variables when debugging scripts. See Troubleshooting variables, page 213.

    20

  • Workspace pane

    Workspace paneOrganizes test data, including scripts, batches, and data sources. If a main script is set for the workspace,the script name is displayed in bold. See Setting and running amain script, page 74.

    To work with an item in a workspace, double-click it to open it in the Script pane.

    Tip: To quickly find an item in the workspace, search for it by name. Click in the search field to clear theresults. To find a file in the workspace on the computer, right-click it and chooseOpen ContainingFolder.

    New workspaces include the following default folders.

    Folder Used to organize:

    Scripts Script files used to run tests

    ExternalDatasheets Input data from external sources

    LocalDatasheets Input datamaintained inQA Wizard Pro

    You can rename the default folders or create new folders to group related scripts, datasheets, batches, andany other test files in the workspace. See Using folders, page 24.

    21

  • Sample scripts and applications

    Sample scripts and applicationsYou can use the sample scripts, datasheets, and applications installed with QAWizard Pro to understandhow scripts work and experiment with functionality.

    Applications

    The following applications are available to record and run sample scripts against.

    Application Description How to access it

    BugReporter

    Windows application with a form forsubmitting software bug reports.

    C:\Program Files (x86)\Perforce\QAWizard Pro\BugReport.exe

    SampleMSPaint

    Windows application for drawing shapes andimages.

    C:\Windows\System32\mspaint.exe

    WysiCorpCRM

    Windows .NET application with forms formanaging customer records.

    C:\Program Files (x86)\Perforce\QAWizard Pro\Wysi_CRM.exe

    WysiCorpWeb Site

    Web site with a form for submitting softwarebugs.

    Version 1.0www.wysicorp.com/wysicorp/login.phpVersion 2.0www.wysicorp.com/home.html

    Workspace

    The SampleScripts workspace includes scripts and datasheets used to perform various tests against thesample applications.

    The Test Suite script is set as themain script in the workspace. It runs a series of other sample scripts thatperform individual tests as part of a complete test suite. You can run themain script without opening it,making it easy to quickly run all scripts in the suite. See Setting and running amain script, page 74.

    The workspace includes additional sample scripts organized in the following folders.

    Folder Includes scripts that runagainst:

    Used to:

    BasicScripts

    Bug Reporter, SampleMSPaint, WysiCorp CRM,andWysiCorpWeb Site

    Perform simple actions to test common user tasks.

    Data-DrivenScripts

    WysiCorp CRM andWysiCorpWeb Site

    Runmultiple iterations of the same test with different setsof data from theWysiCorp Bugs Excel file orWysiCRMContacts datasheet.

    AdvancedScripts

    Bug Reporter, WysiCorpCRM,andWysiCorpWebSite

    Demonstrate advanced procedures and functions.

    To open the workspace, choose File >OpenWorkspace and select theSampleScripts.qawwspace file inthe C:\Users\\Documents\QA Wizard ProWorkspaces\SampleWorkspace directory.

    22

    http://www.wysicorp.com/wysicorp/login.phphttp://www.wysicorp.com/home.html

  • Creating workspaces

    Creating workspacesWorkspaces are used to organize scripts, related run reports, and any test data. All the files associated with aworkspace are stored in the same directory as the workspace file.

    Workspaces can grow quickly as you develop scripts. One way to keep workspaces organized is to think ofthem as test scenarios. For example, you are creating a regression suite forWysiWrite. One of the areas youwill test is the Tools menu, which contains eight options. To stay organized, create a folder forWysiWrite anda subfolder for the Tools menu and then create workspaces and subdirectories in the QAWizard ProWorkspaces directory for each option on the Tools menu. Your use of workspaces depends on yourorganization's testing process.

    Note: Youmust create at least one workspace before you record scripts.

    1. Choose File > New > New Workspace.

    The Add New Workspace dialog box opens.

    2. Enter a workspace File name.

    3. Select a location to save the workspace in or browse to select a different location.

    Workspace files are saved in C:\Users\\Documents\My Documents\QA Wizard ProWorkspaces by default, with a qawwspace extension.

    4. Click Save.

    The workspace is created.

    Tip: You can add existing files, such as scripts in different workspaces, images, and localdatasheets, to workspaces. See Adding existing files to workspaces, page 23 and Adding existinglocal datasheets, page 188.

    Adding existing files to workspacesYou can add existing files to a workspace to group related files.This helps ensure all required test files areavailable when scripts run. For example, you can add scripts from other workspaces, text files used to logscript information, images used in checkpoints or comparisons, load test .postdata files, and externaldatasheets that are stored locally to a workspace.

    When you add an existing file, it is shared and not copied. Any changes youmake to the file are available in allworkspaces it is in.

    Note: After adding files to a workspace, you can organize them in folders. See Using folders, page 24.

    1. Choose File > Add Existing File.

    The Add File dialog box opens.

    23

  • Using folders

    2. Browse to the file, select it, and click Open.

    The file is added to the workspace.

    Tip: To find a file in the workspace on the computer, right-click it and chooseOpen Containing Folder.

    Using foldersYou can create folders to organize the scripts, batches, and datasheets in a QAWizard Pro workspace.

    Note: New workspaces include Scripts, External Datasheets, and Local Datasheets folders by default.These folders can be renamed or removed.

    1. Choose File > New >New Folder.

    The Folder Information dialog box opens.

    2. Enter a Folder Name.

    3. Click OK.

    The folder is added to the workspace.

    24

  • Modifying workspace properties

    4. Select a folder to add an item.

    n To add an existing file, such as a script in a different workspace or images needed for scripts to runwithout failing, choose File >Add Existing File. See Adding existing files to workspaces, page 23.

    n To add a new batch file, chooseBatch > New Batch. See Creating batch files, page 83.

    n To add an existing batch file, chooseBatch > Add Existing Batch.

    n To add a datasheet, chooseData >Create Datasheet. See Creating Data-Driven Scripts, page 187.

    Tip: Drag items that are already added to the workspace into folders.

    Modifying workspace propertiesYou can change the workspace name and directory to store results reports in, and set Helix ALM and sourcecontrol integration options.

    1. Select the workspace in theWorkspace pane.

    2. Choose File > Properties.

    The Properties dialog box opens with the General tab selected.

    25

  • Opening workspaces

    3. Optionally enter a new Name.

    4. Enter aReports directory to store results reports in. Click Browse to select a location.

    5. Enter a Load test reports directory to store load test results reports in. Click Browse to select alocation.

    6. Click theHelix ALM tab tomodify the integration options. See Integrating with Helix ALM, page 265.

    7. Click the Source Control tab tomodify the integration options. See Configuring source controlintegration, page 285.

    8. Click OK to save the changes.

    Opening workspacesOpen a workspace to access scripts, related run reports, and test data.

    Keep the following inmind:

    n Only one workspace can be open at a time.

    n If the workspace is formatted for an earlier QAWizard Pro version, you are prompted to upgrade it or openit as read-only. Click Upgrade Workspace to upgrade it to the current version. The workspace file cannotbe reverted back after upgrading. Click Open as Read-Only to open it as read-only. You cannot modifyread-only workspaces.

    n If the workspace is in an unknown format, you cannot open it. It was most likely created in a newer versionof QAWizard Pro than the one you are using. You need to upgrade to the current QAWizard Pro version toopen it.

    1. Choose File > Open Workspace.

    TheOpenWorkspace dialog box opens.

    2. Select the workspace and click Open.

    The workspace opens.

    Tip: Choose File > Recent Workspaces to open a recently used workspace.

    26

  • Using Keyword View

    Using Keyword ViewKeyword View displays scripts in a grid format. Each script line is a statement, which specifies how QAWizard Pro interacts with the tested application.

    Tip: If you are a new QAWizard Pro user, youmay want to work in Keyword View to become familiar withthe program.

    Actions are grouped by the window they are performed on. The following information is displayed in the rowsand columns.

    Column name Description

    # Script step number; corresponds to the line number in Text View

    Action Statement that is performed

    Control Control the action is performed on; not displayed when viewing load test scripts

    Information Statement information, such as arguments

    Comment Script step comments

    Use theGUI statement editor to work with statements in Keyword View. To add a statement, chooseScript> Add Statement. To edit a statement, chooseScript > Edit Statement.

    Tip: You can also edit arguments directly in Keyword View. Click an Information cell and enter the value.

    27

  • Using Text View

    Using Text ViewText View displays scripts in a text-based editor and gives you access to the scripting language. Each scriptline in Text View is a statement, which specifies how QAWizard Pro interacts with the tested application.

    Note: You can customize the font and colors used in Text View. See Setting Text View font and coloroptions, page 34.

    Use one of the followingmethods to work with statements in Text View.

    n Use theGUI statement editor. To add a statement, chooseScript > Add Statement.To edit a statement,chooseScript > Edit Statement. If you are a new QAWizard Pro user, youmay want to use the GUIstatement editor.

    n Use code completion, which displays the available statements or actions as you type.

    n Manually type the statement.

    Tip: A sample workspace that includes both web andWindows scripts is installed with QAWizard Pro.To learnmore about Text View, youmay want to open a sample script, read the comments, andexperiment with the functionality. See Sample scripts and applications, page 22.

    Understanding script syntax

    Each statement has its own syntax rules. If you do not follow these rules, errors are returned when you run thescript. Keep the following inmind:

    n Each statement must be on one line.

    n Enclose text string values in double quotationmarks (e.g., "TextString").

    n Do not use any quotationmarks with variable or numeric values.

    n To specify amenu item by index, enclose the index number in square brackets ([]). For example, Window("WysiCorp CRM").Menu("MenuBar").Item("Options/[4]").Select().

    n The following escape characters are supported for all string literals: \n, \r, \t, \\, \' and \".

    28

  • Declaring variables in Text View

    n Slashes inmenu, ListView, and tree control text must be escaped for literal interpretation during playback.

    n Escape forward slashes with two backslashes (\\). For example, the following statement selects the'Find/Replace' item in the Edit menu: Window("Window").Menu("MenuBar").Item("Edit/Find\\/Replace").Select().

    n Escape backslashes with three backslashes (\\\). For example, the following statement selects the'Backlash -\' item in the Character List tree: Window("Window").Tree("List").Item("CharacterList/Backslash - \\\\").Select().

    n The scripting language is not case sensitive, with the following exceptions: when comparing strings inconditional statements or using the Checkpoint or Chr statement to check strings.

    n You can add spaces to a script to improve readability (e.g., it may be easier to read x = 10 than x=10).

    n Keywords, such as constants or strings, are displayed in different colors to help with readability.

    Note: You cannot switch between Keyword View and Text View until any syntax errors, which aredisplayed in the Errors pane, are resolved.

    About code completion

    Text View's code completion feature displays the available statements or actions as you type.

    n Enter an equal sign (=) to display a list of functions, which return values. Scroll through the list to select thefunction to use. Double-click the function or press Enter to add it to the script. Many functions are alsoavailable in the GUI statement editor.

    n Press the spacebar at the beginning of a line to display a list of allstatements. Scroll through the list andclick the statement you want to use. Double-click the statement or press Enter to add it to the script.

    n Enter a period (.) after a window or control to display a list of actions or objects. The items in this listchange based on the selected window or control. Scroll through the list to select the action or object youwant to use. Double-click the action or object or press Enter to add it to the script.

    n Enter Script and a period to display a list of script actions.

    n Enter Browser, a web page name in quotes (optional), and a period to display a list of browser actions. Forexample, Browser("WysiCorp Login").

    n Enter Window, a window name in quotes, and a period to display a list of window control types, such asButton or Listbox. For example, Window("Feedback").

    n Enter Window, a window name in quotes, a period, a control type, a control name in quotes, and a period todisplay a list of control type actions, such as Click or TypeText. For example, Window("Feedback").Editbox("editboxCompany").

    Declaring variables in Text ViewQAWizard Pro includes script and repository variables, which are both used to store information.

    n Script variables are defined in a script and can only be used in the script they are created in.

    n Repository variables are defined in the application repository and can be used in all scripts recorded or runagainst an application. See Using repository variables in scripts, page 220.

    Variables can be declared explicitly or implicitly. The variable value can be a text string, expression, or valuefrom an associated datasheet.

    29

  • Declaring variables in Text View

    Variables can be explicitly declared using the Dim statement. Variables can also be implicitly declared byassigning a value.Dim sampleA

    sampleA = 10

    sampleB = 20

    PrintLn sampleA

    PrintLn sampleB

    sampleA = "Hi"

    sampleB = "there"

    PrintLn sampleA

    PrintLn sampleB

    The variable type is not explicitly declared. Notice that the variables are initially assigned an integer and laterassigned a text string.

    Note: Variables do not have a specific type (e.g., integer or string). It is much easier to declare variablesimplicitly by using the variable name in a script. If you use arrays, youmust use the Dim statement todeclare variables explicitly.

    If you create a variable called by other scripts, the variable namemust conform to the following rules:

    n Must start with an alphabetic character

    n Cannot contain spaces

    n Can only contain alphanumeric characters or underscore characters

    Variable scope

    Variable values are persistent in called scripts. Keep the following inmind:

    n If a script is called several times in one run, the values stored in the variables are persistent. The secondtime the script is called, the variables are populated with the values from when the script exited the firsttime.

    n Called scripts use the repository variable values from the script that called them unless they are declaredexplicitly or the ClearContext statement is used to clear the connection to the repository in the calledscript.

    Assigning variable values

    You generally declare variables and assign values at the same time.

    Use the following format to declare a variable and assign a value to it:VariableName = value

    VariableName is the variable name and value is the value to assign to the variable. For example:x = 5

    myUser = "WebUser"

    30

  • Declaring arrays in Text View

    Tip: As you work with a script, you can view a list of variables, functions, and subroutines defined in thescript in the Definition field at the top of the Script pane. To go directly to the script line where a variable isdefined, select it in the Definition field or right-click a script line that references it and chooseGoToDefinition. See Finding variable, function, and subroutine definitions in scripts, page 153.

    Calling script variables from another script

    Script variables are defined at the script level. To use a script variable with another script in the sameworkspace, youmust first call that script using the Script.CallScript, page 528 statement. You do not have toimmediately use the variable.

    For example, you create a variable namedUser in the Login script. You want to use the User variable in a newscript named TestLogin. First, you call the Login script:Script.CallScript("Login")

    To use the variable, enter the called script name, a period, then the variable name. For example:PrintLn Login.User

    Note: You can also use the GetScriptVariable, page 442 and SetScriptVariable, page 547 statements toaccess another script and work with variables.

    Declaring arrays in Text ViewAn array is a variable that contains a series of values. The variable value can be a text string, expression, orvalue from an associated datasheet.

    Variables can be declared explicitly or implicitly. Youmust use the Dim statement to declare array variablesexplicitly. Use the following format to declare an array:Dim ArrayName(x)

    ArrayName is the array variable name and x is the number of elements. For example:Dim Users(2)

    This creates an array with two elements. Arrays are one-based, so the first array element is indexed 1 and thelast is the number specified when declaring the array.

    QAWizard Pro supports arrays with up to three dimensions. To declaremultiple dimensions, separate thenumbers with commas. In the following example, the TestTable variable is a two-dimensional array thatincludes three rows and one column:Dim TestTable(3,1)

    Note: In a two-dimensional array, the first number is always the number of rows and the second number isthe number of columns.

    Assigning array values

    Each element in an array can be accessed by an index number. In the previous example, Dim Users (2) wasdeclared as the array. Values are assigned to the array elements:Users(1)="ClientUser"

    Users(2)="RemoteUser"

    To store values in an array with more than one dimension youmust reference each dimension. For example:

    31

  • Creating functions and subroutines in Text View

    TestTable(3,2) = 28

    Declaring dynamic arrays

    You can use dynamic arrays to change an array size during script playback. Use dynamic arrays if you wantto declare an array and do not know the size, or to resize an existing array.

    Declare the array using the Dim statement and then use the ReDim statement to resize it. For example:Dim Users(3)

    Users(1)="User1"

    Users(2)="User2"

    Users(3)="User3"

    ReDim Users(5,2)

    This creates an array with three elements and then the ReDim statement resizes the array to be two-dimensional with five rows and two columns. The values assigned to the array are cleared when the ReDimstatement is called.

    To preserve the contents of the array when it is resized, use the Preserve keyword. For example:Dim Users(3)

    Users(1)="User1"

    Users(2)="User2"

    Users(3)="User3"

    ReDim Preserve Users(10)

    This creates an array with three elements and then is resized to 10 elements. The three assigned values(User1 through User3) are preserved in the array when the ReDim statement resizes it.

    Creating functions and subroutines in Text ViewYou can define functions and subroutines to organize and structure scripts for easier maintenance. Youmaywant to create subroutines and functions for commonly performed actions such as logging in to an application,or for generating data, such as unique passwords.

    You can create subroutines or functions in individual scripts, but they aremost often created in scripts calledby other scripts. You can also createmultiple functions or subroutines in the called script.

    If you store functions or subroutines in a script called by other scripts, the script namemust conform to thefollowing rules:

    n Must start with an alphanumeric character

    n Cannot contain spaces

    n Can only contain alphanumeric characters or underscore characters

    Tip: As you work with a script, you can view a list of variables, functions, and subroutines defined in thescript in the Definition field at the top of the Script pane. To go directly to the script line where a function orsubroutine is defined, select it in the Definition field or right-click a script line that references it and chooseGoToDefinition. See Finding variable, function, and subroutine definitions in scripts, page 153. You canthen click theGo Back andGoForward toolbar buttons to navigate back and forward through the areasyou worked in.

    32

  • Creating functions and subroutines in Text View

    Declaring subroutines

    Use the Sub...End Sub statements to declare subroutines. Subroutines do not return values. For example,a=Sub1 results in an error because Sub1 cannot return a value.

    Use the following format to declare subroutines:Sub Name (arg1, arg2,)

    [statements]

    End Sub

    Declaring functions

    Use the Function...End Function statements to declare functions. Functions can accept an unlimited numberof arguments andmust always return a value. You can define the return value to be whatever you need. Theexpression is evaluated and results are returned to the calling statement or script. Functions are generallyassigned to a variable or printed to the Output pane.

    Use the following format to declare functions:Function Name (arg1, arg2,)

    [statements]

    Return result

    End Function

    Returning values from functions

    To return a value from a function, use the Return keyword. You do not have to assign the value to the functionname. The following examples show how the return keyword is used.Function myFuncReturnCheck(value)

    Return value

    End Function

    retrieved = myFuncReturnCheck("string")

    PrintLn(retrieved)

    Calling functions and subroutines within a script

    To call a function or subroutine in the same script, refer to it by name. For example, you create a functionnamed timeWithDashes. To use it, add the following line to a script:PrintLn("Date and time script ran:" + timeWithDashes())

    Calling functions and subroutines from another script

    To call a function or subroutine from another script, youmust first call that script using the Script.CallScript,page 528 statement. You do not have to immediately use the function or subroutine. To run the function orsubroutine, enter the called script name, a period, then the function or subroutine name:ScriptName.FunctionName/SubroutineName

    Note: To avoid syntax errors, the called script namemust start with an alphabetic character, cannotcontain spaces, and can only contain alphanumeric or underscore characters.

    33

  • Setting Text View font and color options

    For example, you created a script namedUtilities that stores subroutines. Add the following lines to the scriptto call theWebLogin subroutine:Script.CallScript("Utilities")

    Utilities.WebLogin()

    Setting Text View font and color optionsThese options control the font and colors used in Text View.

    1. Choose Tools > Options.

    TheOptions dialog box opens.

    2. Click the Text View tab.

    3. Select the Font andSize to use for all items displayed in Text View.

    4. Select aDisplay item andmake any changes. A preview of the color and style is displayed in the Samplearea.

    n Select an Item foreground and Item background color from the list or click to select a customcolor. Select Same as Plain Text to set the foreground color to match the color for plain text (LineNumbers, CollapsedOutline Block, Comment, Current Statement (Debug), Keyword, String, andSyntax Error only). Select Default to use the QAWizard Pro default color.

    n Select Bold, Italic, orUnderline to apply styles to the text.

    Note: Custom colors are not available for all display items.

    5. Click Reset to Defaults to reset all formatting to the QAWizard Pro default values.

    6. Click OK to save the changes.

    34

  • Customizing QA Wizard ProYou can customize the QAWizard Pro interface, toolbars, and keyboard shortcuts to suit your personalpreference and help you work more efficiently.

    Customizing the interfaceQAWizard Pro's advanced docking systemmakes it easy to customize the layout of panes and windows.You can close, dock and undock, auto hide, float, andmove panes. The Script pane cannot bemodified.

    Note: ChooseView > Reset Layout to reset the QAWizard Pro interface.

    Auto hiding panes

    Auto hide allows unused panes to be hidden and conserve screen space for other panes and windows. Autohide panes are collapsed into a tab.

    1. To auto hide a pane, click the pushpin icon in the pane title bar. You can also right-click the pane title barand chooseAuto Hide.

    2. To view a hidden pane, mouse over the tab. The hidden pane slides out.

    3. To disable auto hide, mouse over the tab then click the pushpin icon in the pane title bar. You can alsoright-click the pane title bar and chooseAuto Hide.

    Undocking panes

    Panes can be undocked and displayed in a floating window. If you use floating windows on a small monitor,they may be hidden by other panes.

    1. To undock and float a pane, double-click the pane title bar. You can also right-click the pane title bar andchoose Floating.

    2. Double-click the pane title bar to redock the pane.

    Moving panes

    You canmove docked panes to a new position or create a tab from a docked pane.

    1. Drag the pane you want to move.

    A docking guide opens, which shows where and how you can dock the panel.

    35

  • Customizing toolbars

    2. To dock the pane in a new location, drag the pane to the desired location.

    3. To dock the pane as a tab, drag the pane to the new location and click the center guide button.

    Hiding panes

    To leave themost workspace for other windows, youmay want to hide panes you do not use.

    1. To hide a pane, right-click the pane title bar and chooseHide.

    2. To view a hidden or closed pane, chooseView and click the pane name.

    Customizing toolbarsThe default toolbar, which is namedMain, includes buttons for themost commonly used commands. You canadd or remove buttons to the toolbar or create your own custom toolbars. You can also display or hide otherbuilt-in toolbars, such as the Repository or Debug toolbar.

    1. Choose Tools > Customize Toolbars.

    The Customize dialog box opens with the Toolbars tab selected.

    2. Select or clear a check box to display or hide a toolbar.

    Note: You can also chooseView > Toolbars to display or hide toolbars.

    3. Click New to create