How to learn automated testing in 2020?

With the advent of artificial intelligence, automated testing has now become a popular industry. To tell the truth, it means to look at the face of wages. Generally speaking, the wages are still ideal, and there is hope in taking care of the lives of wives and children. So no matter how much you have to learn, no matter how difficult it is, you still have the motivation to do it. Yes, you are so responsible.
Where do you start with a thousand words?

The first thing to say is the learning steps of automated testing

  1. Do manual tests (knowledge of various tests)

  2. Learning programming language

  3. Learn the basics of the web

  4. Learn automated testing tools

  5. Learn automated testing framework

  6. Realize automated test cases

  7. Develop automated testing tools

  8. Develop automated testing framework

Secondly, we must know the difference between manual testing and automated testing, learning to keep up with the team~~
1. Manual testing and automated testing are not opposites

Many people will mistakenly think that there is no need for manual testing if you have automated testing. If manual testing is done well, automated testing is not needed, but it is not. The two are not opposites. Whatever means is efficient, whatever means is used. Automated testing has been developed for so many years, and manual testing has not been replaced.

2. Features of manual test cases

1) Good exception handling capabilities, able to verify whether the current step is implemented correctly through human logic judgment;

2) Manual execution of use cases has a certain step jump;

3) Manual test step by step tracking, able to locate the problem in detail;

4) Mainly used to find functional defects;

3. Features of automated testing

The object of execution is a script, which can be judged by human logic to verify whether the current step is correctly implemented. The use case steps are closely related, unlike manual test cases. In addition, it is also used to ensure that the main function of the product is correct and complete, freeing the tester from the heavy work.

Can make better use of resources. Perform automated test cases at night. The test is portable and repeatable. Good test scripts often have better platform portability. The software can be brought to the market faster. Because automatic testing saves a lot of time. However, the initial investment required for automated testing is relatively large, and personnel must undergo rigorous training.

4. The relationship between automated testing and manual testing

Automated testing cannot completely replace manual testing. The purpose of automated testing is only to free testers from the tedious and repetitive testing process and devote more time and energy to more valuable testing, such as exploratory testing.

1. Automation tools:

Web automation testing tools: Selenium, QTP.

App automated testing tools: Appium, Uiautomator, monkeyrunner, NetEase atx, test sikuli based on image recognition and comparison.

Interface automation: rest-assured, requests, httprunner, etc.

2. Types of automated testing

Test static content

Static content testing is the simplest test to verify the existence of static and unchanging UI elements, for example:

1) Each page has an expected page title, which can be used to verify that the link points to an expected page;

2) The homepage of the application contains an image that should be at the top of the page;

3) Whether each page of the website contains a footer area to display the company's contact information, privacy policy, trademark information, etc.;

4) Use the title text of each page

Tags? Does each page have the correct header text? You may need (or may not need) automated testing of page content. If your web pages are not susceptible to impact, testing the content manually is sufficient. Assuming that the location of your application files has moved, content testing is very valuable.

Test link

A common mistake of a web site is a broken link or a link pointing to an invalid page. Link testing involves each link and verifying the existence of the expected page. If the static link does not change frequently, manual testing is sufficient. However, if your web designer frequently changes links or files are redirected from time to time, link testing should be automated.

function test

In your application, you need to test specific functions of the application, require some types of user input, and return a certain type of result. Usually a function test involves multiple pages, a form-based input page, which contains several input fields , Submit and cancel operations, and one or more response pages. User input can be through text input fields, checkboxes, drop-down lists, or any other browser supported input.

Functional testing is usually the most complex type of testing that requires automated testing, but it is usually the most important. Typical tests are login, registration of website account user account operations, account settings changes, complex data retrieval operations, and so on. Functional testing usually corresponds to your application’s description of application features or design usage scenarios.

Test dynamic elements

Usually webpage elements have unique identifiers, which are used to uniquely locate the elements of the webpage. Usually, the unique identifier is realized by the id attribute or the name attribute of the html tag.

Ajax test

Ajax is a technology that supports and dynamically changes user interface elements. Page elements can be changed dynamically, but the browser does not need to reload the page, such as animations, RSS feeds, and other real-time data updates.

Ajax has countless updates to enlarge the elements on the web page. The easiest way is in an Ajax-driven application. The data can be retrieved from the application server and then displayed on the page without reloading the entire page, only a small part of the page. , Or only the element itself is reloaded.
Three, 12 misunderstandings of automated testing

1. The process of automated software testing is the same as manual software testing

The skills required for automated testing are different from those required for manual testing.

Usually, your project manager will be confused by those testing tool salespeople, thinking that automated software testing is simply pressing a record button to generate a test script. In fact, it is not that simple.

It is very important to distinguish between the skills required for automated testing and those required for manual testing. The most important thing is that automated test engineers need to master software development skills. Manual testers without any training or manual testers without programming background will encounter many difficulties when implementing automated testing.

