Automated testing: You don't understand the joy of automated testing at all

I have contacted many colleagues, because they have been doing manual testing before, and now they are eager to do automated testing, and many of them have worked for more than 5 years. I have been engaged in software automation testing for nearly 6 years. From the server end to the web end, from API to mobile, I have personally experienced the benefits and pains brought by automation. I would like to share my personal experience here.

[Station B is the most easy-to-understand] Python interface automation testing from entry to proficiency, ultra-detailed advanced tutorials, watching this set of videos is enough

If you want to do automation, you must first understand some common problems in automated testing:


Some problems with automated testing 

What is automated testing? 

1. Why Automated Testing

Why automate testing, the answer starts with the benefits of automated testing and the cost of human testing: 
 a. Automated testing saves costs (according to the project). 
       After all, automated testing does liberate a lot of manpower (human cost is the biggest cost of IT companies) , can let the machine perform some repetitive work day and night. 

 b. Some test items are difficult to implement manually (manual cost is high), 
       such as 12306 stress test and load test, and it is unrealistic to find so many people to test at the same time. You can use the machine To simulate. 
 c. Project quality process needs 
    For example, version management requires build verify to ensure that the code checked in will not affect the version library. Similar to smoke test

2. Advantages and disadvantages of automated testing

Advantages 
  Prevent testers from getting bored due to repetitive work 
   Improve test efficiency 
   Ensure consistency and repeatability of each test Make 
   better use of unattended time 
   Conduct some tests that cannot be performed manually 
   Relatively high maintenance costs Disadvantages 
  System development time may not be sufficient Shorten 
  No manual testing to find defects Many 
  UI layout issues are not easy to find

3. What kind of project is suitable for automated testing (dev shakes hands, auto is busy all night)

Projects with the following characteristics are more suitable for automated testing: 
1. Less project changes 
2. Long cycle 
3. Sufficient project resources (automation is not completed by one person, it needs a group of people to maintain for a long time) 

For example: 
    Internet projects, within a week Go online, if you don’t go online, other people will not use you. The project cycle is short and the changes are fast. If you haven’t done the automation well, the project may go offline. For example, a project related to the Double 12 event of a certain treasure went offline within a week. 
    Projects suitable for automated testing, such as a treasure client, most of the functions remain unchanged in each release, and the project will not be offline within 3-5 years, this is more suitable for automation.

4. What kind of person is suitable for automated testing?

This question is for people who want to do automated testing. Maybe you think that the threshold for software testing is very low, so low that anyone can do it, just a little bit. This industry is too low, so you want to do automated testing. To improve your own skills, I want to say that manual testing is not low. If someone who doesn’t understand anything and has no business foundation is asked to do the test, can the problem be detected? Don't ignore your business knowledge reserves. 
The accumulation of your business knowledge reserves can make you an irreplaceable industry expert, and automated code farmers will be replaced by small fresh meat due to the change of an era. 

After talking so much, what kind of person can do automated testing? 
My understanding is divided into several points: 
 a. Have the ability to code 
    and master a development language, java, Python, ruby, c# 
 b. Familiar with the system under test 
  For example, if you are a web tester, you must understand js, css, html, xpath 
  you For mobile testing, you must have Android development foundation and iOS development foundation. If you are able to debug apps, 
  you are C/S tester and you must be familiar with TCP and IP protocols. 
 c. Master a set of automated testing frameworks (tools) 
    such as selenium/appium 
            nunit/testng 
           robot framework/cucumber 
 
 d. Be good at learning, to know what it is and 
    why it is. unpredictable. 
    In the past, Nokia was still the overlord of mobile phones, relying on Symbian to rule the world, but they did not want to make progress, and ended up selling themselves to survive.
    Once qtp was very popular, once selenium was also very popular, and now appium is also very popular 
    software industry has migrated from desktop software to web, and from web to mobile. No one knows what is next. And as practitioners in the software industry, we cannot let ourselves decline because those very popular things are not popular. The most core ability of a person is the ability to learn. If you are good at learning, you don’t have to worry about these changes, because you can do it without worry Stress-free migration, you have mastered the principle of selenium, and learning appium is a piece of cake, because appium uses 
    selenium WebDriver protocol. If you can know what it is, you can also build wheels and transform appium, after all Many functions need to be improved now. 
    
    If you do not meet the above points, I suggest you do manual testing.

5. If you have a code foundation, how do you learn if you want to engage in automated testing?

Many beginners are very entangled, learn qtp or learn selenium. 
My suggestion is to learn selenium, which is open source and free. You can download the source code for research to understand its principles. Besides, there is not too much information about selenium now, just search for a large one Heap, easier to learn. 
It is not recommended to learn selenium IDE recording. Of course, you can learn by recording some and converting them into corresponding scripts. After you have learned selenium, you will have a natural deja vu when you learn appium. Why is it not recommended to learn QTP/UFT? Because of the fees/bloat/the work of doing desktop software testing is not too much now. 
Regarding buying books, it is not recommended to buy books. Many books are outdated and the quality is scumbag. The code in those books you bought can no longer be used. If you really want to learn, go to the official website to find examples, go to the corresponding communities and groups Exchange, or directly look at the API/source code.

