With a monthly income of 30,000+ and 6 years of experience in test development, it is considered that the test ceiling has been truly realized....

In this technology-hungry IT industry, when I first entered the industry, I did the most basic work every day, but as time passed, I became confused about the value and meaning of myself and the position.

One is that I feel like I’m wasting time, and the other is that I’ve been doing tests for almost 2 years, and I feel like I’m living in a muddle every day, my salary has never risen, and my position has never been promoted. Many colleagues around me have either been promoted or raised their salaries. Either I changed jobs and went to work in a better company, and I especially felt that I was doing nothing.

 

I began to think about how to change the status quo. The simplest idea at that time was to squeeze out time to learn various testing techniques and tools, and improve one's own value, that is, core competitiveness. Later, I was accidentally discovered by the test team leader, gave me some resources and documents, and suggested that I study automated testing. At that time, I had not been exposed to automated testing, but through the resources given to me by the team leader, I realized that development knowledge is helpful for testing work, and the ability of programming language will determine the depth of your testing technology. Of course, it can also bring high income.

At that time, it was the scripting language that became popular. Because of the reason for the project at that time, I became attached to Python, and began to use Python language and Selenium to try to do automated testing. At that time, there wasn't much about Selenium for Python, and I started blogging about it while I was learning.

Sharing is the driving force for learning new technologies. Most of the time, it is difficult for us to persist in learning a new technology because of the lack of feedback. Whether it is internal sharing or blogging, it is a good feedback mechanism. Of course, it's also very rewarding. Later, I transformed into automated testing, and then to test development. Unknowingly, I have more than 6 years of experience in test development, and my monthly salary has also exceeded the threshold of 30K. I have stayed in the Meituan test development framework team and built the Meituan platuo test. Framework, thrift testing framework, automated testing platform, which also made me familiar with python3, vue, and successively built automated testing frameworks in many companies from 0 to 1 to ensure the quality of over 100 million traffic services.

 

In the past two days, I talked with my friends about the industry trend of software testing. With the change of career and the influx of college students who graduated, they frantically entered the software testing industry. Wanting to obtain better treatment and opportunities, constantly mastering new skills, and improving business capabilities has become an urgent problem for software testing practitioners to solve. No matter what level of test engineer you are interviewing, the interviewer will always ask "Can you program? Have you done automated testing?", so it is still at the level of functional testing. If you do not improve your technology, you will also face the pressure of the waves pushing forward. . You can only accept the dilemma, and even face elimination in the end. Not to mention the appreciation and salary increase, so how to achieve the goal of technical improvement from functional testing to automated testing is a necessary stage for many junior testers.

As someone who has experienced it, I have a deep understanding of the difficulties in the learning process. So I am keen to collect and organize resources, and record the process from stepping on the pit to climbing the pit. I hope that I can record what I have learned, the techniques used in actual work, self-study methods, experience, and some pitfalls I have stepped on. One is to sort out oneself better, and the other is to be able to achieve better community sharing.

 

Let me share my thoughts on the above issues:

  • First of all, automated testing is easy to learn! But remember, you must be clear about the direction of learning, don't go too far and waste your energy.
  • First, of course you can do automated testing without writing code, but my personal suggestion is to learn a language. As for the language to learn, it is very simple and you don’t have to worry about it. The first thing to check is whether you have a programming foundation. If you don’t choose py, if you do, choose Both java and py are available
  • Second, you need to look at what language you use for development. Using the same language as development can lower the threshold of communication between you and development while learning automated testing, and increase your right to speak in the company.
  • Third, which direction to study? I suggest: web ui automation = "interface automation = "app automation/small program automation, of course, focus on learning interface automation, ui automation must be learned, but there is not much need to delve into it.
  • Fourth, do you want to sign up for training courses? It depends on you personally. If you feel that you have a strong ability to learn and understand, and you are very self-disciplined, and at the same time the direction of learning is very clear, then of course you don’t have to sign up for training. Wouldn’t it be nice to save some money?

If you have no understanding of automated testing or some programming languages, and there is no one around you who can teach you, then signing up for training is definitely a way to improve quickly.

Lay the foundation before building a building, first you need to learn a language

We also mentioned above that in order to do well in automation, you must learn at least one language. Of course, to what extent do you want to learn a language? I can't keep learning, can I? The answer is, just use it!

Mastering most of the grammatical basics can already meet your daily automation needs, because writing scripts is not as difficult as developing!

You need to learn the language, for loop, if judgment, data type, operator, object-oriented programming, etc., whether it is java or python, these are all needed, in fact, the same, if you know one language, the others are similar.

After getting started with the language, you will officially embark on the road to becoming a god of automation, the introductory chapter Selenium

As the ancestor of automation, selenium has been played badly. Basically, as long as it is doing automation, everyone knows it. Why learn selenium first?

It can help you quickly understand what automation is, and it can give you intuitive feedback on the page. We did the same at the beginning, looking at selenium's api, bit by bit, and tried almost every method.

Selenium has 1.0 2.0 3.0. It is recommended that you learn about its history, u and its operating principle before learning, so as to arouse your interest in learning. You need to install a browser to learn selenium. It is strongly recommended to use Chrome instead of FireFox, the former is more compatible.

After installing Chrome, you need to install the driver. Congratulations, you will step on the first pit of automation! Most of the reasons are because your driver version and browser version do not match. After being able to visit Baidu, su and kw are very impressive here (you will know what they are after you learn them)

You will try various selenium methods again to operate the browser. At this time, it seems to open the door to a new world, oh! It turns out that automated testing is such a thing! amazing!

Tired of Selenium

After you have played for a few days or a few weeks, you seem to have no interest in Selenium, and the scripts are getting more and more 6, and you can write some linear automation scripts. At this time, you are a little proud and complacent. Automation is nothing more than that, is that all?

