How to learn automated test tools QTP

Source: Internet
Author: User
Tags error handling object model

Online to see a good article written, the personal feel that the summary of a more comprehensive, reproduced to share under. -_-

This article originates from: http://www.51testing.com/?161787

Engaged in a few years of testing, but also witnessed the development of testing, the test industry today is increasingly demanding practitioners, is no longer confined to the requirements will be written test cases, will perform detailed testing, can effectively detect system defects, and more and more enterprises on the applicant's own skills are increasingly demanding, recruitment information such as " Proficiency in at least one scripting language such as Vbscrīpt, Perl/rbuy, "at least familiar with a development language", "proficient in QTP, LR and other automated testing tools", "successful experience of large-scale project automation implementation", this kind of wording also gradually increased. At present, in addition to the white box test content and test management, the mainstream direction has two: Functional automation testing and performance testing. This requires that practitioners can quickly grasp the knowledge in a short period of time in order to obtain a better job opportunities. I am a function of automated testing engineers, with their own learning, the process of working together QTP talk about how to learn the automated test

First of all, want to engage in automated testing, we must first understand the what/why/how, which is often said to understand what is automated testing, why automated testing, how to do automated testing, this kind of information online there are many, here do not repeat

Secondly, according to the characteristics of the project, choose the appropriate automated testing tools, and understand the characteristics of the tool. Take QTP as an example of how to master it. For beginners, most are generated by recording the script, this stage should have mastered the basics of

1) QTP is how to identify the object, the novice will often appear when the recording of the script replay error, this time should be considered for what. If you know the principle of qtp recognition, I think I can quickly locate the reason.

2) to master some of the methods of QTP objects, such as Getropreperty, Gettopreperty, childobjects and so on, for similar methods should be to find out exactly where the difference. What's the difference, like Getropreperty and Gettopreperty?

3) What is the action parameter and what is the test parameter. What is the difference between the two, and what are the links between the same test and different test how these parameters work

4) What is an environment variable. How environment variables are created and used, what is the difference between an environment variable in parameter passing and the action parameter, the test parameter

5) Understand the checkpoint knowledge, understand what the built-in checkpoints are, and what are custom checkpoints. and figure out when to use checkpoints.

6) Master the operation of the object library, understand the significance of the object library for testing, such as whether to enable the intelligent recognition of the impact of the test script, why the same object is recognized by the _1, _2 and other suffixes are needed to study clearly the problem

These questions are clear, that basic can use QTP to generate the correct script, of course, the above is only part of the content must be mastered, in fact, many details of the setup, it is necessary in the actual use to master.

Next, you can further improve your QTP application level, this stage will need to learn VBS knowledge and how to use descriptive programming to implement the script, while in the process also need to learn HTML knowledge, DOM, XML, as well as Excel, Word and other API knowledge, in general , what should be mastered at this stage broadly includes

1) vbscrīpt basic knowledge, familiar with common methods and functions, master the operation of file objects, etc.

2) Proficiency in XML technology, Excel, Word and other API objects, you can create logs as needed, etc.

3) Master the knowledge of Dom and HTML, and can combine these techniques to parse the Web page

4) Master The basic Operation statement of the database, can use ADO object to manipulate data

5) familiar with regular expressions, many times the problem of dealing with objects is quite convenient

6) Learn how to call DLLs to work

7) Ability to use QTP's automated object model to create the desired operating mode

8) Mastering WMI Knowledge

The above is just my consideration of the part, not comprehensive, hehe, for everyone's reference, of course, these technologies are mainly for the web system operation, because our system is b/s, hehe. If all this knowledge can be mastered, the individual thinks, basically can deal with most of the problems in the automation process, this time you on the automated testing technology should have accumulated a certain

The next step is to consider automated test framework issues. When the script scale to a certain extent, you will face some problems, such as:

1) How to manage and dispatch scripts effectively

2) How to implement unattended execution of scripts, automatic error handling and logging during testing

3) How to generate a profile-specific test report

4) How to maintain test scripts more efficiently

5) Separation of framework code and business code from tiering, business scripts, and business data

This stage mainly embodies the testing idea of the tester, which can be separated from the tool independent existence process. Of course, the actual situation of the various company projects, resulting in the design of different ideas, but in general generally include data-driven and keyword-driven two modes. The latter is more difficult to achieve than the former, and most companies are currently using data-driven models. This phase should not be limited to technical use, but need to be considered from the test, layered design, modular implementation, reduce the coupling between the code

If the above three aspects can be done very well, then congratulations, you can be independently responsible for the project's automated test set up work, hehe.

In short, the Learning automation test needs to be carried out in the actual project, so that the improvement will be faster, the project has used a lot of technology, automated implementation process will encounter a variety of problems, is a good learning opportunity, the key to be good at summing up, accumulate experience, as long as the details can be done, Then you will be able to become an excellent automated test engineer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.