AUTOMATION USING QTP


PART-1

The very first moment you enter into an organization is configuring mail Id to Outlook (if you get in as an experienced then you should do it yourself else the Admin will do it)….the very first 20 days is where processing of your data, verification will be done…and will be assigned to a project within a month after then. For Fresher training will be provided based on companies requirement and then assigned to a project.
Check in to download the necessary documents to your local working folder in your local machine from the Repository/Database/VSS/CVS whichever is maintained by your company & Check out to Upload the documents you have worked on back to the Repository (contains all the necessary documents(Configurable Items - PMP, SRS, FRS, Test Plan, Templates-TS, TC, Status reports-DSR,WSR, DDR, Retesting Report, etc.., Non Configurable Items – MOM, Status Reports.., etc.., ) and the work history of all resources allotted to that particular project).

Folder Structure in Manual Testing

So from the above Picture we can understand that Automation is only a small part of Software Testing Life Cycle.

Test Execution Folder Structure is as below
Within the V1.0 (each Version) there are multiples of Builds as below

 Automation Framework Folder Structure is as below



What is Automation testing?
Automation testing which is also known as Test automation is when the tester writes scripts and uses software to test the AUT. This process involves automation of a manual process. Automation testing is used to re-run the test scenarios that were performed manually, quickly and repeatedly.
Apart from regression testing, Automation testing is also used to test the application from load, performance and stress point of view. It increases the test coverage; improve accuracy, saves time and money in comparison to manual testing.
What to automate?
It is not possible to automate everything in the Software; however the areas at which user can make transactions such as login form or registration forms etc, any area where large amount of users can access the Software simultaneously should be automated.
Furthermore all GUI items, connections with databases, field validations etc can be efficiently tested by automating the manual process.
When to automate?
        Test Automation should be used by considering the following for the Software:
        Large and critical projects.
        Projects that require testing the same areas frequently.
        Requirements not changing frequently.
        Accessing the application for load and performance with many virtual users.
        Stable Software with respect to manual testing.
        Availability of time.
How to automate?
Automation is done by using a supportive computer language like vb scripting and an automated software application. There are a lot of tools available which can be used to write automation scripts. Before mentioning the tools lets identify the process which can be used to automate the testing:
        Identifying areas within a software for automation.
        Selection of appropriate tool for Test automation.
        Writing Test scripts.
        Development of Test suits.
        Execution of scripts.
        Create result reports.
        Identify any potential bug or performance issue.
        Software testing tools
List of Automation Testing Tools:
        HP Quick Test Professional
        Selenium
        IBM Rational Functional Tester
        Silk Test
        Test Complete
        Testing Anywhere
        Win Runner
        Load Runner
        Visual Studio Test Professional
        WATIR
Benefits of Automated Testing
        Reliable: Tests perform precisely the same operations each time they are run, thereby eliminating human errors.
        Repeatable: You can test how the software reacts under repeated execution of the same operations.
        Programmable: You can program sophisticated tests that bring out hidden information from the application.
        Comprehensive: You can build a suite of tests that covers every feature in your application.
        Reusable: You can reuse tests on different versions of an application, even if the users interface changes.
        Better Quality Software: You can run more tests in less time with fewer resources.
        Fast: Automated tools run tests significantly faster than human users.
        Cost Reduction: The cost is reduced as the number of resources for regression test is reduced.
        Choosing the right tools for the job and targeting the right areas of the organization to deploy them can only realize these benefits. The right areas where the automation fit must be chosen.
Disadvantages of Automation Testing
Though the automation testing has many advantages, it has its own disadvantages too. Some of the disadvantages are:
        Proficiency is required to write the automation test scripts.
        Debugging the test script is major issue. If any error is present in the test script, sometimes it may lead to deadly consequences.
        Test maintenance is costly in case of playback methods. Even though a minor change occurs in the GUI, the test script has to be re-recorded or replaced by a new test script.
        Maintenance of test data files is difficult, if the test script tests more screens.
Some of the above disadvantages often cause damage to the benefit gained from the automated scripts. Though the automation testing has pros and corns, it is adapted widely all over the world.
When do you choose automated testing over manual testing?
Automation is chosen when
1. A same set of tests need to be repeated again and again.
2. When a single test needs to be repeated for a large number of data.
3. When stable modules needs to be regressed frequently
.

PART-3
Differences

Steps to create Per Action Object Repository:
1. Open a new script in QTP. (By default each test will have one action i.e, Action1)
2. Ensure that the record and run settings are provided.
3. Click on record button
4. Record the script for Action1
5. Select insert --> Call to new Action
6. Provide the action name and description
7. Click on OK
8. Record the script for Action2
9. Repeat the above 4 steps to create multiple actions.
10. Click on stop recording

Difference between Object Repository & Object Spy:
1. An Object repository (is similar to Database, but not DB)maintains only the unique information about the object. Whereas Object spy displays all the properties of the object.
2. The contents of object repository are editable.  Whereas the contents of object spy are not editable.

Difference between Action and Function?

Action is a collection of Vb statements in QTP. It does not return any value. Function is a collection of Vb statements in QTP.
    It returns single value.

We can call functions within actions but we can't call actions within functions

 Generally functions are saved with ".vbs" extention where as actions will save with ".mts".

 Every Action will have its own Datatable where as function does not.

 Action can have a 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.

 Action contains Object Repository, Data table, Active screen etc. whereas function donot have these features.
Action is internal to QTP whereas Function is just lines of code with some/none parameters and a single return value.

 Action can/cannot be reusable whereas functions are always reusable.

 Action Parameter have default values whereas VB script functions do not have any default values.

Action parameter type are by value only where VB script functions can be passed by ref.

 Action can have multiple output (returning) values whereas function can return only single value.

Keyword Driven Framework  ?
Keyword Driven Approach means; Keywords, example: Commands, functions, methods, statements etc., are used for creating Test scripts
For Flight App-
Four Functions needed to be Created with KEYWORDS:
1. Login
2. Insert Order
3. Update Order
4. Close App


PART-4
Solutions to some common problems while working with QTP
PART-5

Common Templates Used are as below:



Comments

Popular posts from this blog

QA's approach 2 Java - Understanding Static context

QA's approach 2 Java - Collections Framework & Generics Introduction

Technologies - Log4J - Create Log4j Configuration File - Where ? How ? What ?