What I want to say is, don't be too happy, you just stepped into the door of automated testing and took a small step. At this point, you can start to try, write some repetitive operations in the project into scripts and run them, and you will feel a sense of accomplishment! The effectiveness of automation has initially taken shape, as if you have begun to understand how to use automation to improve efficiency.

Get started with the automation framework unittest/testNG

When you learn the unit test framework unittest/testNG, when you learn selenium, you will find that most of the linear scripts are difficult to manage, and each script needs to be run one by one, and the test results cannot be counted. At this time , you need a unit test framework to debut!

You will start to learn how to use the unit test framework, how to create a test class, how to write test methods, how to write your script as a test case, how to verify whether the test is passed, how to control the execution order of use cases, and how to write assertions , These are what you have to explore and learn.

Not satisfied with the capabilities of the unit testing framework

When your script is well written, the use cases will be organized, and then every time the leader tells you to run a test, then send the test results to him, and summarize them in the form of a test report.

At this time, you open your editor many times, run the test, and then run the test in a hurry, statistical test results one by one, and send them to the leader after being exhausted.

The next day the leader said again, before you leave work, you can run another test and give me a report, and you will feel like dying. Then you start to browse Baidu, browse the forum, and want to get a solution, then the "framework" will come into view once.

Learning Automation Framework

At this point, you have already started to think about how to write an automation framework, which means that your automation has already started to get started, and it is developing towards the intermediate level. You start to study the structure of the framework and find that there are case management, logs, test reports, Mail, basic encapsulation classes, etc., and a framework design pattern (classic PO pattern)

You start to organize your use cases, encapsulate base classes, write page classes, encapsulate logs, mail modules, etc. After a few weeks of polishing, your first automation framework is born!

At this point, you can go to various technical groups to show off, and automatically write an automation framework, and many novices will start to praise you and call you a master.

Initial Interface Test

The above ends the learning of UI automation, so let's go to the interface. Generally, companies use the http interface, so you start to learn from the http protocol, understand its structure, request header, request parameters, request address, request method, etc., and try to learn some packet capture tools

Such as fiddler, chales, wireshark or browser developer tools, etc., to capture packets to obtain some interfaces, and slowly observe its request structure, but at this time it is still in the fog, and I don’t know much about the interface. So I downloaded an interface testing tool, tried to enter the parameters into the tool, and manually initiated the call.

When the tool returns a 200 code, oh, that's what happened. It seems to transmit and receive data with the server, and then the front-end page will display the data to the foreground!

Try to learn the Request/HttpClient library to initiate a request

After using postman, you will think, so how do I use code to initiate a request? At this time, you need to learn these two things. After pip install & import requests, start your interface automation journey.

You try to use the interface to realize the addition, deletion, modification and query of the previous ui automation. You take the request parameters of the packet capture, call one by one method, and then run it with one click! One green and three red! Why? Then I found that the interface returned 401, no permission! profound! I am not logged in, so how can I log in? ?

Start researching with a lot of doubts. At this time, you need to understand the working mechanism of cookies and tokens, and then cooperate with your code to cache cookies to achieve login. After solving this problem, the interface still reports an error. Deleting the interface reminds me that there is no such data!

After checking and checking, it turns out that my piece of data has been used up, so how can I ensure that the parameters I enter every time are new? At this time, you need to understand the interface association, how to extract the parameters from the response of the previous interface, and use it for the next interface.

request/HttpClient combined with unittest/testNG+allure

In the same way, when you learn request/HttpClient, you will naturally think of integrating them with a unit test framework, and then you will find a tall allure test report, combined with some log module printing parameters, such an interface framework that you are familiar with It came out, almost the same as before! Trivial.

Try to manage test cases with yaml/Excel

Waiting for you to take your own framework and write test cases repeatedly and boringly, at this time you think, why do I have to request.post every time , the method is the same, but the data is different, why do I have to write code all the time? ,very tired! Why not use some files to read test data and do parameterization?

At this time, you start to study reading and writing excel/yaml. You want to manage all test cases in files, so you don’t have to write code every time, but things are not that simple! So how do I handle linked data in the file? How to cache cookies? How to make an assertion? What if you do some dynamic input?

The above questions are left to you to think for yourself.

Premium goods? git?jenkins?docker container? distributed?

At this point, you have already written several frameworks and optimized them based on your own framework. Then you find a very serious problem at this time. My code can only run locally. If you want to use it for others , You also need to configure the environment on someone else's computer, and copy the code to him.

So why not use some code management tool to manage my scripts? Then you will need to learn git and know how to add commit push to push my code to the company's gitlab, so that others can use it, so with gitlab, I want to do some scheduled tasks and let it execute automatically?

Learn jenkins. More, what if I want to run multiple use cases together? Learn selenium grid, docker, etc. .

Test platform/tool ​​development at the top of automation

You are still not satisfied after you have built the company's automation ecosystem. Why don't I manage these things visually? Make a platform? Manage use cases, manage tasks, manage test reports? Can I also integrate some of the company's deployment tasks?

Great idea! At this time, you are not only an excellent automation engineer, but also on the road of test development! Start learning, understand the test framework httprunner, the development framework django/flask/springboot, understand the process of interface development, understand mybatis, shiro, quartz, etc., and start learning the front end

PS: The above is just me, and I believe it is a learning route for most people who learn and like automated testing. Of course, some automated testing on the App side/small program side is not mentioned this time, but they are all roughly similar. I wish you all less detours!

Finally, I would like to thank everyone who has read my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, you can take it away if you need it:

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey, and I hope it can help you! Partners can click the small card below to receive 

Guess you like

Origin blog.csdn.net/okcross0/article/details/130157655