2. Automated testing will definitely reduce the number of testers immediately

Automated testing will not immediately reduce the number of testers significantly. Because in the initial stage of automated testing, a certain amount of manpower needs to be invested in the development of automated test scripts, and automated test scripts are gradually used in daily tests to gradually reduce the time and number of manual testers engaged in repetitive work. In order to shorten the development time of automated test scripts, you can consider using the power of outsourcing the development of automated test scripts to realize large-scale automated testing as soon as possible.

3. Test automation is recording and playback

Merely recording is not a valid automation script.

Many project managers still equate test automation with the use of recording and playback tools. In fact, the recorded script is usually a non-reusable script, the script is full of hard-coded values, these values ​​should be parameterized, otherwise the script is only suitable for a test situation, the script should also add conditional judgments, loops and other structures , In order to enhance the flexibility of the test script.

4. Automated testing cannot find bugs

Automated testing does not directly find bugs, but liberates the productivity of experienced test engineers, frees them from repeated regression tests, and engages in the research of new test methods and test methods. Automated testing frees up testers' time and energy to indirectly find more and deeper new bugs, and improve product quality to a new level.

5. Automated testing tools are "omnipotent"

When many people hear about automated testing, they think that automated testing tools can complete all testing tasks, from test planning to test execution to test result analysis without any manual intervention. Obviously, this is an ideal state. In reality, no test tool has this capability, and there will not be any in the future. In reality, relevant test design, test cases, and some key test tasks still require human participation. That is, automated testing is an aid and supplement to manual testing, and it will never completely replace manual testing.

6. Friends who like it have a monthly salary of 10W

Those who come in are all friends who love testing. It's a compliment to lift up your precious golden hands and backhands.
7. Automated testing tools are easy to use

Regarding this point, many test engineers have the same wrong view, believing that test tools can simply generate scripts by capturing (recording) client operations, and the scripts can be used for playback without editing. In fact, automated testing is not that simple. Whether the captured operations are correct and whether the script editing is reasonable will affect the test results. Therefore, automated testing requires more skills and more training.

8. Automation can provide 100% test coverage

Not everything can be tested automatically. It is impossible to cover all possible inputs, all possible combinations and paths.

Automated testing can increase the breadth and depth of testing, but it still cannot achieve 100% test coverage because there is not enough time or resources.

9. Forget the ultimate goal of testing: find BUG

In automated testing, attention should also be paid to the application of boundary value analysis, equivalence class analysis, risk-based testing methods, and selection of the most appropriate test cases.

Usually in the process of automated testing, we are busy building automation frameworks and writing test scripts, but we often forget the original purpose of testing: finding bugs.

The project manager may hire the best automation developers to build the framework, use the latest and greatest automation development technology, and create thousands of automated test scripts. But if the BUG is still missed, those BUGs that should have been captured by the automated test script, and the results are not captured, then your automated test will still be considered a failure.

10. All test cases can be automated

Not all test cases and test steps can be transformed into automated testing. In industries where there is a lot of investment in automated testing, the automated testing rate of leading companies can reach about 80%, but there are still about 20% of test cases that need to be performed manually. In foreign countries, the development of automated test scripts is usually carried out simultaneously from the development of the first version of test cases, so the automated test rate is generally higher than that of Chinese companies.

11. Only performance testing needs automation

Automated testing is not only used for performance testing, but also widely used for functional testing verification. More than half of automated test scripts abroad are used for functional verification testing.

12. Test tools can be applied to all tests

Each automated testing tool has its scope of application and available objects, so it cannot be considered that an automated testing tool can meet all testing requirements. For different test purposes and test objects, appropriate test tools should be selected to test it. In many cases, it is necessary to use a variety of testing tools or develop automated testing frameworks to achieve the purpose of automated testing. Commercial and open source testing tools can be used for automated testing, but we need to develop automated testing frameworks based on the characteristics of our products, provide commonly used test cases in the framework, speed up testing, and achieve test case reuse. This is future testing The path of automation development.

13. Automated testing can find a large number of new defects

Finding more new defects should be the main purpose of manual testing. Automated testing cannot be expected to find more new defects. In fact, automated testing is mainly used to find the original defects. Automated testing is used for regression testing, and a large number of new business tests rely more on manual testing.

The above description is the whole content of this article, and some suggestions are made. Everyone takes advantage of the hardships of learning when they are young, so that they can become self-disciplined and become the spiritual "richest man" in the future. Some people ask whether the spiritual "richest man" is worth? The editor secretly took a bite, and by the way tells everyone that the spiritual "richest man" is gilded, and the pure gold is old and valuable. Others rely on the annual salary to eat, and you rely on your worth to eat. Think about it and you will be full.

Guess you like

Origin blog.csdn.net/cemaxueyuan/article/details/108430886