Summarize: 

Newcomers to learn automated testing should:

  •  Master a development language
  •  master some basic knowledge
  •  Buy less books, read more test framework documents, and go to the community to communicate more
  •  Keep learning to improve your ability to discover and solve problems (don't be a hand-out party, do more hands-on)

Learning steps for software automation testing

The approximate steps are as follows:

1. Do a good job of manual testing (understand the knowledge of various tests) -> 2. Learn programming language -> 3. Learn Web basics (HTML, HTTP, CSS, DOM, Javascript) or learn Winform

-> 4. Learning automated testing tools -> 5. Learning automated testing framework -> 6. Implementing automated test cases -> 7. Developing automated testing tools -> 8. Developing automated testing frameworks
 

The highest state of automated testing is: developing testing tools, designing automated testing frameworks, and letting others use them.

The essence of automated testing

The essence of automated testing is: test the program with the program. That is to say, learning "programming language" is the basis for learning automated testing.

Many people ask me to learn automated testing, what automation tools should I learn. My answer is, the first step: you should learn the programming language first, and then learn the automated testing tools later

It is necessary to write codes for automated testing. The level of programming language determines the level of automated testing. With solid programming skills, you can do anything.

When learning a programming language, treat yourself as a developer and systematically learn various programming knowledge.

Misunderstandings of automated testing and learning

Many novices learn complex automated testing tools at the beginning. I think this is putting the cart before the horse.

If you don't understand the HTTP protocol first, you won't understand tools such as Jemeter, LoadRunner, Fiddler, and SoapUI.

If you don't understand HTML and DOM first, you won't understand tools like Firebug

If you don't understand the Win32 API first, you won't understand the principles of Windows Forms automated testing.

If you have not developed a website yourself, you will not understand all aspects of the website, and it is inevitable that there will be omissions in the test.

In short, to learn automated testing, you need to step by step and lay a good foundation.

Automation Testing jobs

The position of an automated test engineer is called: (SDET) Software Development Engineer in Test. Focus on automated testing

Manual test engineer is called: (STE) Software test engineer. Focus on manual testing

There are many SDET positions in Microsoft, but there are no STE positions. STE positions are generally outsourced to outsourcing companies. At present, automated testing is still very popular.

Automated testing classification

There are also many types of automated testing, 

  1. Automated testing procedures for web UI
  2. Automated testing program for Windows Forms UI
  3. API testing, such as (testing WCF service, Web API, etc.)
  4. Database testing, such as testing stored procedures
  5. Interface test (this can only be used for automated testing) 
  6. unit test
  7. Performance testing, performance testing needs to use automation

Classification of Web Automation Testing

At present, most of the projects are web-based, so most of the automated tests we talk about are automated tests for web programs. Web automated tests are divided into two categories: 

The first category is: simulate the real operation of the user, for example, simulate clicking the mouse, keyboard input, etc., to operate the controls on the browser. (Representative frameworks include selenium-webdriver, VS Coded UI)

This type of automated testing uses high-level languages ​​(C#, JAVA, Python, etc.) to call some tools of selenium to operate the browser and help us implement Web UI automation

The second category is: simulate HTTP requests. Similar to this [ 12306 train ticket website automatic login tool ], there is relatively little information on this aspect of knowledge on the market. (I will publish a series of tutorials in the future)

Knowledge points of automated testing 

You should learn technology with the same mentality as a developer. Automated testing requires the following knowledge:

Knowledge of Javascript, CSS. 

Proficiency in DOM and HTML knowledge, (used to parse the web interface)

Proficiency in XML technology, (need to save test data in XML and display test reports in XML)

Proficiency in using C# P/inoke technology to call Windows API (can be used to operate Winform window)

Familiar with the concept of form "handle"

Proficiency in using C# to operate the Windows registry 

Proficiency in using the Process class in C#

Familiar with the basic operation statements of the database (the test database must be used)

Proficiency in the knowledge of the HTTP protocol (please refer to my HTTP series blog [ Detailed HTTP protocol ])

Familiar with the usage of the HttpWebRequest class in C# (for simulating HTTP requests)

Proficiency in regular expressions

Book Recommendations for Automation Testing

There are really not many books about software automation testing. I checked all the books about automation testing on the market, and only found the following book. After mastering this book, you can basically get started with automation testing. 

automated testing tools

Test suite tools: JUnit, Nunit, MSTest, these tools have the same functions and are relatively easy to learn.   

Performance testing tools: JMeter, VSTS load testing, LoadRunner (paid), QTP (paid)

Web UI testing frameworks: WebDriver/Selenium, VSTS Coded UI, Watri

Windows UI Testing Framework: VSTS Coded UI 

Other tools: firebug, Fiddler 

Finally: [Tutorials that may help you]

I believe that if you have mastered all the knowledge and skills in the picture above and can use them flexibly, there will be no problem with a monthly salary of more than 20k. All the learning materials in the picture above have been sorted out. Friends can use the cards below to help themselves take away

Guess you like

Origin blog.csdn.net/xiao1542/article/details/131903463