Online SAP Testing Training is an experienced SAP Consulting and Training institute to deliver highest quality solutions to our clients to meet the requirement with consistency.
We are committed to helping you train a handful of employees or your entire organization on software essentials and advanced techniques. Our comprehensive online virtual Training libraries cover hot topics related to SAP Testing Techniques.
Our flexible and scalable options are well-suited for companies of any size. We work with leading global organizations to positively impact workforce productivity and efficiency. Our solutions are proven to increase utilization of software investments and provide the confidence to continue to invest as new software applications become available.
SVR Technologies providing the course content of QTP. It was given by our experts to improve the knowledge of the readers which helps you in interview. For more details about other IT courses please visit http://www.svrtechnologies.com/
Quick Test Professional (QTP) is automation testing tool that allows testing of applications by automating common tasks like recording, playback, and validating results. The QTP testing process involves 7 main phases including preparing the test environment, recording tests, enhancing tests with parameters and checkpoints, running tests, and analyzing results. QTP uses objects, actions, checkpoints and other features to model tests at different levels of the application under test. Test results can be stored and reported using features like the object repository, test reports and integration with other tools.
JUnit is the de facto standard in Java testing. Yet many advanced JUnit features are little known and poorly understood. This session reviews some lesser-known features of JUnit, along with a few associated libraries, that can make your unit tests more powerful, expressive, and fun. The session is intended for Java developers, lead developers, and architects trying to introduce good testing practices into their teams.
Quick Test Professional (QTP) is a functional testing tool made by Mercury Interactive that uses VBScript for test automation. It works by recording user actions and generating a test script. There are three main types of recording in QTP: normal, analog, and low-level recording. QTP supports testing of web, Java, .NET, and other applications and environments. The document provides details on various QTP concepts like object repositories, checkpoints, data-driven testing, and more.
Unit testing involves writing code to test individual units or components of an application to ensure they operate as intended. A unit test targets a specific function or class and ensures the code works correctly. A test suite is a collection of test cases that test a module. Frameworks like JUnit simplify the unit testing process and allow for test automation. JUnit tests are created in the same project structure with a "Test" suffix and use annotations to define test cases and suites. Tests can then be run and results analyzed to measure code coverage.
MXUnit is a testing framework for ColdFusion that allows testing of CFC components. It is one tool in a tester's toolkit for test-driven development. MXUnit provides a framework for writing test cases with setup, teardown, and assertion methods. Tests can be run individually or as part of a test suite from a browser.
The document provides an interview questions related to Quick Test Professional (QTP). It includes 27 questions covering various topics like object repository, recording and running tests, parameters, checkpoints, and more. The questions would help assess a candidate's knowledge of key QTP concepts and capabilities.
The document provides an overview of Quick Test Professional (QTP), a test automation tool. It describes key aspects of QTP including the testing process, add-ins, recording and running tests, the object repository, object spy, object recognition, synchronization, checkpoints, parameters, actions, recovery scenarios, and programmatic object identification without using the object repository.
SVR Technologies providing the course content of QTP. It was given by our experts to improve the knowledge of the readers which helps you in interview. For more details about other IT courses please visit http://www.svrtechnologies.com/
Quick Test Professional (QTP) is automation testing tool that allows testing of applications by automating common tasks like recording, playback, and validating results. The QTP testing process involves 7 main phases including preparing the test environment, recording tests, enhancing tests with parameters and checkpoints, running tests, and analyzing results. QTP uses objects, actions, checkpoints and other features to model tests at different levels of the application under test. Test results can be stored and reported using features like the object repository, test reports and integration with other tools.
JUnit is the de facto standard in Java testing. Yet many advanced JUnit features are little known and poorly understood. This session reviews some lesser-known features of JUnit, along with a few associated libraries, that can make your unit tests more powerful, expressive, and fun. The session is intended for Java developers, lead developers, and architects trying to introduce good testing practices into their teams.
Quick Test Professional (QTP) is a functional testing tool made by Mercury Interactive that uses VBScript for test automation. It works by recording user actions and generating a test script. There are three main types of recording in QTP: normal, analog, and low-level recording. QTP supports testing of web, Java, .NET, and other applications and environments. The document provides details on various QTP concepts like object repositories, checkpoints, data-driven testing, and more.
Unit testing involves writing code to test individual units or components of an application to ensure they operate as intended. A unit test targets a specific function or class and ensures the code works correctly. A test suite is a collection of test cases that test a module. Frameworks like JUnit simplify the unit testing process and allow for test automation. JUnit tests are created in the same project structure with a "Test" suffix and use annotations to define test cases and suites. Tests can then be run and results analyzed to measure code coverage.
MXUnit is a testing framework for ColdFusion that allows testing of CFC components. It is one tool in a tester's toolkit for test-driven development. MXUnit provides a framework for writing test cases with setup, teardown, and assertion methods. Tests can be run individually or as part of a test suite from a browser.
The document provides an interview questions related to Quick Test Professional (QTP). It includes 27 questions covering various topics like object repository, recording and running tests, parameters, checkpoints, and more. The questions would help assess a candidate's knowledge of key QTP concepts and capabilities.
The document provides an overview of Quick Test Professional (QTP), a test automation tool. It describes key aspects of QTP including the testing process, add-ins, recording and running tests, the object repository, object spy, object recognition, synchronization, checkpoints, parameters, actions, recovery scenarios, and programmatic object identification without using the object repository.
This document provides answers to frequently asked questions about Quick Test Professional (QTP). It discusses QTP features and benefits, differences between versions 6.5 and 8.2, how to handle exceptions using recovery scenarios, uses of output values, how to use the object spy, object repository file extensions, how QTP recognizes objects, and properties used to identify browsers and web pages. It also provides examples of using COM interfaces and creating objects in QTP scripts.
The document discusses strategies for testing a web application, including:
- Using static analysis tools like FindBugs to analyze source code.
- Using QUnit to test JavaScript functions and refactoring code to make it testable.
- Using Selenium to automate UI testing and catch bugs by verifying page content.
- Implementing continuous integration using an existing Cruise Control server to automatically run tests.
The document discusses various topics related to QuickTest Professional (QTP) including:
1. The V-model is a software development model where verification and validation activities are done parallel to requirements gathering and design.
2. Descriptive programming in QTP allows testers to perform actions on objects not in the object repository by providing a description to identify the object.
3. Parameterization in QTP replaces fixed values in tests with parameters, greatly increasing flexibility. Data driving uses parameterization to run a test with different data sets.
4. Regular expressions can be used to handle dynamic objects in QTP whose properties may change between test runs.
HP QuickTest Professional is an automated testing software that captures, verifies, and replays user interactions on applications to help identify effects and report issues. It has features like object spying, checkpoints, keyword-driven testing, and integrated reporting. QuickTest Professional supports testing common applications and technologies through its default functionality and add-ins. It involves creating test scripts by recording scenarios, executing the scripts to test applications, and analyzing results to find defects.
The document provides an overview of Quick Test Professional (QTP), a test automation tool. It discusses key aspects of QTP including recording and running tests, using object repositories, checkpoints, parameters, actions, recovery scenarios, and programmatic descriptions.
The document discusses JUnit 5, the next generation of the JUnit testing framework for Java. Key aspects include a new programming model using extensions, support for Java 8 features, and ways to migrate from earlier JUnit versions. The new framework consists of the JUnit Platform launcher, the JUnit Jupiter API for writing tests, and the JUnit Vintage engine for running JUnit 3 and 4 tests.
Unit testing with JUnit can be done using JUnit 3.x or 4.x frameworks. Key aspects include writing test cases as Java classes that extend TestCase and contain test methods starting with "test", using assertion methods like assertTrue and assertEquals to validate outcomes, and running tests from Eclipse. JUnit 4.x introduced annotations like @Before, @Test, and @After to respectively set up objects before each test, identify test methods, and tear down objects after tests.
QuickTest Professional 9.2 is an automated testing tool from HP that allows users to record, edit, parameterize, debug and run functional tests on applications. Key features include ease of use, support for various programming languages and technologies, object recognition capabilities, checkpoints for verification, data-driven testing using parameters and recovery scenario management.
Thermostat example demonstrates dependency injection principles. Initially, the naive Thermostat class directly creates its dependencies like the TemperatureSensor class. This leads to tight coupling. To decouple the classes, an interface TemperatureSensor is extracted. The dependency is then injected via the constructor rather than created internally. This allows injecting different sensor implementations and makes the Thermostat class more reusable and testable.
This document discusses various techniques for unit testing in Java with JUnit, including naming tests clearly, using Hamcrest matchers for assertions, writing parameterized tests, using JUnit rules, and measuring code coverage. It provides examples of how to write tests that follow best practices and leverage JUnit's capabilities for parameterized testing, timeouts, error collection, and more. It also discusses running tests in parallel and measuring code coverage in IDEs like IntelliJ and Eclipse.
Unit testing tests individual units of source code to determine if they are fit for use. It is different from integration testing, which combines modules, and validation testing, which checks that a system meets specifications. The goal of unit testing is to isolate and test each part of a program to show that individual parts are correct. Unit testing provides benefits such as finding problems early, facilitating automated testing and change, and improving software quality. Guidelines for effective unit testing include knowing the objective of each test, making tests self-sufficient, ensuring tests are deterministic, following naming conventions, duplicating code for readability, testing results not implementation, and using isolation frameworks.
1. The document discusses various topics related to testing JavaScript code including unit testing, test-driven development (TDD), the QUnit testing framework, mocking AJAX requests, and testing user actions.
2. Key points about QUnit include that it is a JavaScript unit testing framework used to test jQuery, jQuery UI, and other code. It allows writing tests, assertions, handling asynchronous code, and grouping tests into modules.
3. Mocking AJAX requests is discussed as a way to test code that relies on asynchronous requests without needing a server. The Mockjax library allows intercepting and simulating AJAX responses.
This document provides an overview of testing in Grails and Spock testing framework. It discusses unit testing, the advantages of unit testing like facilitating change and improving quality. It also covers Spock basics like specification, fields, blocks, expectations. It demonstrates how to write unit tests in Spock including mocking, stubbing, data-driven testing and verification of interactions. The document recommends using the code coverage plugin to analyze test coverage.
Dependency injection with unity 2.0 Dmytro Mindra LohikaAlex Tumanoff
This document discusses dependency injection (DI) and the Unity DI container. It begins with an overview of DI and its benefits for modularity, testability and adaptability. It then provides examples of DI approaches like composition, factories and the DI pattern. The document demonstrates how Unity can be used to configure DI through registration, injection types and lifetime managers. It concludes with some limitations, performance considerations and additional DI frameworks.
Unit testing allows testing individual units of code in isolation using Spock, a testing framework for Java and Groovy. Spock specifications extend Specification and contain fixture methods like setup() and feature methods to define test cases and expected behavior. Feature methods use blocks like when, then, and expect to define stimuli and verify outputs. Spock supports data-driven testing using a data table and mocking dependencies using Mock() to focus testing on the unit. Basic Spock commands include running tests with grails test-app and viewing test reports.
This document discusses unit testing in Java. It introduces unit testing and the JUnit framework. It explains how to set up a testing environment in Eclipse and describes best practices for writing unit tests. These include avoiding conditional logic and loops, using descriptive method and assertion names, and separating tests by type. Advantages of unit testing include speed, isolation, safety when refactoring, and serving as documentation. Disadvantages include potential high maintenance costs from unnecessary tests. Similar testing frameworks exist for other languages like C#, C++, and Python.
This document provides an introduction to JUnit, a unit testing framework for Java. It discusses why unit testing is important, how to write and organize JUnit tests, how to use assertions and mocks, and how to integrate JUnit with IDEs and build tools like Maven and Ant. Key aspects covered include the benefits of unit testing, the core components and design of JUnit, best practices for test-driven development and test maintenance, and resources for learning more about JUnit.
A presentation on JUnit Pioneer given at Fortitude Technologies on Mar. 4, 2021. JUnit Pioneer is an extension library for JUnit 5 (Jupiter).
Sample code on GitHub at:
https://github.com/sleberknight/junit-pioneering-presentation-code
JUnit Pioneer home page:
https://junit-pioneer.org
The document discusses the V-model software development process. It explains that in the V-model, verification activities such as testing occur parallel to validation activities from initial requirements elicitation through final acceptance testing. Both the left and right sides of the "V" represent progressive testing stages from unit to system level.
The document discusses Quick Test Professional (QTP), a test automation tool. It provides information on QTP features like keyword driven testing, data driven testing, and error handling. It also discusses how to get the QTP software, use the recovery scenario manager to handle exceptions, output values to view runtime application values, and use the object spy feature. Finally, it asks questions about common scripting languages used with QTP, examples of using COM interfaces in QTP projects, and differentiating between per action and shared object repositories.
This document provides answers to frequently asked questions about Quick Test Professional (QTP). It discusses QTP features and benefits, differences between versions 6.5 and 8.2, how to handle exceptions using recovery scenarios, uses of output values, how to use the object spy, object repository file extensions, how QTP recognizes objects, and properties used to identify browsers and web pages. It also provides examples of using COM interfaces and creating objects in QTP scripts.
The document discusses strategies for testing a web application, including:
- Using static analysis tools like FindBugs to analyze source code.
- Using QUnit to test JavaScript functions and refactoring code to make it testable.
- Using Selenium to automate UI testing and catch bugs by verifying page content.
- Implementing continuous integration using an existing Cruise Control server to automatically run tests.
The document discusses various topics related to QuickTest Professional (QTP) including:
1. The V-model is a software development model where verification and validation activities are done parallel to requirements gathering and design.
2. Descriptive programming in QTP allows testers to perform actions on objects not in the object repository by providing a description to identify the object.
3. Parameterization in QTP replaces fixed values in tests with parameters, greatly increasing flexibility. Data driving uses parameterization to run a test with different data sets.
4. Regular expressions can be used to handle dynamic objects in QTP whose properties may change between test runs.
HP QuickTest Professional is an automated testing software that captures, verifies, and replays user interactions on applications to help identify effects and report issues. It has features like object spying, checkpoints, keyword-driven testing, and integrated reporting. QuickTest Professional supports testing common applications and technologies through its default functionality and add-ins. It involves creating test scripts by recording scenarios, executing the scripts to test applications, and analyzing results to find defects.
The document provides an overview of Quick Test Professional (QTP), a test automation tool. It discusses key aspects of QTP including recording and running tests, using object repositories, checkpoints, parameters, actions, recovery scenarios, and programmatic descriptions.
The document discusses JUnit 5, the next generation of the JUnit testing framework for Java. Key aspects include a new programming model using extensions, support for Java 8 features, and ways to migrate from earlier JUnit versions. The new framework consists of the JUnit Platform launcher, the JUnit Jupiter API for writing tests, and the JUnit Vintage engine for running JUnit 3 and 4 tests.
Unit testing with JUnit can be done using JUnit 3.x or 4.x frameworks. Key aspects include writing test cases as Java classes that extend TestCase and contain test methods starting with "test", using assertion methods like assertTrue and assertEquals to validate outcomes, and running tests from Eclipse. JUnit 4.x introduced annotations like @Before, @Test, and @After to respectively set up objects before each test, identify test methods, and tear down objects after tests.
QuickTest Professional 9.2 is an automated testing tool from HP that allows users to record, edit, parameterize, debug and run functional tests on applications. Key features include ease of use, support for various programming languages and technologies, object recognition capabilities, checkpoints for verification, data-driven testing using parameters and recovery scenario management.
Thermostat example demonstrates dependency injection principles. Initially, the naive Thermostat class directly creates its dependencies like the TemperatureSensor class. This leads to tight coupling. To decouple the classes, an interface TemperatureSensor is extracted. The dependency is then injected via the constructor rather than created internally. This allows injecting different sensor implementations and makes the Thermostat class more reusable and testable.
This document discusses various techniques for unit testing in Java with JUnit, including naming tests clearly, using Hamcrest matchers for assertions, writing parameterized tests, using JUnit rules, and measuring code coverage. It provides examples of how to write tests that follow best practices and leverage JUnit's capabilities for parameterized testing, timeouts, error collection, and more. It also discusses running tests in parallel and measuring code coverage in IDEs like IntelliJ and Eclipse.
Unit testing tests individual units of source code to determine if they are fit for use. It is different from integration testing, which combines modules, and validation testing, which checks that a system meets specifications. The goal of unit testing is to isolate and test each part of a program to show that individual parts are correct. Unit testing provides benefits such as finding problems early, facilitating automated testing and change, and improving software quality. Guidelines for effective unit testing include knowing the objective of each test, making tests self-sufficient, ensuring tests are deterministic, following naming conventions, duplicating code for readability, testing results not implementation, and using isolation frameworks.
1. The document discusses various topics related to testing JavaScript code including unit testing, test-driven development (TDD), the QUnit testing framework, mocking AJAX requests, and testing user actions.
2. Key points about QUnit include that it is a JavaScript unit testing framework used to test jQuery, jQuery UI, and other code. It allows writing tests, assertions, handling asynchronous code, and grouping tests into modules.
3. Mocking AJAX requests is discussed as a way to test code that relies on asynchronous requests without needing a server. The Mockjax library allows intercepting and simulating AJAX responses.
This document provides an overview of testing in Grails and Spock testing framework. It discusses unit testing, the advantages of unit testing like facilitating change and improving quality. It also covers Spock basics like specification, fields, blocks, expectations. It demonstrates how to write unit tests in Spock including mocking, stubbing, data-driven testing and verification of interactions. The document recommends using the code coverage plugin to analyze test coverage.
Dependency injection with unity 2.0 Dmytro Mindra LohikaAlex Tumanoff
This document discusses dependency injection (DI) and the Unity DI container. It begins with an overview of DI and its benefits for modularity, testability and adaptability. It then provides examples of DI approaches like composition, factories and the DI pattern. The document demonstrates how Unity can be used to configure DI through registration, injection types and lifetime managers. It concludes with some limitations, performance considerations and additional DI frameworks.
Unit testing allows testing individual units of code in isolation using Spock, a testing framework for Java and Groovy. Spock specifications extend Specification and contain fixture methods like setup() and feature methods to define test cases and expected behavior. Feature methods use blocks like when, then, and expect to define stimuli and verify outputs. Spock supports data-driven testing using a data table and mocking dependencies using Mock() to focus testing on the unit. Basic Spock commands include running tests with grails test-app and viewing test reports.
This document discusses unit testing in Java. It introduces unit testing and the JUnit framework. It explains how to set up a testing environment in Eclipse and describes best practices for writing unit tests. These include avoiding conditional logic and loops, using descriptive method and assertion names, and separating tests by type. Advantages of unit testing include speed, isolation, safety when refactoring, and serving as documentation. Disadvantages include potential high maintenance costs from unnecessary tests. Similar testing frameworks exist for other languages like C#, C++, and Python.
This document provides an introduction to JUnit, a unit testing framework for Java. It discusses why unit testing is important, how to write and organize JUnit tests, how to use assertions and mocks, and how to integrate JUnit with IDEs and build tools like Maven and Ant. Key aspects covered include the benefits of unit testing, the core components and design of JUnit, best practices for test-driven development and test maintenance, and resources for learning more about JUnit.
A presentation on JUnit Pioneer given at Fortitude Technologies on Mar. 4, 2021. JUnit Pioneer is an extension library for JUnit 5 (Jupiter).
Sample code on GitHub at:
https://github.com/sleberknight/junit-pioneering-presentation-code
JUnit Pioneer home page:
https://junit-pioneer.org
The document discusses the V-model software development process. It explains that in the V-model, verification activities such as testing occur parallel to validation activities from initial requirements elicitation through final acceptance testing. Both the left and right sides of the "V" represent progressive testing stages from unit to system level.
The document discusses Quick Test Professional (QTP), a test automation tool. It provides information on QTP features like keyword driven testing, data driven testing, and error handling. It also discusses how to get the QTP software, use the recovery scenario manager to handle exceptions, output values to view runtime application values, and use the object spy feature. Finally, it asks questions about common scripting languages used with QTP, examples of using COM interfaces in QTP projects, and differentiating between per action and shared object repositories.
The document discusses various topics related to Quick Test Professional (QTP), including:
1. The key features and benefits of QTP, such as keyword-driven testing and data-driven testing features
2. How to get QTP software and access tutorial and evaluation resources
3. How to use the recovery scenario manager in QTP to handle unexpected errors during test runs
HP Quick Test Professional is automated testing software that performs functional and regression testing through a user interface. It identifies objects in an application and performs operations like clicks and keyboard inputs. Tests are created using VBScript to specify test procedures and manipulate application objects. An automation framework provides support for automated testing by standardizing assumptions, concepts and tools to reduce maintenance costs when tests need to be updated.
Quick Test Pro (QTP) is a graphical interface record-playback automation tool that can test web, Java, and Windows applications. It introduces keyword-driven testing that allows for fast test creation and easier maintenance. QTP identifies objects with Unique Smart Object Recognition and enables thorough validation of applications through checkpoints. QTP supports functional testing across many enterprise environments including Windows, web, .NET, Java/J2EE, and more.
Quick Test Professional (QTP) is an automated testing tool that allows users to test applications and author test scripts using a keyword-driven and GUI-based approach. The document discusses various QTP concepts like object repositories, checkpoints, parameters, and exception handling. It also provides sample questions and answers related to using features of QTP like object identification, data driving tests, handling dynamic objects, and comparing different types of object repositories.
The document discusses interview questions related to HP Quick Test Professional (QTP). It includes 25 questions covering topics like QTP features, object repository, descriptive programming, scripting languages, and commonly used functions.
BugRaptors Test Automation Accelerator helps clients overcome challenges, and speed up the automation of their functional and regression testing. The robust framework provided by the solution enables early automation, which helps develop test scripts during the design and development phases of the software development life cycle (SDLC). BugRaptors Test Automation Accelerator enables end-to-end test automation of applications spanning multiple technologies. It supports multiple test tools such as Selenium IDE, Selenium WebDriver and QTP etc. It allows frequent releases of applications by reducing the maintenance effort without compromising on the quality of testing.
This document provides answers to frequently asked questions (FAQs) about Quick Test Professional (QTP). It discusses features and benefits of QTP, differences between versions 6.5 and 8.2, how to handle exceptions using recovery scenarios, uses of output values, how to use the object spy, object repository file extensions, how QTP recognizes objects, and properties used to identify browsers and web pages. It also provides examples of using COM interfaces and creating objects in QTP scripts.
Quick Test Pro (QTP) is an automated testing tool that allows users to test applications across different environments. It features keyword-driven testing, object recognition, auto-documentation of tests, checkpoints for validation, and integration with other Mercury testing tools. The document discusses various QTP concepts like features, handling exceptions, using output values, object spy, parameterization, views, reports, supported environments, testing process, interface, object recognition, object repositories, checkpoints, and more.
Quick Test Pro (QTP) is an automated testing tool that allows users to test applications across different environments. It features keyword-driven testing, object recognition, auto-documentation of tests, checkpoints for validation, and integration with other Mercury testing products. The document discusses various QTP concepts like features, handling exceptions, using output values, object spy, parameterization, views, reports, supported environments, testing process, interface, object recognition, object repositories, checkpoints, and more.
Automation testing involves recording user actions on an application and verifying its behavior. Quick Test Professional (QTP) is an automation testing tool that follows a 7 step process: 1) preparing the test environment; 2) recording user actions; 3) enhancing the test with checkpoints and parameters; 4) debugging the test; 5) running the test; 6) analyzing results; and 7) reporting defects. QTP allows dividing tests into logical units called actions to make tests more modular and reusable across multiple tests.
This document provides an overview of HP QuickTest Professional (QTP) automation testing. Some key points:
- QTP allows automating manual test cases to shorten testing cycles and improve efficiency. Automation testing is used for regression testing and testing from load, performance, and stress perspectives.
- The main advantages of automation include tests being repeatable, reliable, fast, and reusable on different versions of an application. Automated tests can also perform more complex operations than manual testing.
- QTP supports testing various technologies including web, mobile, desktop, and API/web services applications. It provides different views for creating, editing, and analyzing automated tests.
- Setting up automated testing involves creating object
QTP Interview Questions & Answers discusses various topics related to HP QuickTest Professional (QTP) software. Some key points covered include:
- The different environments and applications that QTP can test, including web, desktop, Java, and more.
- The two types of object repositories in QTP: shared and per-action.
- How QTP uniquely identifies GUI objects using their properties.
- Different recording modes in QTP like normal, low-level, and analog recording.
- Importing and exporting data between QTP and Excel files.
- Handling exceptions and errors using recovery scenarios and On Error statements.
QTP is an automation testing tool used to automate testing of web and client applications. It allows recording and playback of user actions to test applications. Key features include integration with Quality Center, improved results analysis, and support for additional technologies through add-ins. When running a test in QTP, it performs the recorded steps and displays results, allowing drill down to individual object levels.
The document provides an overview of the Quick Test Professional (QTP) automated testing process and features. It discusses the 7 main phases of QTP testing including preparing test cases, recording sessions, enhancing tests with logic/parameters, debugging, and reporting results. It also summarizes key QTP components like the object repository, object spy, recording modes, test object model, checkpoints, transactions, actions, and integration with other HP testing tools.
The document describes a hybrid automation testing framework that combines both keyword-driven and data-driven testing. The hybrid framework provides modularity through nesting of test scripts and reusable library files. It supports multiple projects, test cases, automatic regression testing, and generates detailed email and log reports. The framework architecture includes layers for the core framework, applications, and components like scenario drivers, script drivers, object repositories, test data, and reusable functions. Test execution involves loading the scenario, executing scripts and keywords, logging results, and generating detailed reports.
This document discusses automation testing using QuickTest Professional (QTP). It covers topics like actions, function libraries, and debugging tests. Actions help divide tests into logical units and can be reusable or non-reusable. Function libraries allow storing reusable functions in different file formats. Debugging tools in QTP include the debug viewer, breakpoints, and step commands. The document provides examples of calling existing actions, using action parameters, and differences between actions and functions. Overall it serves as training material for using actions, functions and debugging in QTP test automation.
The document provides an overview of Quick Test Professional (QTP), a test automation tool. It discusses topics like the testing process, add-ins, recording and running tests, the object repository, synchronization, checkpoints, parameters, actions, recovery scenarios, and programmatic descriptions for objects not in the repository.
The document provides an overview of Quick Test Professional (QTP), a test automation tool. It discusses topics like the testing process, add-ins, recording and running tests, the object repository, synchronization, checkpoints, parameters, actions, recovery scenarios, and programmatic descriptions for objects not in the repository.
The Evolution and Impact of Tom Cruise Long Hairgreendigital
Tom Cruise is one of Hollywood's most iconic figures, known for his versatility, charisma, and dedication to his craft. Over the decades, his appearance has been almost as dynamic as his filmography, with one aspect often drawing significant attention: his hair. In particular, Tom Cruise long hair has become a defining feature in various phases of his career. symbolizing different roles and adding layers to his on-screen characters. This article delves into the evolution of Tom Cruise long hair, its impact on his roles. and its influence on popular culture.
Follow us on: Pinterest
Introduction
Tom Cruise long hair has often been more than a style choice. it has been a significant element of his persona both on and off the screen. From the tousled locks of the rebellious Maverick in "Top Gun" to the sleek, sophisticated mane in "Mission: Impossible II." Cruise's hair has played a pivotal role in shaping his image and the characters he portrays. This article explores the various stages of Tom Cruise long hair. Examining how this iconic look has evolved and influenced his career and broader fashion trends.
Early Days: The Emergence of a Style Icon
The 1980s: The Birth of a Star
In the early stages of his career during the 1980s, Tom Cruise sported a range of hairstyles. but in "Top Gun" (1986), his hair began to gain significant attention. Though not long by later standards, his hair in this film was longer than the military crew cuts associated with fighter pilots. adding a rebellious edge to his character, Pete "Maverick" Mitchell.
Risky Business: The Transition Begins
In "Risky Business" (1983). Tom Cruise's hair was short but longer than the clean-cut styles dominant at the time. This look complemented his role as a high school student stepping into adulthood. embodying a sense of youthful freedom and experimentation. It was a precursor to the more dramatic hair transformations in his career.
The 1990s: Experimentation and Iconic Roles
Far and Away: Embracing Length
One of the first films in which Tom Cruise embraced long hair was "Far and Away" (1992). Playing the role of Joseph. an Irish immigrant in 1890s America, Cruise's long, hair added authenticity to his character's rugged and determined persona. This look was a stark departure from his earlier. more polished styles and marked the beginning of a more adventurous phase in his hairstyle choices.
Interview with the Vampire: Gothic Elegance
In "Interview with the Vampire" (1994). Tom Cruise long hair reached new lengths of sophistication and elegance. Portraying the vampire Lestat. Cruise's flowing blonde locks were integral to the character's ethereal and timeless allure. This hairstyle not only suited the gothic aesthetic of the film but also showcased Cruise's ability to transform his appearance for a role.
Mission: Impossible II: The Pinnacle of Long Hair
One of the most memorable instances of Tom Cruise long hair came in "Mission: Impossible II" (2000). His character, Ethan
Taylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women MagazineCIOWomenMagazine
From country star to global phenomenon, delve into Taylor Swift's incredible journey. Explore chart-topping hits, feuds, & her rise to billionaire status!
The Future of Independent Filmmaking Trends and Job OpportunitiesLetsFAME
The landscape of independent filmmaking is evolving at an unprecedented pace. Technological advancements, changing consumer preferences, and new distribution models are reshaping the industry, creating new opportunities and challenges for filmmakers and film industry jobs. This article explores the future of independent filmmaking, highlighting key trends and emerging job opportunities.
Brian Peck Leonardo DiCaprio: A Unique Intersection of Lives and Legaciesgreendigital
Introduction
The world of Hollywood is vast and interconnected. filled with countless stories of collaboration, friendship, and influence. Among these tales are the notable narratives of Brian Peck and Leonardo DiCaprio. The keyword "Brian Peck Leonardo DiCaprio" might not immediately ring a bell for everyone. but the connection between these two figures in the entertainment industry is intriguing and significant. This article delves deep into their lives, careers, and the moments where their paths intersect. providing a comprehensive look at how their stories intertwine.
Follow us on: Pinterest
Early Life and Career Beginnings
Brian Peck: The Early Years
Brian Peck was born in New York City on July 29, 1960. From a young age, Peck exhibited a passion for the performing arts. He attended the Professional Children's School. which has a history of nurturing young talent in the arts. Peck's early career marked by a series of roles in television and film that showcased his versatility as an actor.
Peck's breakthrough came with his role in the cult classic "The Return of the Living Dead" (1985). His performance as Scuz, one of the punk rockers who releases a toxic gas that reanimates the dead. earned him a place in the annals of horror cinema. This role opened doors for Peck. allowing him to explore various facets of the entertainment industry. including writing and directing.
Leonardo DiCaprio: From Child Star to Hollywood Icon
Leonardo DiCaprio was born in Los Angeles, California, on November 11, 1974. His career began at a young age with appearances in television commercials and educational films. DiCaprio's big break came when he joined the cast of the popular sitcom "Growing Pains" (1985-1992). where he played the character Luke Brower.
DiCaprio's transition from television to film was seamless. He gained recognition for his role in "This Boy's Life" (1993) alongside Robert De Niro. This performance began a series of acclaimed roles. establishing DiCaprio as one of the most talented actors of his generation. His portrayal of Jack Dawson in James Cameron's "Titanic" (1997) catapulted him to global stardom. solidifying his status as a Hollywood icon.
Brian Peck Leonardo DiCaprio: Their Paths Cross
Collaborations and Connections
The keyword "Brian Peck Leonardo DiCaprio" signifies more than two names; it represents a fascinating connection in Hollywood. While their careers took different trajectories, their paths crossed in the 1990s. Brian Peck worked with DiCaprio on the set of the 1990s sitcom "Growing Pains." where DiCaprio had a recurring role. Peck appeared in a few episodes. contributing to the comedic and dynamic environment of the show.
Their professional relationship extended beyond "Growing Pains." Peck directed DiCaprio in several educational videos for the "Disneyland Fun" series. where DiCaprio's youthful charm and energy were evident. These early collaborations offered DiCaprio valuable experience in front of the camera. he
Leonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite Gamegreendigital
Introduction
Leonardo DiCaprio is synonymous with Hollywood stardom and acclaimed performances. has a unique connection with one of America's most beloved sports events—the Super Bowl. The "Leonardo DiCaprio Super Bowl" phenomenon combines the worlds of cinema and sports. drawing attention from fans of both domains. This article delves into the multifaceted relationship between DiCaprio and the Super Bowl. exploring his appearances at the event, His involvement in Super Bowl advertisements. and his cultural impact that bridges the gap between these two massive entertainment industries.
Follow us on: Pinterest
Leonardo DiCaprio: The Hollywood Icon
Early Life and Career Beginnings
Leonardo Wilhelm DiCaprio was born in Los Angeles, California, on November 11, 1974. His journey to stardom began at a young age with roles in television commercials and educational programs. DiCaprio's breakthrough came with his portrayal of Luke Brower in the sitcom "Growing Pains" and later as Tobias Wolff in "This Boy's Life" (1993). where he starred alongside Robert De Niro.
Rise to Stardom
DiCaprio's career skyrocketed with his performance in "What's Eating Gilbert Grape" (1993). earning him his first Academy Award nomination. He continued to gain acclaim with roles in "Romeo + Juliet" (1996) and "Titanic" (1997). the latter of which cemented his status as a global superstar. Over the years, DiCaprio has showcased his versatility in films like "The Aviator" (2004). "Start" (2010), and "The Revenant" (2015), for which he finally won an Academy Award for Best Actor.
Environmental Activism
Beyond his film career, DiCaprio is also renowned for his environmental activism. He established the Leonardo DiCaprio Foundation in 1998, focusing on global conservation efforts. His commitment to ecological issues often intersects with his public appearances. including those related to the Super Bowl.
The Super Bowl: An American Institution
History and Significance
The Super Bowl is the National Football League (NFL) championship game. is one of the most-watched sporting events in the world. First played in 1967, the Super Bowl has evolved into a cultural phenomenon. featuring high-profile halftime shows, memorable advertisements, and significant media coverage. The event attracts a diverse audience, from avid sports fans to casual viewers. making it a prime platform for celebrities to appear.
Entertainment and Advertisements
The Super Bowl is not only about football but also about entertainment. The halftime show features performances by some of the biggest names in the music industry. while the commercials are often as anticipated as the game itself. Companies invest millions in Super Bowl ads. creating iconic and sometimes controversial commercials that capture public attention.
Leonardo DiCaprio's Super Bowl Appearances
A Celebrity Among the Fans
Leonardo DiCaprio's presence at the Super Bowl has noted several times. As a high-profile celebrity. DiCaprio attracts
HD Video Player All Format - 4k & live streamHD Video Player
Discover the best video playback experience with HD Video Player. Our powerful, user-friendly app supports all popular video formats and codecs, ensuring seamless playback of your favorite videos in stunning HD and 4K quality. Whether you're watching movies, TV shows, or personal videos, HD Video Player provides the ultimate viewing experience on your device. 🚀
Morgan Freeman is Jimi Hendrix: Unveiling the Intriguing Hypothesisgreendigital
In celebrity mysteries and urban legends. Few narratives capture the imagination as the hypothesis that Morgan Freeman is Jimi Hendrix. This fascinating theory posits that the iconic actor and the legendary guitarist are, in fact, the same person. While this might seem like a far-fetched notion at first glance. a deeper exploration reveals a rich tapestry of coincidences, speculative connections. and a surprising alignment of life events fueling this captivating hypothesis.
Follow us on: Pinterest
Introduction to the Hypothesis: Morgan Freeman is Jimi Hendrix
The idea that Morgan Freeman is Jimi Hendrix stems from a mix of historical anomalies, physical resemblances. and a penchant for myth-making that surrounds celebrities. While Jimi Hendrix's official death in 1970 is well-documented. some theorists suggest that Hendrix did not die but instead reinvented himself as Morgan Freeman. a man who would become one of Hollywood's most revered actors. This article aims to delve into the various aspects of this hypothesis. examining its origins, the supporting arguments. and the cultural impact of such a theory.
The Genesis of the Theory
Early Life Parallels
The hypothesis that Morgan Freeman is Jimi Hendrix begins by comparing their early lives. Jimi Hendrix, born Johnny Allen Hendrix in Seattle, Washington, on November 27, 1942. and Morgan Freeman, born on June 1, 1937, in Memphis, Tennessee, have lived very different lives. But, proponents of the theory suggest that the five-year age difference is negligible and point to Freeman's late start in his acting career as evidence of a life lived before under a different identity.
The Disappearance and Reappearance
Jimi Hendrix's death in 1970 at the age of 27 is a well-documented event. But, theorists argue that Hendrix's death staged. and he reemerged as Morgan Freeman. They highlight Freeman's rise to prominence in the early 1970s. coinciding with Hendrix's supposed death. Freeman's first significant acting role came in 1971 on the children's television show "The Electric Company," a mere year after Hendrix's passing.
Physical Resemblances
Facial Structure and Features
One of the most compelling arguments for the hypothesis that Morgan Freeman is Jimi Hendrix lies in the physical resemblance between the two men. Analyzing photographs, proponents point out similarities in facial structure. particularly the cheekbones and jawline. Both men have a distinctive gap between their front teeth. which is rare and often highlighted as a critical point of similarity.
Voice and Mannerisms
Supporters of the theory also draw attention to the similarities in their voices. Jimi Hendrix known for his smooth, distinctive speaking voice. which, according to some, resembles Morgan Freeman's iconic, deep, and soothing voice. Additionally, both men share certain mannerisms. such as their calm demeanor and eloquent speech patterns.
Artistic Parallels
Musical and Acting Talents
Jimi Hendrix was regarded as one of t
The cats, Sunny and Rishi, are brothers who live with their sister, Jessica, and their grandmother, Susie. They work as cleaners but wish to seek other kinds of employment that are better than their current jobs. New career adventures await Sunny and Rishi!
From Teacher to OnlyFans: Brianna Coppage's Story at 28get joys
At 28, Brianna Coppage left her teaching career to become an OnlyFans content creator. This bold move into digital entrepreneurship allowed her to harness her creativity and build a new identity. Brianna's experience highlights the intersection of technology and personal branding in today's economy.
From Teacher to OnlyFans: Brianna Coppage's Story at 28
QTP Faqs
1. VLearn Technologies
www.mysaptesting.com
QTP 9.2 provides following features:
Mercury Screen Recorder:
Capture your entire run session in a movie clip or capture only the segments with
errors, and then view your movie from the Test Results window.
Dynamic Management of Object Repositories:
Quick Test now has a new Repositories Collection reserved object that you can
use to programmatically manage the set of object repositories that are associated with an
action during a run session.
Object Repository Manager:
You can use the Object Repository Manager to manage all of the shared object
repositories in your organization from one, central location. This includes adding and
defining objects, modifying objects and their descriptions, parameterize test object
property values, maintaining and organizing repositories, and importing and exporting
repositories in XML format.
You can open multiple object repositories at the same time. Each object
repository opens in its own resizable document window. This enables you to compare the
content of the repositories, to copy or move objects from one object repository to another,
and so forth.
Object Repository Merge Tool:
You can use the Object Repository Merge Tool to merge the objects from two
shared object repositories into a single shared object repository. You can also use the
Object Repository Merge Tool to merge objects from the local object repository of one or
more actions or components into a shared object repository.
When you merge objects from two source object repositories, the content is
copied to a new, target object repository, ensuring that the information in the source
repositories remains unchanged.
If any conflicts occur during the merge, for example, if two objects have the same
name and test object class, but different test object descriptions, the relevant objects are
highlighted in the source repositories, and the Resolution Options pane details the
conflict and possible resolutions.
Multiple Object Repositories per Action or Component:
Quick Test provides several options for storing and accessing test objects. You
can store the test objects for each action or component in its corresponding local object
repository, which is unique for each action and component. You can also store test
objects in one or more shared object repositories that can be used in multiple actions and
components. Alternatively, you can use a combination of objects from the local object
repository and one or more shared object repositories. You choose the combination that
matches your testing needs.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 1
2. VLearn Technologies
www.mysaptesting.com
XML Object Repository Format:
Quick test now enables you to import and export object repositories from and to
XML format. This enables you to modify object repositories using the XML editor of
your choice and then import them back into Quick Test. You can import and export files
either from and to the file system or a Quality Center project (if Quick Test is connected
to Quality Center).
Functions Library Editor:
Quick Test now has a built-in function library editor, which enables you to create
and edit function libraries containing VBScript functions, subroutines, modules, and so
forth, and then call their functions from your test or component.
Handling Missing Actions and Resources:
Whenever a testing document (test, component, or application area) contains a
resource that cannot be found, Quick Test opens the Missing Resources pane and lists the
missing resource(s). For example, a test may contain an action or a call to an action that
cannot be found; a testing document may use a shared object repository that cannot be
found; or a testing document may use an object repository parameter that does not have a
default value. In all of these cases, Quick Test indicates this in the Missing Resources
pane, enabling you to map a missing resource to an existing one, or remove it from the
testing document, as required.
How can I check if a parameter exists in Data Table or not?
on error resume next
Val=DataTable ("ParamName", dtGlobalSheet)
if err. number<> 0 then
'Parameter does not exist
else
'Parameter exists
end if
How can I check if a checkpoint passes or not?
chk_PassFail = Browser (...).Page (...).WebEdit (...).Check (Checkpoint ("Check1"))
if chk_PassFail then
MsgBox "Check Point passed"
else MsgBox "Check Point failed"
end if
My test fails due to checkpoint failing, Can I validate a checkpoint without my test
failing due to checkpoint failure?
Reporter. Filter = rfDisableAll 'Disables all the reporting stuff
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 2
3. VLearn Technologies
www.mysaptesting.com
chk_PassFail = Browser (...).Page (...).WebEdit (...).Check (Checkpoint ("Check1"))
Reporter. Filter = rfEnableAll 'Enable all the reporting stuff
if chk_PassFail then
MsgBox "Check Point passed"
else
MsgBox "Check Point failed"
end if
What is the difference between an Action and a function?
Action is a thing specific to QTP while functions are a generic thing which is a
feature of VB Scripting. Action can have an object repository associated with it while a
function can't. A function is just lines of code with some/none parameters and a single
return value while an action can have more than one output parameters.
Where to use function or action?
Well answer depends on the scenario. If you want to use the OR feature then you
have to go for Action only. If the functionality is not about any automation script i.e. a
function like getting a string between to specific characters, now this is something not
specific to QTP and can be done on pure VB Script, so this should be done in a function
and not an action. Code specific to QTP can also be put into a function using DP.
Decision of using function/action depends on what any one would be comfortable using
in a given situation.
When to use a Recovery Scenario and when to us on error resume next?
Recovery scenarios are used when you cannot predict at what step the error can
occur or when you know that error won't occur in your QTP script but could occur in the
world outside QTP, again the example would be "out of paper", as this error is caused by
printer device driver. "On error resume next" should be used when you know if an error is
expected and dont want to raise it, you may want to have different actions depending
upon the error that occurred. Use err.number & err.description to get more details about
the error.
How to use environment variable?
A simple definition could be... it is a variable which can be used across the reusable
actions and is not limited to one reusable action.
There are two types of environment variables:
1. User-defined
2. Built-in
We can retrieve the value of any environment variable. But we can set the value of only
user-defined environment variables.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 3
4. VLearn Technologies
www.mysaptesting.com
To set the value of a user-defined environment variable:
Environment (Variable Name) = NewValue
To retrieve the value of a loaded environment variable:
CurrValue = Environment (VariableName)
Example
The following example creates a new internal user-defined variable named MyVariable
with a value of 10, and then retrieves the variable value and stores it in the MyValue
variable.
Environment. Value ("MyVariable") =10
MyValue=Environment.Value ("MyVariable")
How to rename a checkpoint (QTP 9.0)?
Example:
Window ("Notepad").WinEditor ("Edit").Check Checkpoint ("Edit")
in the above example, the user would like to change the name of the Checkpoint object
from "Edit" to something more meaningful.
Note: This functionality is new to QuickTest Professional 9.0.This is not available
for QTP 8.2 and below.
1. Right-click on the Checkpoint step in the Keyword View or on the Checkpoint object
in Expert View.
2. Select "Checkpoint Properties" from the pop-up menu.
3. In the Name field, enter the new checkpoint name.
4. Click. The name of the checkpoint object will be updated within the script.
Example:
Window ("Notepad").WinEditor ("Edit").Check Checkpoint ("NewCheckPointName")
Note: You must use the QuickTest Professional user interface to change the name of the
checkpoint. If you manually change the name of the checkpoint in the script, QuickTest
Professional will generate an error during replay. The error message will be similar to the
following:
"The "" Checkpoint object was not found in the Object Repository. Check the Object
Repository to confirm that the object exists or to find the correct name for the object."
The Checkpoint object is not a visible object within the object repository, so if you
manually modify the name, you may need to recreate the checkpoint to resolve the error.
What is the lservrc file in QTP?
The lservrc file contains the license codes that have been installed
The lservrc file contains the license codes that have been installed. Whenever a
new license is created, the license code is automatically added to this file. The lservrc file
is a text file, with no extension.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 4
5. VLearn Technologies
www.mysaptesting.com
File Location:
1) For a Concurrent (Floating) license installation:
Example: C:Program FilesXYZ TechnologiesABC ServerEnglishlservrc
2) For a Seat (Stand-alone) license installation
Example:
C:Program FilesMercury InteractiveQuickTest ProfessionalBinlservrc
What to do if you are not able to run QTP from quality center?
This is for especially for newbie‘s with QTP.
Check that you have selected Allow other mercury products to run tests and components
from QTP Tools Options Run Tab.
Understanding the Smart Identification Process
If QuickTest activates the Smart Identification mechanism during a run session (because
it was unable to identify an object based on its learned description), it follows the
following process to identify the object:
1. QuickTest "forgets" the learned test object description and creates a new object
candidate list containing the objects (within the object's parent object) that match all of
the properties defined in the Base Filter Properties list.
2. QuickTest filters out any object in the object candidate list that does not match the first
property listed in the Optional Filter Properties list. The remaining objects become the
new object candidate list.
Walking Through a Smart Identification Example
The following example walks you through the object identification process for an
object. Suppose you have the following statement in your test or component:
Browser("Mercury Tours").Page("Mercury Tours").Image("Login").Click 22,17
When you created your test or component, QuickTest learned the following object
description for the Login image:
However, at some point after you created your test or component, a second login button
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 5
6. VLearn Technologies
www.mysaptesting.com
(for logging into the VIP section of the Web site) was added to the page, so the Web
designer changed the original Login button's alt tag to: basic login.
The default description for Web Image objects (alt, html tag, image type) works for most
images in your site, but it no longer works for the Login image, because that image's alt
property no longer matches the learned description. Therefore, when you run your test or
component, QuickTest is unable to identify the Login button based on the learned
description. However, QuickTest succeeds in identifying the Login button using its Smart
Identification definition.
The explanation below describes the process that QuickTest uses to find the Login object
using Smart Identification:
1. According to the Smart Identification definition for Web image objects, QuickTest
learned the values of the following properties when you recorded the click on the Login
image:
2. QuickTest begins the Smart Identification process by identifying the five objects on the
Mercury Tours page that match the base filter properties definition (html tag = INPUT
and image type = Image Button). QuickTest considers these to be the object candidates
and begins checking the object candidates against the Optional Filter Properties list.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 6
7. VLearn Technologies
www.mysaptesting.com
3. QuickTest checks the alt property of each of the object candidates, but none have the
alt value: Login, so QuickTest ignores this property and moves on to the next one.
4. QuickTest checks the name property of each of the object candidates, and finds that
two of the objects (both the basic and VIP Login buttons) have the name: login.
QuickTest filters out the other three objects from the list, and these two login buttons
become the new object candidates.
5. QuickTest checks the file name property of the two remaining object candidates. Only
one of them has the file name login.gif, so QuickTest correctly concludes that it has
found the Login button and clicks it.
Step-by-Step Instructions for Configuring a Smart Identification Definition
you use the Smart Identification Properties dialog box, accessible from the Object
Identification dialog box, to configure the Smart Identification definition for a test object
class.
To configure Smart Identification properties:
1. Choose Tools > Object Identification. The Object Identification dialog box opens.
2. Select the appropriate environment in the Environment list. The test object classes
associated with the selected environment are displayed in the Test object classes list.
Note: The environments included in the Environment list are those that correspond to the
loaded add-in environments.
3. Select the test object class you want to configure.
4. Click the Configure button next to the Enable Smart Identification check box. The
Configure button is enabled only when the Enable Smart Identification option is selected.
The Smart Identification Properties dialog box opens:
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 7
8. VLearn Technologies
www.mysaptesting.com
5. In the Base Filter Properties list, click Add/Remove. The Add/Remove Properties
dialog box for base filter properties opens.
6. Select the properties you want to include in the Base Filter Properties list and/or clear
the properties you want to remove from the list.
Tip: You can also add property names to the set of available properties for Web objects
using the attribute/ notation. To do this, click New. The New Property dialog box opens.
Enter a valid property in the format attribute/ and click OK. The new property is added to
the Base Filter Properties list. For example, to add a property called MyColor, enter
attribute/MyColor.
7. Click OK to close the Add/Remove Properties dialog box. The updated set of base
filter properties is displayed in the Base Filter Properties list.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 8
9. VLearn Technologies
www.mysaptesting.com
8. In the Optional Filter Properties list, click Add/Remove. The Add/Remove Properties
dialog box for optional filter properties opens.
9. Select the properties you want to include in the Optional Filter Properties list and/or
clear the properties you want to remove from the list.
Note: You cannot include the same property in both the base and optional property lists.
You can specify a new property by clicking New and specifying a valid property name in
the displayed dialog box.
Tip: You can also add property names to the set of available properties for Web objects
using the attribute/ notation. To do this, click New. The New Property dialog box opens.
Enter a valid property in the format attribute/ and click OK. The new property is added to
the Optional Filter Properties list. For example, to add a property called MyColor, enter
attribute/MyColor.
10. Click OK to close the Add/Remove Properties dialog box. The properties are
displayed in the Optional Filter Properties list.
11. Use the up and down arrows to set your preferred order for the optional filter
properties. When QuickTest uses the Smart Identification mechanism, it checks the
remaining object candidates against the optional properties one-by-one according to the
order you set in the Optional Filter Properties list until it filters the object candidates
down to one object.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 9
10. VLearn Technologies
www.mysaptesting.com
How to verify that the Siebel Test Automation module is installed?
Check that the list of running processes in the Windows Task Manager includes a process
named SiebelAx_Test_A. This process will appear only after you have logged into the
Siebel application.
Does Mercury QTP care what mode the Siebel application is in (HI vs. SI)?
Support for High Interactivity applications is different from support for Standard
Interactivity applications. When recording a script against a HI application, the script
mostly contains calls into the Siebel-provided test automation API. In contrast, when
recording a script against a pure SI application or against a SI component that is
embedded within an HI application (e.g. customer dashboard, query assistant, search
center), the script mostly contains calls that use Mercury‘s native scripting syntax.
Descriptive Programming:
Whenever QTP records any action on any object of an application, it adds some
description on how to recognize that object to a repository of objects called object
repository. QTP cannot take action on an object until unless its object description is in the
Object Repository. But descriptive programming provides a way to perform action on
objects which are not in Object repository
Object Identification:
To identify an object during the play back of the scripts QTP stores some properties
which helps QTP to uniquely identify the object on a page. Below screen shots shows an
example Object repository:
Now to recognize a radio button on a page QTP had added 2 properties the name
of the radio button and the html tag for it. The name the left tree view is the logical name
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 10
11. VLearn Technologies
www.mysaptesting.com
given by QTP for the object. This can be changed as per the convenience of the person
writing the test case. QTP only allows UNIQUE logical name under same level of
hierarchy. As we see in the snapshot the two objects in Browser->Page node are
―WebTable‖ and ―testPath‖, they cannot have the same logical name. But an object under
some other node can have the same name. Now with the current repository that we have,
we can only write operation on objects which are in the repository. Some of the example
operations are given below
Browser("Browser").Page("Page").WebRadioGroup ("testPath").Select "2"
CellData = Browser("Browser").Page("Page").WebTable ("WebTable").GetCellData
(1,1)
Browser("Example2").Page("Page").WebEdit("testPath").Set "Test text"
When and Why to use Descriptive programming?
Below are some of the situations when Descriptive Programming can be considered
useful:
1. The objects in the application are dynamic in nature and need special handling to
identify the object. The best example would be of clicking a link which changes
according to the user of the application, Ex. ―Logout <>‖.
2. When object repository is getting huge due to the no. of objects being added. If the size
of Object repository increases too much then it decreases the performance of QTP while
recognizing an object.
3. When you don‘t want to use object repository at all. Well the first question would be
why not Object repository? Consider the following scenario which would help
understand why not Object repository
Scenario 1: Suppose we have a web application that has not been developed yet.Now
QTP for recording the script and adding the objects to repository needs the application to
be up, that would mean waiting for the application to be deployed before we can start of
with making QTP scripts. But if we know the descriptions of the objects that will be
created then we can still start off with the script writing for testing
Scenario 2: Suppose an application has 3 navigation buttons on each and every page.
Let the buttons be ―Cancel‖, ―Back‖ and ―Next‖. Now recording action on these buttons
would add 3 objects per page in the repository. For a 10 page flow this would mean 30
objects which could have been represented just by using 3 objects. So instead of adding
these 30 objects to the repository we can just write 3 descriptions for the object and use it
on any page.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 11
12. VLearn Technologies
www.mysaptesting.com
4. Modification to a test case is needed but the Object repository for the same is Read
only or in shared mode i.e. changes may affect other scripts as well.
5. When you want to take action on similar type of object i.e. suppose we have 20
textboxes on the page and there names are in the form txt_1, txt_2, txt_3 and so on. Now
adding all 20 the Object repository would not be a good programming approach.
How to use Descriptive Programming?
There are two ways in which descriptive programming can be used
1. By creating properties collection object for the description.
2. By giving the description in form of the string arguments.
1. By creating properties collection object for the description.
To use this method you need first to create an empty description
Dim obj_Desc ‗Not necessary to declare
Set obj_Desc = Description.Create
Now we have a blank description in ―obj_Desc‖. Each description has 3 properties
―Name‖, ―Value‖ and ―RegularExpression‖.
obj_Desc(―html tag‖).value= ―INPUT‖
When you use a property name for the first time the property is added to the collection
and when you use it again the property is modified. By default each property that is
defined is a regular expression. Suppose if we have the following description
obj_Desc (―html tag‖).value= ―INPUT‖
obj_Desc (―name‖).value= ―txt.*‖
This would mean an object with html tag as INPUT and name starting with txt. Now
actually that ―.*‖ was considered as regular expression. So, if you want the property
―name‖ not to be recognized as a regular expression then you need to set the ―regular
expression‖ property as FALSE
obj_Desc(―html tag‖).value= ―INPUT‖
obj_Desc(―name‖).value= ―txt.*‖
obj_Desc(―name‖).regularexpression= ―txt.*‖
This is how we create a description. Now below is the way we can use it
Browser(―Browser‖).Page(―Page‖).WebEdit(obj_Desc).set ―Test‖
When we say .WebEdit(obj_Desc) we define one more property for our description that
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 12
13. VLearn Technologies
www.mysaptesting.com
was not earlier defined that is it‘s a text box (because QTPs WebEdit boxes map to text
boxes in a web page).
If we know that we have more than 1 element with same description on the page then we
must define ―index‖ property for the that description
Now the html code has two objects with same description. So distinguish between these 2
objects we will use the ―index‖ property. Here is the description for both the object
For 1st textbox:
obj_Desc(―html tag‖).value= ―INPUT‖
obj_Desc(―name‖).value= ―txt_Name‖
obj_Desc(―index‖).value= ―0‖
For 2nd textbox:
obj_Desc(―html tag‖).value= ―INPUT‖
obj_Desc(―name‖).value= ―txt_Name‖
obj_Desc(―index‖).value= ―1‖
We can use the same description for both the objects and still distinguish between both of
them
obj_Desc(―html tag‖).value= ―INPUT‖
obj_Desc(―name‖).value= ―txt_Name‖
When I want to refer to the textbox then I will use the inside a WebEdit object and to
refer to the radio button I will use the description object with the WebRadioGroup object.
Browser(―Browser‖).Page(―Page‖).WebEdit(obj_Desc).set ―Test‖ ‗Refers to the text box
Browser(―Browser‖).Page(―Page‖).WebRadioGroup(obj_Desc).set ―Test‖ ‗Refers to the
radio button
But if we use WebElement object for the description then we must define the ―index‖
property because for a webelement the current description would return two objects.
Hierarchy of test description:
When using programmatic descriptions from a specific point within a test object
hierarchy, you must continue to use programmatic descriptions
from that point onward within the same statement. If you specify a test object by its
object repository name after other objects in the hierarchy have
been described using programmatic descriptions, QuickTest cannot identify the object.
For example, you can use Browser(Desc1).Page(Desc1).Link(desc3), since it uses
programmatic descriptions throughout the entire test object hierarchy.
You can also use Browser("Index").Page(Desc1).Link(desc3), since it uses programmatic
descriptions from a certain point in the description (starting
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 13
14. VLearn Technologies
www.mysaptesting.com
from the Page object description).
However, you cannot use Browser(Desc1).Page(Desc1).Link("Example1"), since it uses
programmatic descriptions for the Browser and Page objects but
then attempts to use an object repository name for the Link test object (QuickTest tries to
locate the Link object based on its name, but cannot
locate it in the repository because the parent objects were specified using programmatic
descriptions).
Getting Child Object:
We can use description object to get all the objects on the page that matches that specific
description. Suppose we have to check all the checkboxes present on a web page. So we
will first create an object description for a checkboxe and then get all the checkboxes
from the page
Dim obj_ChkDesc
Set obj_ChkDesc=Description.Create
obj_ChkDesc(―html tag‖).value = ―INPUT‖
obj_ChkDesc(―type‖).value = ―checkbox‖
Dim allCheckboxes, singleCheckBox
Set allCheckboxes = Browse(―Browser‖).Page(―Page‖).ChildObjects(obj_ChkDesc)
For each singleCheckBox in allCheckboxes
singleCheckBox.Set ―ON‖
Next
The above code will check all the check boxes present on the page. To get all the child
objects we need to specify an object description i.e. we can‘t use the string arguments
that will be discussed later in the 2nd way of using the programming description.
Possible Operation on Description Object
Consider the below code for all the solutions
Dim obj_ChkDesc
Set obj_ChkDesc=Description.Create
obj_ChkDesc(―html tag‖).value = ―INPUT‖
obj_ChkDesc(―type‖).value = ―checkbox‖
Q: How to get the no. of description defined in a collection
A: obj_ChkDesc.Count ‗Will return 2 in our case
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 14
15. VLearn Technologies
www.mysaptesting.com
Q: How to remove a description from the collection
A: obj_ChkDesc.remove ―html tag‖ ‗would delete the html tag property from the
collection
Q: How do I check if property exists or not in the collection?
A: The answer is that it‘s not possible. Because whenever we try to access a property
which is not defined its automatically added to the collection. The only way to determine
is to check its value that is use an if statement ―if obj_ChkDesc(―html tag‖).value =
empty then‖.
2. By giving the description in form of the string arguments.
This is a more commonly used method for Descriptive Programming.
You can describe an object directly in a statement by specifying property:=value pairs
describing the object instead of specifying an object‘s name.
The general syntax is:
TestObject("PropertyName1:=PropertyValue1", "..." ,
"PropertyNameX:=PropertyValueX")
TestObject—the test object class could be WebEdit, WebRadioGroup etc….
Browser(―Browser‖).Page(―Page‖).WebRadioGroup(―Name:=txt_Name‖,‖html
tag:=INPUT‖).set ―Test‖
If we refer to them as a web element then we will have to distinguish between the 2 using
the index property
Browser(―Browser‖).Page(―Page‖).WebElement(―Name:=txt_Name‖,‖html
tag:=INPUT‖,‖Index:=0‖).set ―Test‖ ‗ Refers to the textbox
Browser(―Browser‖).Page(―Page‖).WebElement(―Name:=txt_Name‖,‖html
tag:=INPUT‖,‖Index:=1‖).set ―Test‖ ‗ Refers to the radio button
Four different ways to launch your application are mentioned below:
SystemUtil.Run
SystemUtil.Run ( FileName, Parameters, Path, Operation )
FileName - The name of the file you want to run.
Parameters - If the specified FileName is an executable file, use the Parameters
argument to specify any parameters to be passed to the application.
Path - The default directory of the application or file.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 15
16. VLearn Technologies
www.mysaptesting.com
Operation - The action to be performed. If this argument is blank (""), the open
operation is performed.
The following operations can be specified for the operation argument of the
SystemUtil.Run method:
Example: SystemUtil.Run ―c:flight.exe‖
InvokeApplication
InvokeApplication("Full URL as Parameter")
Static and Dynamic Arrays:
VBScript provides flexibility for declaring arrays as static or dynamic.
A static array has a specific number of elements. The size of a static array cannot be
altered at run time.
A dynamic array can be resized at any time. Dynamic arrays are useful when size of the
array cannot be determined. The array size can be changed at run time.
Next we will deal with user defined procedures, functions and subroutines.
I have seen an umpteen no of posts in every QTP group I visited asking about Test
Automation frameworks. Here I would like to collate the useful inputs i received from
various QTP groups and discussion forums.
Data-driven Testing:
Data-driven testing is a framework where test input and output values are read from data
files (datapools, ODBC sources, csv files, Excel files, DAO objects, ADO objects, and
such) and are loaded into variables in captured or manually coded scripts. In this
framework, variables are used for both input values and output verification values.
Navigation through the program, reading of the data files, and logging of test status and
information are all coded in the test script
Modularity-driven testing
The test script modularity framework requires the creation of small, independent scripts
that represent modules, sections, and functions of the application-under-test. These small
scripts are then used in a hierarchical fashion to construct larger tests, realizing a
particular test case.
'####################################################
'# Descriptive Programming Objects
'####################################################
'# Modifications: Enter changes to the code in this space
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 16
17. VLearn Technologies
www.mysaptesting.com
'####################################################
'# Public Sub WebTableLink (strWebLink)
'####################################################
'# Modifications: Enter changes to the code in this space
'####################################################
Public Sub DPWebEdit (strWebEdit,strInValue)
If strInValue <> "" Then
Set obj_WebEdit = Description.Create
obj_WebEdit ("Class Name").value = "WebEdit"
obj_WebEdit ("name").value= strWebEdit
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebEdit(obj_WebEdit).Set
strInValue
End If
End Sub
'########################################################
Public Sub DPWebEditSetSecure (strWebEdit,strInValue)
If strInValue <> "" Then
Set obj_WebEdit = Description.Create
obj_WebEdit ("Class Name").value = "WebEdit"
obj_WebEdit ("name").value= strWebEdit
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebEdit(obj_WebEdit).SetSecure
strInValue
End If
End Sub
'########################################################
Public Sub DPWebList (strWebList,strInValue)
If strInValue <> "" Then
Set obj_WebList = Description.Create
obj_WebList ("Class Name").value = "WebList"
obj_WebList ("name").value= strWebList
Reporter.Filter = 3 'Turn Reporting of
Call TestListValues (obj_WebList,strInValue) 'Check for valid item in list
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 17
18. VLearn Technologies
www.mysaptesting.com
Reporter.Filter = 0 'Turn Reporting on
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebList(obj_WebList).Select
strInValue
End If
End Sub
'########################################################
Public Sub DPRadioGroup (strWebRadioGroup,strInValue)
Set obj_WebRadioGroup = Description.Create
obj_WebRadioGroup ("Class Name").value = "WebRadioGroup"
obj_WebRadioGroup ("name").value= strWebRadioGroup
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebRadioGroup(obj_WebRadioGroup).Sele
ct strInValue
End Sub
'####################################################
Public Sub DPWebImage (strImage)
Set obj_Image = Description.Create
obj_Image ("Class Name").value = "Image"
obj_Image ("name").value= strImage
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).Image(obj_Image).Click '6,7
End Sub
'####################################################
Public Sub DPWebCheckBox (strWebCheckBox,strInValue)
Set obj_WebRadioGroup = Description.Create
obj_WebCheckBox ("Class Name").value = "WebCheckBox"
obj_WebCheckBox ("name").value= strWebRadioGroup
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebCheckBox(obj_WebCheckBox).Select
strInValue
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 18
19. VLearn Technologies
www.mysaptesting.com
End Sub
'####################################################
Public Sub DPWebLink (strWebLink)
Set obj_WebLink = Description.Create
obj_WebLink ("Class Name").value = "Link"
obj_WebLink ("name").value= strWebLink
Count = 1
Do until Browser(strBrowser).Page(strPage).Link(obj_WebLink).Exist
if Browser(strBrowser).Page(strPage).Link(obj_WebLink).Exist Then
Exit Do
End If
Count = Count + 1
If Count = 20 Then
Exit Do
end if
Loop
Browser(strBrowser).Page(strPage).Link(obj_WebLink).Click
End Sub
'####################################################
Public Sub DPWebButton (strWebButton)
Set obj_WebButton = Description.Create
obj_WebButton ("Class Name").value = "WebButton"
obj_WebButton ("name").value= strWebButton
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebButton(obj_WebButton).Click
End Sub
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 19
20. VLearn Technologies
www.mysaptesting.com
'####################################################
' Close all opened browsers
‗####################################################
Public Function CloseBrowsers
If Browser("micclass:=Browser").Exist (0) Then
Browser("micclass:=Browser").Close
End If
While Browser("micclass:=Browser", "index:=1").Exist (0)
Browser("index:=1").Close
Wend
If Browser("micclass:=Browser").Exist (0) Then
Browser("micclass:=Browser").Close
End If
End Function
‗#####################################################
Set myBrowser = Description.Create
myBrowser("version").value = "internet explorer 7"
Set eachBrowser = Desktop.ChildObjects(myBrowser)
b= eachBrowser.count()
msgbox "No of Windows Browsers Opened" & VBNewLine &b
For i = 1 to b - 1
msgbox "Browser Names" &eachBrowser(i).getroproperty("text")
eachBrowser(i).close
Next
‗####################################################
‗ Launch Application
' returns - always returns true
‗####################################################
Public Function Launch (apptype, val)
If "website" = apptype Then
thirdlevel = ""
Report micPass, "Initialize", "Initializing Framework"
level = split(webLevels, leveldelimiter, -1, 1)
desc = split(webLevelsDesc, leveldescdelimiter, -1, 1)
object = split(objects, objectdelimiter, -1, 1)
objectDescription = split(objectsDescription, objectsDescriptiondelimiter, -1, 1)
CloseBrowsers
Set IE = CreateObject("InternetExplorer.Application")
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 20
21. VLearn Technologies
www.mysaptesting.com
IE.visible = true
IE.Navigate val
While IE.Busy
wait 1
Wend
End If
initialized = true
Launch = true
End Function
‗####################################################
‗ WebElement Items
‗####################################################
Set oDesc = Description.Create()
oDesc("Class Name").Value = "WebElement"
oDesc("Class").Value = "hp_hclist_box"
rc = Browser("WebMD - Better information.").Page("WebMD - Better
information.").WebElement(oDesc).GetROProperty("innertext")
sp = Split(rc, " ")
Msgbox sp(4)
‗####################################################
Set Desc= description.Create()
desc("micclass").value ="WebCheckBox"
Set data=Browser("name:=127.0.0.1").Page("title:=127.0.0.1").ChildObjects(desc)
s=data.count()
msgbox "Buttons" & VBNewLine &s
For i = 0 to s - 1
msgbox data(i).getroproperty("name")
Next
‗####################################################
Set Desc= description.Create()
desc("micclass").value ="WebEdit"
Set data=Browser("name:=127.0.0.1").Page("title:=127.0.0.1").ChildObjects(desc)
s=data.count()
msgbox "Buttons" & VBNewLine &s
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 21
22. VLearn Technologies
www.mysaptesting.com
For i = 0 to s - 1
msgbox data(i).getroproperty("name")
Next
‗####################################################
Set Desc= description.Create()
desc("micclass").value ="WebRadioButton"
Set data=Browser("name:=127.0.0.1").Page("title:=127.0.0.1").ChildObjects(desc)
s=data.count()
msgbox "Buttons" & VBNewLine &s
For i = 0 to s - 1
msgbox data(i).getroproperty("name")
Next
‗####################################################
Set Desc= description.Create()
desc("micclass").value ="WebButton"
Set data=Browser("name:=127.0.0.1").Page("title:=127.0.0.1").ChildObjects(desc)
s=data.count()
msgbox "Buttons" & VBNewLine &s
For i = 0 to s - 1
msgbox data(i).getroproperty("name")
Next
‗####################################################
‗ Links and URL‘s
‗####################################################
Set oDesc = Description.Create()
oDesc("html tag").Value = "A"
Set rc = Browser("Google").Page("Google").ChildObjects(oDesc)
num = rc.Count()
For i=0 to num-1
tag = rc(i).GetROProperty("innertext")
href = rc(i).GetROProperty("href")
Reporter.ReportEvent 0, "Links in Page", "name: " & tag &"; url:" & href
Next
‗####################################################
‗ Automation Object Model
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 22
24. VLearn Technologies
www.mysaptesting.com
RegisterUserFunc "WebTable", "ItemByKeyColumn", "ItemByKeyColumn"
' Function: ObjectsByMicClass
' Description: Returns a collection of objects all the objects in a
' WebTable that have the specified MicClass
' Return Value: A Collection of Objects
' Arguments:
' Obj - Test Object (WebTable)
' micClass - The micClass of the objects to retrieve
'##################################################
Function ObjectsByMicClass(Obj, micClass)
Set Table = Obj
' Create a collection object to hold the items
Set objCollection = CreateObject("Scripting.Dictionary")
' Go over all the cells in the table, and look for objects with the specified micClass
For row=1 to Table.RowCount
ColumnCount=Table.ColumnCount(row)
For col=1 to ColumnCount
For ItemIndex=0 to Table.ChildItemCount(row, col, micClass)-1
Set childItem=Nothing
Set childItem = Table.ChildItem(row, col, micClass, ItemIndex)
If Not childItem is Nothing Then
' If the cell contains a micClass object, add it to the collection
ItemKey = objCollection.Count + 1
objCollection.Add ItemKey, childItem
End if
Next
Next
Next
Set ObjectsbyMicClass = objCollection
End Function
‗#######################################################
' Function: ItemByKeyColumn
' Description: Returns an item from a column, based on the value of a
' key column
' Return Value: Object
' Arguments:
' Obj - Test Object (WebTable)
' KeyColumnIndex - Index of the KeyColumn
' KeyColumnValue - Value to search for in the key column
' KeyItemIndex - Index of the value in the key column (if there is
' more than one). If 0, the first item will be used.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 24
25. VLearn Technologies
www.mysaptesting.com
' TargetColumnIndex - Column from which to retrieve the target item
' micClass - The micClass of the target item
' TargetItemIndex - Index of the target item to retrieve (if there is
' more than one). If 0, the first item will be used.
‗#######################################################
Function ItemByKeyColumn(Obj, KeyColumnIndex, KeyColumnValue, KeyItemIndex,
TargetColumnIndex, micClass, TargetItemIndex)
Table = Obj
rowCount = Table.RowCount
' if TargetItemIndex was not specified, use 1 as deafult
If TargetItemIndex < 1 Then
TargetItemIndex = 1
End If
' if KeyColumnIndex was not specified, use 1 as default
If KeyItemIndex < 1 Then
KeyItemIndex = 1
End If
' look for KeyColumnValue in the key column to determine which
' row to retrieve the targe item from
Row = 0
foundIndex = 0
While Row <= RowCount And foundIndex < KeyItemIndex
Row = Row + 1
CellData = Table.GetCellData(Row, KeyColumnIndex)
If CellData = KeyColumnValue Then
foundIndex = foundIndex + 1
End If
Wend
If foundIndex < KeyItemIndex Then
Exit Function
End If
' Now that we know the row, retrieve the item (according to its micClass)
' from the target column.
ChildItemsCount = Table.ChildItemCount(Row, TargetColumnIndex, micClass)
If ChildItemsCount > =1 And ChildItemsCount >= TargetItemIndex Then
Set GetItemByKeyColumn = Table.ChildItem(Row, TargetColumnIndex,
micClass, TargetItemIndex-1)
End If
End Function
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 25
26. VLearn Technologies
www.mysaptesting.com
' ************************************
' Using the ItemByKeyColumn Function
‗##################################################
Set obj = Browser("Table with objects").Page("Itenerary: Mercury
Tours").WebTable("Acapulco to
Zurich").ItemByKeyColumn(1,"FLIGHT",2,3,"WebElement",1)
msgbox obj.GetROProperty("innerhtml")
' Using the ObjectsByMicClass function
Set collection =
Browser("Browser").Page("Page").WebTable("Table").ObjectsByMicClass("WebCheck
Box")
For i=1 to collection.count
If collection(i).GetROProperty("checked") Then
collection(i).Set "OFF"
Else
collection(i).Set "ON"
End If
Next
‗##########################################
' Example 1
‗#############################################
Function SendMail(SendTo, Subject, Body, Attachment)
Set ol=CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
Mail.Send
ol.Quit
Set Mail = Nothing
Set ol = Nothing
End Function
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 26
27. VLearn Technologies
www.mysaptesting.com
‗##################################################
' Example 2
‗###############################################
Function SendMail(SendFrom, SendTo, Subject, Body)
Set objMail=CreateObject("CDONTS.Newmail")
ObjMail.From = SendFrom
ObjMail.To = SendTo
ObjMail.Subject = Subject
ObjMail.Body = Body
ObjMail.Send
Set objMail = Nothing
End Function
‗############################
‗ InString
‗############################
Dim SearchString, SearchChar, MyPos
SearchString ="XXpXXpXXPXXP" ' String to search in.
SearchChar = "P" ' Search for "P".
MyPos = Instr(4, SearchString, SearchChar,1) ' A textual comparison starting at position
4. Returns 6.
msgbox mypos
MyPos = Instr(1, SearchString, SearchChar, 0) ' A binary comparison starting at
position 1. Returns 9.
msgbox mypos
MyPos = Instr(SearchString, SearchChar) ' Comparison is binary by default (last
argument is omitted). Returns 9.
msgbox mypos
MyPos = Instr(1, SearchString, "W") ' A binary comparison starting at position 1.
Returns 0 ("W" is not found).
msgbox mypos
‗########################################
QTP 10.0 Features
1. QC integration – Which (mostly) down to Resource Management and Source
Resource Management: Although you could keep saving your resources as attachments
(for backward compatibility), you can upgrade to a new, fuller mode of work. This
includes a whole new Resource module in QC, and allows for some very neat tricks on
Function Libraries, Tests and Object Repositories etc.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 27
28. VLearn Technologies
www.mysaptesting.com
It should be noted, though, that other types of files (external excel / XML files, for
example), remain as unmanaged attachments.
Resources have full meta-data, and have a special view pane – you can view Object-
Repositories, data-tables, and function libraries code right from QC. This looks quite
nice; however, I missed the ability to open the resource for editing in QTP with a single
click.
Automatically updated path system – When moving a function library between folders,
QC will automatically update all the tests which depend on it, so they will use it at its
new location. This makes the once critical problem of hard-path-link a non-issue. Very
impressive.
A word about the user interface – when opening a QC resource / test from QTP, the file
dialog shows the items with large, crisp icons, very similar to Word‘s save dialog.
Everything is very clear and intuitive, as is the ability to revert back to saving / opening a
test from the File-System.
What about your existing projects? Well, when upgrading to QC 10, a wizard will
automatically transform all you unmanaged attachments to managed resources (if you‘d
like it to).
Source Control: This includes a very rich line of features which are very well executed,
and effectively allow you to manage a QTP project as any other code project:
First, the basics – QTP and QC 10 introduce a new Check-in/Check-out ability. It
works similar to what you‘d expect – a checked out item will be locked to all other users,
and you can immediately know an item‘s status by looking at its icon (green/red locks).
An interesting twist regards manner in which a test / resource is locked – it‘s at the user
level (not the local machine level). This means that if you log into QC from a different
machine, you‘ll have access to all your checked-out items, even if they were originally
checked-out on a different local machine. The ability is implemented very well, both
from QTP‘s end, as well as from QC‘s end.
A major enabler for source control is the new versioning feature of QC. It manifests
both with a kind of instant versioning for a single resource, and with a project-wide
―base-line version‖, which allows you to revert your entire test framework to a previous
version. Both types of versioning are supported by a surprisingly robust comparison
mechanism. You can select two versions of a resource / test, a see a very detailed
comparison of their respective changes. For function libraries this amounts to a ―simple‖
text comparison, but this feature truly shines in full test comparisons.
It will present changes in the different actions and their resources (data-table, object
repositories, inner code), as well as in the global test-settings, associated function
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 28
29. VLearn Technologies
www.mysaptesting.com
libraries, recovery scenarios, and pretty much anything you could think of. The ability to
drill-down into the data is very impressive; and the effective, concise manner in which
the data is presented in the top level view is downright unbelievable. A nice touch is a
small screen capture of the change, in case you don‘t remember what ―Run all rows –
>Changed into-> Run a single iteration only‖ means (for example).
Now to the versioning mechanism itself: Whenever you check and item in, a new
―version‖ will be created, and you‘ll be able to revert back to it with ease. As this is a
version of a single, isolated resource, I found it better to refer to it as a SnapShot – my
terminology, not HP‘s. The snapshots are visible both from QC and QTP, and you can
very easily choose which one to open. This allows you a kind of an instant undo to a
single file which worked in the past, but is broken in the present.
The second mechanism presents the ability to select several folders, and create a full
blown ―base-line version‖ of them and everything they relate to. Defects, inner-
connections, tests, history data, resources – all these and more will be ―frozen‖ and
preserved as a base-line. You can then choose to revert back to an old baseline, and truly
regain all the abilities that were present at that time. As all the resources, attachments
tests and reports will be restored, you don‘t have to worry about forgetting anything, or
leaving some minor resource at the wrong version. This is versioning with a vengeance –
it allows you to track the AUT‘s versions with your own automation versions, enabling,
among other things, running automation efforts on several AUT versions at once.
For conclusion – The new abilities inherit in the connection of QTP and QC Atlantis are
(or at least seem to be) revolutionary. At last, QTP projects can be natively managed as
code projects; and some of the supporting infrastructure is surprisingly robust and useful.
As a ―raving‖ anti-QC-ist, I must admit QC Atlantis seem tempting, and for me, that‘s
saying a lot!
I must contrast these very positive impressions with some dire problems: The versioning
feature will put a stain on your storage capabilities (though less than creating a simple
copy the data); all these wonderful features are available only if both your QTP and QC
are upgraded to Atlantis; and a critical issue – Previous versions of QTP will not work
with QC Atlantis. Yes, this is not a misunderstanding, there is no backward
compatibility between QC to QTP (although QTP Atlantis will work with any version of
QC). On top of these, performance may become an issue, though we were unable to
precisely evaluate it, as our QC was installed on an already overtaxed personal computer.
2. Report improvements
The native QTP report includes several new improvements:
Tracability: Selecting a report-node will automatically focus on the relevant code-line in
the script. This may sound like a cool feature at first, but a closer look revels that it only
works for actions (not functions); and that in any case, using a custom report function (as
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 29
30. VLearn Technologies
www.mysaptesting.com
most of us do) completely nullifies the feature (since you‘re always at the same code line
when performing the report).
Exporting: The report now has a two-click export feature, which comes with a built-in
ability to export to Word and PDF documents, as well as the ability to export through a
custom XSL of your choosing. You can choose between Short and Long formats
(corresponding to PShort.XSL and PDetails.XSL) to get a document relevant to your
needs. This blessed feature has one major flaw – It has no API support. This means that
you cannot export the results automatically at the end of a test run, which is quite a miss,
to say the least.
Resource Monitor: QTP can now hook onto the Windows Performance Monitor and
present it as part of the test results. You can select several counters to monitor (e.g. GDI
objects, memory usage etc.), and the monitor output graph will be available in special tab
in the result window. You can set up a ―checkpoint‖ for a counter (e.g. Fail the test if
there are more than 500 GDI objects), facilitating a kind of a poor-man‘s version of load-
testing.
The fact that clicking the graph focuses on the relevant test step (as well as the other way
around), provides an effective way to quickly locate problematic actions and resource
usage spikes. This feature is well executed, and HP has even went the extra mile and
added several unified counters that simplify monitoring the application. However, the
fact that you can only monitor one process per test may leave the more advanced users
with their own implementation of a resource monitor.
Considering the simple design and implementation of this feature, I believe it will
become a popular tool in every automation project that uses QTP 10.
Native image integration: This is a small, yet long-awaited feature. The ReportEvent
command now has a new optional parameter – you can specify a path to a picture file,
and it will be attached to the report node of the current event. When used in conjunction
with the CaptureBitmap method, this presents a technical, yet revolutionary upgrade to
the native QTP report. Finally, users can attach screenshots to their custom report events
without any special functions or frameworks.
3. IDE improvements
Intellisense: Perhaps I‘m doing injustice to the other features, but the IDE improvements,
and the new intellisense engine in particular, is what got me excited about QTP Atlantis.
So I was pretty much on the edge of my seat when we‘ve gotten to this last part of the
presentation. I‘m very pleased to say that it was every bit what I imagined it to be, with
the exception of intellisense for VBScript classes, and intellisense in the debug viewer
(both won‘t be implemented). Luckily, there are workarounds for both these issues
through the PDM hack (for debug intellisense), and WSC registration (for VBScript
Class intellisense through COM).
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 30
31. VLearn Technologies
www.mysaptesting.com
We saw a demonstration of how creating an Excel COM object provided a full
intellisense for all its methods and properties, for as many levels as we‘d like. Every
variable set to this object also presented the same intellisense, and the autocomplete
caught every variable we‘ve defined or used (yes, there‘s autocomplete for variable
names!). The autocomplete and intellisense features worked smoothly, and presented no
apparent performance issue. It‘s still left to be seen how it functions in a real script,
with hundreds / thousands code lines.
Tasks and Comment Pane: QTP has a new bottom pane which includes a run-of-the-
mill implementation of tasks and comments. Double clicking a comment will take you to
the relevant code-line, though strangely enough, you cannot do this with a task (i.e.,
tasks cannot be linked to specific code lines). It was mentioned that enabling the
comments feature for function libraries may sometimes cause performance issues.
Dynamic code-zones: When standing inside a code block like If, While, Do, etc, the IDE
will mark the relevant block with blue lines, making it much more easy to make your way
inside nested blocks of this sort (somewhat like highlighting left-right bracket pairs).
While it will surely make our life easier, a more robust mechanism like collapsible code-
regions is still needed.
Custom Toolbars: You can add your own buttons and commands to QTP toolbars and
menus. While this does not include inner-QTP macros, you can assign a program / File
shortcut to your own button / menu item. It‘s nice, but i think it will only gain power once
QTP‘s inner mechanisms will be bindable to such buttons.
4. Miscellaneous features
General look and feel: QTP has departed from the old Tab layout, and into the more
modern settings-tree layout (similar to Office, EMule, Adobe, and pretty much every
other program). It‘s nice, but nothing as groundbreaking as the transformation in QTP
9.0.
Bitmap Checkpoint improvements: These include presenting the size of the selected
area when choosing to check only a part of an Image, as well as the ability to plug your
own custom DLL for comparing images. I suppose that there are some projects for which
this can actually be quite revolutionary. Another great addition is the ability to see the
difference between the expected and actual bitmaps in a separate tab.
API changes: QTP Automation API will receive several upgrades, the most noteworthy
of which is the ability to read and write that code of the test you‘ve opened. Writing the
code will not effect an ongoing run-session (there goes my ambitious try-catch
implementation for QTP), but it still opens the door for some creative tweaks and
hacks…
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 31
32. VLearn Technologies
www.mysaptesting.com
Saving a test with all linked resources: For those who‘re working with QC, this is a real
blessing. Up until QTP 10, copying a QC saved test to your local system was a hellish
procedure of changing each and every resource and action reference to your local file-
system. QTP and QC Atlantis offer a one-click solution for copying a test and all its
resources to your local file-system, and automatically changing all the references
accordingly.
Dynamic Action Call: I‘ve saved the best for last. QTP 10 presents a new native
command – LoadAndRunAction. It allows you to load external actions during the run-
session, without having to associate them with your test beforehand. All the run-time
debug abilities will be available for these dynamically added actions, so you‘re not giving
anything up by using this feature. I think it‘s a long awaited feature, and a well executed
one.
What surprises are in store in QTP?
1. Stronger than ever Quality Center integration.
An external resources manager: No more hellish workarounds for saving resources as
attachments (function libraries, shared OR etc.). From now on, an external resource will
become a fully-fledged QC entity, with its own meta-data (which means it‘s searchable!),
fields and versions.
Versions: QTP tests and all the external resources will now have full versioning support.
This will include reverting back to an old version (immediately, from the open file menu
if you‘d wish), as well as comparing versions - from the attached resources of the tests,
though the objects in the SOR, to the changed lines in the function library files.
Versioning is available for manual tests as well, thus allowing for a very smooth
integration of automation with manual testing.
I must say that this is one feature I would consider migrating my tests to Quality Center
for.
2. Intellisense
It’s a known fact that the QTP intellisense popup can be quite annoying – just when
you‘re dealing with a very complex .Net/Java object, the window proves to be too narrow
to fully display the object‘s properties and methods. Tarun has continued his great work
on providing productivity enhancing tools and code libraries, and has posted a resizer for
the intellisense popup window.
COM objects intellisense - for example, if you‘d use an Excel.Application object, you‘d
see all its inner methods and properties, up to the N-th level
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 32
33. VLearn Technologies
www.mysaptesting.com
Variable bridge intellisense - which means that if you‘d assign some object to a
variable, the variable will have the same intellisense as the original object
These three abilities present the bulk of abilities you would like to have in an intellisense
system. It‘s not that there isn‘t room for more abilities, but these three are sure to make
working with the new QTP an entirely different experience. It‘s unclear if this would
include auto-complete for script variables, but my guess is that it will.
I was told that all these intellisense features will not apply to VBScript classes, but only
to COM objects and RO objects. As one who relays heavily on my own VBScript classes,
I was very disappointed. However, it must be said that not a lot of QTP programmers
work with their own VBScript classes, so it‘s a shortcoming that only a handful of people
should mind.
3. More IDE improvements
These include the integration of a comment driven To-Do pane, as well as a jump-to-
comment ability. Not anything out of the ordinary, but a blessed addition to the very
limited QTP IDE environment. Further more, and three versions too late – Toolbar
customizations! You could rearrange existing icons, as well as add calls to external
commands (e.g. launch the AUT) as separate icons.
4. Reporter improvements
The reporter will now be able to natively export the HTML to PDF (and perhaps some
other formats).
A completely new feature will be an integrated performance counter which would
monitor the computer resources throughout the test. This, combined with a new ability to
jump to the relevant script live from the report will facilitate a whole new level of testing
– almost like a poor-man‘s version of a load test.
However, there‘s still no word on filtering, searching, and running several reporters
concurrently (although the infrastructure exists since QTP 8.2). Another overlooked issue
is the report‘s availability in case of a mid-run crash.
5. New checkpoint abilities
You could set up a whole new kind of checkpoint for the computed resources – for
example, fail the test if the application uses more than 500 GDI objects, and other
parameters. This ability is closely coupled with the new resource monitor report. Another
welcomed improvement is the ability to hook up your own algorithm for image
comparison straight into QTP‘s native image checkpoint mechanism.
6. New environments
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 33
34. VLearn Technologies
www.mysaptesting.com
It will include at least: Windows XP SP3, Windows 2008, Windows Vista SP1, IE8,
FireFox 3, the new cirtrix client.
PRODUCT ENHANCEMENTS
Upgrade from QuickTest 9.5 - If you have QTP 9.5 Installed on the system, you can
choose to upgrade to version 10.0. This will allow you to preserve some of the
configuration settings and options that you already have set up.
Improved IntelliSense Functionality - QTP now provides full IntelliSense for objects
created by a step or function (i.e. objects created by Create Object method), variables to
which an object is assigned, reserved objects, COM objects and properties that return
objects. In addition, Intellisense sentence completion now provides lists of local
variables.
Added Control for Editing and Managing Actions in Automation Scripts - The QTP
Automation Object Model has a new set of objects and methods for manipulating test
actions and action parameters. You can use automation scripts to create new actions,
modify and validate the syntax of action scripts, create and modify action parameters, and
more.
Improved Debugger Pane Design and Functionality - The Debug Viewer pan has a
new look, including icons to help you identify the type of information displayed.
New Object Identification Solutions in Maintenance Run Mode - In addition to
helping you update your steps and object repositories when objects in application change,
the Maintenance Run Wizard can now help you solve problems dealing with test failures
due to missing objects, or objects that can only be recognized via Smart Identification.
Additional Configuration Settings for Text Recognition Mechanism - You can now
set all text recognition configuration settings from the QuickTest Options Dialog Box
New Look for Options, Settings, and File Dialog Boxes - The QuickTest Options and
Settings dialog boxes have changed from their former ta-based design to a more easily
navigable tree-based structure. The tree contains only the options relevant for the add-ins
that are currently loaded.
QuickTest Toolbar Customization Options - You can use the new Customize Dialog
box to customize the appearance of existing menus and toolbars, and to create your own
user-defined menus, toolbar buttons, and shortcuts.
Improved Web Extensibility - QTP Web Add-in Extensibility enables you to develop
packages that provide high level support for thir-party and custom Web controls that are
not supported out-of-the-box by the Web Add-in.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 34
35. VLearn Technologies
www.mysaptesting.com
NET Add-in and Extensibility Improvements - The .NET Add-in has several new
objects and methods, including the SwfPropertyGrid test object (for working with .NET
Windows Forms property grids), GetErrorProviderText method and ErrorProviderText
identification property.
New Terminal Emulator Configuration Validation - The new Terminal Emulator pane
of the Options dialog box now includes a Validate button. When you click this button,
QTP checks the current configurations of the selected emulator. If a problem is detected,
a brief description is displayed in the pane.
NEW SUPPORTED OPERATING SYSTEMS AND ENVIRONMENTS
Microsoft Windows 2008 Server 32-bit Edition
Microsoft Windows 2008 Server 64-bit Edition
Microsoft Windows Vista, Service Pack 1, 32-bit Edition
Microsoft Windows Vista, Service Pack 1, 64-bit Edition
Microsoft Windows XP Professional 32-bit Edition -- Service Pack 3
Citrix Presentation Server 4.5
Microsoft Internet Explorer 8, Beta 2
Mozilla firefox 3.0.x
Delphi: IDE, versions 6, 7, and 2007 (for controls based on the Win32 VCL
library)
SAP: CRM 2007 (For controls that support test mode enhancements
Java: IBM 32-bit JDK 1.5.x, SWT toolkit version 3.4
Java Extensibility: Eclipse IDE 3.4
NET: .NET Framework 3.5 -- Service Pack 1
// ** TO Count Broken Links in Web Page Using VBScript
1.
Set obj=Browser(―name:=Blackboard.*‖).Page(―title:=Blackboard.*‖).
Frame(―name:=main.*‖).object.all.tags(―IMG‖)
Msgbox obj.length
For each element in obj
s1=element.nameProp
If Browser().Page().Frame().Image(―filename:=―&s1,‖index:=0‖).exist(0) then
If Browser().Page().Frame().Image(―filename:=―&s1,‖index:=0‖).
Object.complete=―True‖ then
Msgbox ―pass‖
Else
Msgbox ―fail‖
End if
End if
Next
// TO Count Broken Links in Web Page Using VBScript
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 35
36. VLearn Technologies
www.mysaptesting.com
If Browser(―my_web‖).Page(―GlobalPage‖).Link(―Logout‖).
GetROProperty(―href‖)<>―javascript:__doPostBack('ctl00$lkLogout','Logout')‖ Then
Reporter.ReportEvent micFail ,‖href‖,Browser(―my_web‖).
Page(―GlobalPage‖).Link(―Logout‖).GetROProperty(―href‖)
End If
// // TO Count Broken Links in Web Page Using VBScript
Verify Broken Links using VBscript (without checkpoints)
One of my friends just wanted to check for the broken links (both textlinks and image
links) on the page with VB script and not the checkpoints.
Set obj=Browser("name:=Blackboard.*").Page("title:=Blackboard.*").
Frame("name:=main.*").object.all.tags("IMG")
Msgbox obj.length
For each element in obj
s1=element.nameProp
If Browser().Page().Frame().Image("filename:="&s1,"index:=0").exist(0) then
If
Browser().Page().Frame().Image("filename:="&s1,"index:=0").Object.complete="True"
then
Msgbox "pass"
Else
Msgbox "fail"
End if
End if
Next
// TO Count Broken Links in Web Page
Broken Links also sometimes called as dead links are those links on the web which are
permanently unavailable. Commonly found, 404 error is one example of such link. Now
the question is how can we identify broken links with the help of QTP during the run
session?
There can be two ways to do this:
1. Using Automatic Page checkpoint.
2. By manually creating a Page checkpoint.
Using Automatic Page checkpoint: Go to Tools > Options > Web > Advanced and
check the two boxes labeled ―Create a checkpoint for each page while recording‖ and
―Broken Links‖
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 36
37. VLearn Technologies
www.mysaptesting.com
Now every time you record a new page, QTP will automatically include a checkpoint for
broken links.
By manually creating a Page checkpoint: QTP does not provide a direct menu option
to incorporate a page checkpoint. You need to take the help of standard checkpoint. Start
recording session > Insert > Checkpoint > Standard Checkpoint (OR press F12). Place
and click the hand pointer anywhere on your web page. Select Page (As shown in picture
below) and Click OK.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 37
38. VLearn Technologies
www.mysaptesting.com
You will get the following screen:
Check ―Broken Link‖ checkbox down below and click OK.
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 38
39. VLearn Technologies
www.mysaptesting.com
Now, how will you verify page checkpoint and hence broken links?
Run the above script. Go To Test Results > Your Check Point. Check the status of all
links under ―Broken Links Result‖
If you want to verify links pointing only to the current host check the box titled “Broken
Links- check only links to current host” under Tools > Options > Web. Similarly if
you want to verify links pointing to other hosts as well, uncheck it.
// TO Count No of Links in Web Page
How to return the total number of links in a webpage and their names and URLs
Solution: Use ChildObjects to get the link collection, then retrieve the properties
Use the ChildObjects method to retrieve all the links on the specified webpage.
Once you have the collection, you can use the GetROProperty method to retrieve the
innertext (name) and href (URL) values.
object.ChildObjects (pDescription)
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 39
40. VLearn Technologies
www.mysaptesting.com
Example:
‗ The sample was created against www.google.com
Set oDesc = Description.Create()
oDesc(―html tag‖).Value = ―A‖
Set rc = Browser(―Google‖).Page(―Google‖).ChildObjects(oDesc)
num = rc.Count()
For i=0 to num-1
tag = rc(i).GetROProperty(―innertext‖)
href = rc(i).GetROProperty(―href‖)
Reporter.ReportEvent 0, ―Links in Page‖, ―name: ― & tag & ―; url: ― & href
Next
// TO Count No of Links in Web Page
Simple Code To Check All Links
Set oDesc = Description.Create()
oDesc(―html tag‖).Value = ―A‖
Set rc = Browser(―title:=.*‖).Page(―title:=.*‖).ChildObjects(oDesc)
num = rc.Count()
For i=0 to num-1
Set rc = Browser(―title:=.*‖).Page(―title:=.*‖).ChildObjects(oDesc)
ref = rc(i).GetROProperty(―href‖)
Browser(―title:=.*‖).Page(―title:=.*‖).link(―text:=.*‖,‖index:=―&i).click
Browser(―title:=.*‖).sync
title1=Browser(―title:=.*‖).getRoproperty(―title‖)
MsgBox title1
Browser(―title:=.*‖).navigate(ref)
‘Navigates to the url taken from ―href‖ property
Browser(―title:=.*‖).sync
title2=Browser(―title:=.*‖).getRoproperty(―title‖)
‘get the tile of the tNavigated page
MsgBox title2
If title1=title2 Then
‘condition to check for the targetted page and Navigated page
Reporter.ReportEvent 0, ―Navigated To Correct Page‖,‖―&title1
′Reports if correct
else
Reporter.ReportEvent 1,‖―&title1,‖―&title2
End If
Browser(―title:=.*‖).back
‘Navigates back to main page
Browser(―title:=.*‖).sync
Next
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 40
41. VLearn Technologies
www.mysaptesting.com
// Chaild Objects
Set desc = Description.Create()
Set col = Browser(―name:=Google‖).Page(―title:=Google‖).ChildObjects(desc)
ct = col.Count()
msgbox ct
Set desc2 = Description.Create()
desc2(―micclass‖).Value = ―WebElement‖
Set col2 = Browser(―name:=Google‖).Page(―title:=Google‖).ChildObjects(desc)
ct2 = col.Count()
msgbox ct2
Set desc3 = Description.Create()
desc3(―html tag‖).Value = ―INPUT‖
Set col3 = Browser(―name:=Google‖).Page(―title:=Google‖).ChildObjects(desc)
ct3 = col.Count()
msgbox ct3
// Get Each Radio in RadioGroup And Check
Set opt=Description.Create
opt(―html tag‖).value=―INPUT‖
opt(―type‖).value = ―radio‖
Dim allOptions,all
Set allOptions=Browser(―a‖).Page(―b‖).Frame(―c‖).ChildObjects(opt)
all=allOptions.count
MsgBox all for i= 0 to all
eName=allOptions(i).getROProperty(―name‖)
noofradio=allOptions(i).getElementsByName(eName).length
for j= 0 to noofradio-1
radioname=allOptions(i).object.document.getElementsByName(eName).item(j).GetAdju
centText(―afterend‖)allOptions(i).object.document.getElementsByName(eName).item(j).
checked=true
msgbox radioname
next
next
// Copy an excel sheet to another excel
Following is the code to copy the conntents of a sheet in one excel to another excel sheet
Set objExcel = CreateObject(―Excel.Application‖)
objExcel.Visible = True
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 41
42. VLearn Technologies
www.mysaptesting.com
Set objWorkbook1= objExcel.Workbooks.Open(―C:Documents and
Settingsmohan.kakarlaDesktop1.xls‖)
Set objWorkbook2= objExcel.Workbooks.Open(―C:Documents and
Settingsmohan.kakarlaDesktop2.xls‖)
objWorkbook1.Worksheets(―Sheet1″).UsedRange.Copy
objWorkbook2.Worksheets(―Sheet1″).Range(―A1″).PasteSpecial Paste =xlValues
objWorkbook1.save
objWorkbook2.save
objWorkbook1.close
objWorkbook2.close
set objExcel=nothing
//Compare 2 Excel sheets cell by cell
This code will open two excel sheet and compare each sheet cell by cell, if any changes
there in cells , it will highlight the cells in red color in the first sheet.
Set objExcel = CreateObject(―Excel.Application‖)
objExcel.Visible = True
Set objWorkbook1= objExcel.Workbooks.Open(―C:Documents
andSettingsmohan.kakarlaDesktopDocs1.xls‖)
Set objWorkbook2= objExcel.Workbooks.Open(―C:Documents and
Settingsmohan.kakarlaDesktopDocs2.xls‖)
Set objWorksheet1= objWorkbook1.Worksheets(1)
Set objWorksheet2= objWorkbook2.Worksheets(1)
For Each cell In objWorksheet1.UsedRange
If cell.Value <> objWorksheet2.Range(cell.Address).Value Then
cell.Interior.ColorIndex = 3′Highlights in red color if any changes in cells
Else
cell.Interior.ColorIndex = 0
End If
Next
set objExcel=nothing
// Excel Sorting By Row:
Const xlAscending = 1
Const xlNo = 2
Const xlSortRows = 2
Set objExcel = CreateObject(―Excel.Application‖)
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open(―C:Documents and
Settingsmohan.kakarlaDesktopDocs1.xls‖)
Set objWorksheet = objWorkbook.Worksheets(1)
objWorksheet.Cells(1,1).activate
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 42
43. VLearn Technologies
www.mysaptesting.com
Set objRange = objExcel.ActiveCell.EntireRow
objRange.Sort objRange, xlAscending, , , , , , xlNo, , , xlSortRows
set objExcel=nothing
Excel Sorting By Colum :
Const xlAscending = 1
′represents the sorting type 1 for Ascending 2 for Desc
Const xlYes = 1
Set objExcel = CreateObject(―Excel.Application‖)
‘Create the excel object
objExcel.Visible = True
‘Make excel visible
Set objWorkbook = _
objExcel.Workbooks.Open(―C:Documents and
Settingsmohan.kakarlaDesktopDocs1.xls‖)
‘Open the document
Set objWorksheet = objWorkbook.Worksheets(1)
‘select the sheet based on the index .. 1,2 ,3 …
Set objRange = objWorksheet.UsedRange
‘which select the range of the cells has some data other than blank
Set objRange2 = objExcel.Range(―A1″)
‘ select the column to sort
objRange.Sort objRange2, xlAscending, , , , , , xlYes
set objExcel=nothing
// DELETE ROWS FROM XL SHEET
Public Function BIP_xlsDeleteRowRange (sSrcPath, sDestPath, sStartRow, sEndRow)
‗Create Excel object
Set oExcel = CreateObject(―Excel.Application‖)
‗Sets the application to raise no app alerts
‗In this case it will allow a file overwrite w/o raising a ‗yes/no‘ dialog
oExcel.DisplayAlerts = False
‗Open Book in Excel
Set oBook = oExcel.Workbooks.Open(sSrcPath)
‗Set Activesheet
Set oSheet = oExcel.Activesheet
‗Delete row range
oSheet.Rows(sStartRow +‖:‖+ sEndRow).Delete
‗Save new book to Excel file
oBook.SaveAs (sDestPath)
‗Close the xls file
oExcel.Workbooks.Close()
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 43
44. VLearn Technologies
www.mysaptesting.com
End Function
// DELETE COLUMNS FROM XL SHEET
Public Function BIP_xlsDeleteColumnRange (sSrcPath, sDestPath, sStartCol, sEndCol)
‗Create Excel object
Set oExcel = CreateObject(―Excel.Application‖)
‗Sets the application to raise no app alerts
‗In this case it will allow a file overwrite w/o raising a ‗yes/no‘ dialog
oExcel.DisplayAlerts = False‗Open Book in Excel
Set oBook = oExcel.Workbooks.Open(sSrcPath)
‗Set Activesheet
Set oSheet = oExcel.Activesheet
‗Delete row range
oSheet.Columns(sStartCol + ―:‖ + sEndCol).Delete
‗Save new book to Excel file
oBook.SaveAs (sDestPath)
‗Close the xls file
oExcel.Workbooks.Close()
End Function
// ADODB CONNECTION TO READ DATA FROM EXCEL SHEET
Function obj_UDF_getRecordset (strFileName, strSQLStatement)
Dim objAdCon, objAdRs
Set objAdCon = CreateObject(―ADODB.Connection‖)
objAdCon.Open ―DRIVER={Microsoft Excel Driver (*.xls)};DBQ=―&strFileName &
―;Readonly=True‖
If Err <> 0 Then
Reporter.ReportEvent micFail,‖Create Connection‖, ―[Connection] Error has
occured. Error : ― & Err
Set obj_UDF_getRecordset = Nothing
Exit Function
End If
Set objAdRs = CreateObject(―ADODB.Recordset‖)
objAdRs.CursorLocation=3 ‗ set the cursor to use adUseClient -
disconnected recordset
objAdRs.Open strSQLStatement, objAdCon, 1, 3
MsgBox objAdRs.fields(4).name
While objAdRs.EOF=false
For i=0 to 4
varConcat= varConcat&‖ ―& objAdRs.fields(i)
Next
Reporter.ReportEvent 0,‖Here is the Full Contents‖,‖―& varConcat
varConcat=――
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 44
45. VLearn Technologies
www.mysaptesting.com
objAdRs.moveNext
Wend
If Err<>0 Then
Reporter.ReportEvent micFail,‖Open Recordset‖, ―Error has occured.Error Code : ―
& Err
Set obj_UDF_getRecordset = Nothing
Exit Function
End If
Set objAdRs.ActiveConnection = Nothing
objAdCon.Close
Set objAdCon = Nothing
Set obj_UDF_getRecordset = objAdRs
End Function
Set rsAddin = obj_UDF_getRecordset(―C:Documents and
SettingsmohankDesktopLogin.xls‖, ―Select * from [Login$]‖)
//Use the CompareFiles function
The following function can be used to check and compare the content of the two files.
Note:
This function is not part of QuickTest Professional/Astra QuickTest. It is not guaranteed
to work and is not supported by Mercury Interactive Technical Support. You are
responsible for any and all modifications that may be required.CompareFiles (FilePath1,
FilePath2)
FilePath1 The path to the first file to compare
FilePath2 The path to the second file to compare
Public Function CompareFiles (FilePath1, FilePath2)
Dim FS, File1, File2
Set FS = CreateObject(―Scripting.FileSystemObject‖)
If FS.GetFile(FilePath1).Size <> FS.GetFile(FilePath2).Size Then
CompareFiles = True
Exit Function
End If
Set File1 = FS.GetFile(FilePath1).OpenAsTextStream(1, 0)
Set File2 = FS.GetFile(FilePath2).OpenAsTextStream(1, 0)
CompareFiles = False
Do While File1.AtEndOfStream = False
Str1 = File1.Read(1000)
Str2 = File2.Read(1000)
CompareFiles = StrComp(Str1, Str2, 0)
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 45
46. VLearn Technologies
www.mysaptesting.com
If CompareFiles <> 0 Then
CompareFiles = True
Exit Do
End If
Loop
File1.Close()
File2.Close()
End Function
Return value:
The function returns 0 or False if the two files are identical, otherwise True.Example:
File1 = ―C:countriesapple1.jpg‖
File2 = ―C:countriesapple3.jpg‖
If CompareFiles(File1, File2) = False Then
MsgBox ―Files are identical.‖
Else
MsgBox ―Files are different.‖
End If
// GET NAMES OF ALL OPEN BROWSERS
Set browserDesc = Description.Create()
browserDesc(―application version‖).Value = ―internet explorer 6″
Set browserColl = DeskTop.ChildObjects(browserDesc)
browserCnt = browserColl.Count
MsgBox ―There are ―&browserCnt&‖ instances of a browser‖
For i = 0 To (browserCnt -1)
MsgBox ―Browser # ―&i&‖ has title = ―& browserColl(i).GetROProperty(―title‖)
Next ‗ i
Set browserColl = Nothing
Set browserDesc = Nothing
// How to run the scripts in 8.2 those are recorded in 9.0 or higher
Step 1: Delete the object repository of 9.0
Step 2: open a Blank test in 8.2
Step 3: Create the shared object repository in 8.2 that should contain all the objects in 9.0
and save.
Step 4: create the action structure in 8.2 should contain the same num of actions, same
names and structure as the script of 9.0.
Step 5: save the test. (From now we call this as 8.2 scripts)
Step 6: from 8.2 script copy Test.tsp file to the 9.0 script.
Step 7: copy all Resource.MTR file found in Action0, Action 1, etc to 9.0 scripts
Step 8: now u can run the scripts with little modifications if require
Automated Test Script Creation Process
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 46
47. VLearn Technologies
www.mysaptesting.com
Debugging and troubleshooting test scripts becomes extremely tedious when the
test script has hundreds of lines of code, verification points, branching logic, error
handling, parameters, and test correlation among various recorded business processes. A
more manageable approach to debugging complex and lengthy test scripts is to record
portions of the script and debug those portions individually before recording other parts
of the test script. After testing individual portions, you can determine how one portion of
the test script works with another portion and how data flows from one recorded process
to the other. After all sections for a test script have been recorded, you can playback the
entire test script and ensure that it properly plays back from the beginning to the end with
one or more sets of data.
Always create a test plan that will assist in the creation of the regression test
script. A test script is only as good as the planning that takes place before it is written.
This saves time and organizes the process.
Remember that all regression test scripts will be written to run in the QA
environment as well as the production environment. The automated regression test use
will be a part of the production test used to determine if a build truly does function as
expected in production.
To manage the creation and edit of our automated regression tests QA will create
automated tests in the following manner:
1. Record each individual process such as logging in and logging out. Save
those recordings on your desktop.
2. Verify that the script will play back with no errors.
3. Continue recording and playing back throughout the test script creation
process, verifying the script will play back with each step taken.
4. Add multiple sets of data driven tests for each individual portion of each
test where that kind of test is applicable.
5. Verify the individual test scripts with multiple sets of data will play back
with no errors.
6. Add various check points throughout the test.
7. Verify the individual test scripts with various check points will play
back with no errors.
8. Now integrate all recorded processes into one large test script.
9. Verify the large test script will play back with no errors.
The key here is to ensure that each recorded process plays back successfully before
proceeding to record the remaining portions of the entire test script. Do not string the
individual tests together for playback without first verifying that all of the processes
could play back successfully as individual processes.
Lesson to be learned here is to never, EVER wait to debug a script until the entire test
script has been recorded.
Synchronization
Since QTP can play back recorded test scripts much faster than an end-user‘s manual
keystrokes all tests must be synchronized. Introduce artificial wait times in the test
scripts to make sure the script will run appropriately without errors unattended. Take into
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 47
48. VLearn Technologies
www.mysaptesting.com
account the fact that there will be times when the script will need to run slower than a
manual test due to network issues, etc. The goal here is we want to make sure the scripts
will run unattended through Test Director. Slowing down a script with wait times is not
very scientific and does not contribute to the creation of a robust automated test script
that plays back successfully without user intervention. That said, sync times will be
edited after the test script has been written in its entirety and has been tested to ensure it
runs with no errors.
Signed-off, Peer Reviewed
As part of the test readiness review criteria, test scripts will be formally accepted and
approved prior to starting the test cycle. QA, Business Analysts and Developers should
be involved in approving recorded test scripts. The QA Analyst writing the automated
test script should demonstrate that the test script successfully plays back in the QA
environment and, if possible, with various sets of data.
Recording, Playing Back Against Hidden Objects
Scripts might be recorded to populate or double click values for a field within a table grid
or an array where the location of this field is not fixed. If the field‘s location within a
table grid or array changes from the time it was recorded, the script might fail during play
back. Test scripts often fail during play back because the locations of objects that are not
displayed or visible within the screen have changed.
In order to play back scripts that are location sensitive or where the location is subject to
change, it might be necessary to enhance the script with functionality such as ‗scroll
down‘, ‗next page‘, or ‗find‘. Including such utilities ensures that hidden objects
requiring play back will be identified, and/or double clicked regardless of their location
within an array, table grid, or the displayed screen.
Create Automatic Notification for Critical Scripts
Test scripts should be enhanced with error handling programming logic that instantly
sends error messages to a tester‘s e-mail address when problems occur. Since some test
scripts are business critical and must run as batch jobs in the middle of the night we need
to know if something failed as soon as possible. The proper and successful execution of
these business critical test scripts can serve as a dependency or pre-condition for other
automated tasks. Always include logic in business critical test scripts that automatically
sends notification in the event of a failure.
Documentation
To make test scripts reusable and easier to maintain, please document all relevant
information for executing the test script, a test script header, and any special conditions
for execution of the test script. Example:
Name: Govind Mail ID: mysaptesting@gmail.com
Address: Namdev block, Plot No: 502, Prime Hospital Lane, Hyderabad Page 48