No wonder I was involved without knowing it! Learn automated testing like this and get it done in one week! ! !

At present, automated testing is not a new thing, or various methodologies for automated testing have emerged in endlessly. However, there are not many teams that can understand automated testing and implement it well. Let's introduce automation in a popular way. test……

First of all, let’s start with the recruitment job requirements. Looking at recent career opportunities, I mentioned "Software Test Engineer", which basically all have requirements for automated testing. For example:

  • Learn about selenium, appium or otherautomated testing frameworks
  • Be familiar with at least one object-oriented development language, and have certain coding skills are preferred.
  • Familiar with Java or python, with certain test automation experience and code reading ability
  • Understandinterface integration testing, and be able to use JMeter, Postman, SoapUI and other interface testing tools

Wait, the above content will not be listed one by one. Suddenly automated testing is blooming everywhere, as if test engineers’ automated testing capabilities have become standard. This article will start from the requirements of automated testing, simply carry out automated testing literacy, and strive to let everyone understand automated testing in one minute.

Then we will analyze it from the five words "automated testing".

test

Test: We are familiar with this one. The most classic explanation is "Program testing is a process performed to find errors." This comes from G.J. Myers' classic book "The Art of Software Testing" The definition shows us the essence of testing: process.

Testing is a process performed to find software errors. This process can be the following:

  • Run the software under test and perform the functions of the software
  • Run other tools to examine the inside and outside of the software

All in all, it is a process, a process of execution. Next is the most common test diagram:

For example: the test supervisor asked the test engineer to go through all the functions of the software. The test engineer used the mouse, keyboard, microphone, mobile phone screen touch, etc. to go through all the functions of the software. What is this called? Children's shoes who are familiar with testing understand that this is the legendary "manual visual inspection" and this is "human flesh testing".

Let’s draw this picture carefully, and it actually looks like this.

automation

At this point, combined with the above statement, automated testing is to let the tested software run by itself and perform the functions of the software; or it is to let other tools run by itself to check the internal and external aspects of the software.

  • Since testing is a process, automated testing is an automatic execution process.

Next we discuss a core issue: automation. What is automatic? Let the machine move by itself, which is automatic. Let the machine go through all the functions of the software according to human requirements. This is automation. . Would it be clearer to say this?

Here comes the point, the machine. Letting the machine move is not "eating chicken", it is a human ordering the machine to operate. I wonder if children’s shoes have ever thought about how machines know human requirements? In the above example, the test supervisor only needs to tell the test engineer, and the command transmission is completed. But direct human communication is far easier than human-machine communication.

  • First of all, machines cannot understand "human language", whether Chinese or English...
  • Secondly, the "assembly language" that the machine knows by default should be something that most children don't know, and they won't be able to master it in a short period of time.

Well, with "programming language". It’s time to bring out our other picture:

Machine learning of a programming language is ridiculously easy and simple: just install it and the machine will learn it. Fortunately, it is not particularly difficult for humans to learn programming languages. It seems this works.

With programming language, there is a bridge for human-computer communication. The only thing left is to help the machine choose tools. To do the corresponding tests, you need to find the corresponding tools, so that automation will start automatically. At this point, I hope you all understand the basic "automatic" principle.

Similarly, draw this schematic diagram of automated testing:

Then we introduce various common tools to continue the discussion of automated testing. Before going further, let’s look at the common classifications of testing. Under different classification dimensions here, we can divide it into different tests. Here we will analyze it carefully.

  • From the practical process of software testing: unit testing, integration testing, confirmation testing, system testing, acceptance testing...
  • From the perspective of software testing methods and strategies: white box testing, black box testing, grey box testing……
  • From the testing perspective of software testing: functional testing, performance testing, compatibility testing, security testing, exploratory testing……< /span>
  • From the technical level of software testing: manual testing, automated testing, test development...

For the classification under the above dimensions, only part of the tests can be completed through "manual visual inspection" of "human flesh testing". The rest actually require machines to complete from a broad concept. We extract this part of the test: system test-black box test-functional test-manual test. It is undeniable that this line is the focus of current software testing practitioners, and areas outside this range are where automated testing comes into play.

 Recommended tutorials related to automated testing:

The latest automated testing self-study tutorial in 2023 is the most detailed tutorial for newbies to get started in 26 days. Currently, more than 300 people have joined major companies by studying this tutorial! ! _bilibili_bilibili

2023 latest collection of Python automated test development framework [full stack/practical/tutorial] collection essence, annual salary after learning 40W+_bilibili_bilibili

Recommended tutorials related to test development

The best in the entire network in 2023, the Byte test and development boss will give you on-site teaching and teach you to become a test and development engineer with an annual salary of one million from scratch_bilibili_bilibili

postman/jmeter/fiddler test tool tutorial recommendation

The most detailed collection of practical tutorials on JMeter interface testing/interface automated testing projects. A set of tutorials for learning jmeter interface testing is enough! ! _bilibili_bilibili

To teach yourself how to capture packets with fiddler in 2023, please be sure to watch the most detailed video tutorial on the Internet [How to Learn to Capture Packets with Fiddler in 1 Day]! ! _bilibili_bilibili

In 2023, the whole network will be honored. The most detailed practical teaching of Postman interface testing at Station B can be learned by novices_bilibili_bilibili

automated test

Next, let’s discuss the mainstream automated testing solutions. Without exception, they all consist of programming languages ​​​​for human-computer communication and machine operation tools.

  • Functional automated testing
  • VBScript + QTP (HP UFT), commercial functional automated testing solution
  • Python/PHP/Java/C#/JavaScprit/Ruby + Selenium/Appium + unit testing framework, open source functional automated testing solution
  • Here we will introduce a little more. Selenium/Appium itself cannot be regarded as a testing tool, but is just a tool used by the machine to operate the browser, and this tool can understand multiple languages:
  • Java and C# are two important languages
  • Python, Ruby these twoScripting light languages
  • PHP and JavaScript are two languages ​​that specialize in dealing with the Web.
  • Tools plus specified languages ​​allow machines to operate browsers, but testing is not yet possible at this point, so each language needs its own unit testing framework to complete the construction of this functional automated testing solution.
  • In addition, the industry also has a temporary solution, which is composed of Python 2 + Robot Framework + Selenium Library plug-in + Unit testing framework A test plan, which I do not highly recommend, mainly based on two points:
  • Concept: This is a keyword-based solution, so keywords are the specialty of QTP (HP UFT), not the original intention of Selenium
  • Technology: Python 2 will eventually withdraw from the stage of history. If you are starting to do automated testing from scratch, you should start with Python 3 directly. However, Robot Framework does not support Python 3...
  • Python/Java/C#/JavaScprit/Ruby + Gauge, another open source functional automation testing solution
  • Thoughtworks' automated testing tool based on BDD concept
  • Gauge itself is a complete testing solution
  • Gauge is a test plan that covers fromRequirements Analyst (BA) to Test Engineer (QA)
  • Java/Python + Macaca, Alibaba’s functional automation testing solution, has the disadvantage of less documentation
  • JavaScript + TestCafe, DevExpress’s open source functional automation testing solution
  • pure node.js - TestCafe does not use Selenium and does not require plugins to run tests in an actual browser. It's built on top of node.js, so it integrates and works well with modern development tools
  • No additional setup or configuration required - TestCafe is all set up to run tests immediately after npm install
  • Complete testing tool - Using a single launch command, TestCafe launches a browser, runs tests, collects results and generates reports
  • JavaScript + Postman, a free automated testing solution for web interface functions
  • Groovy + SoapUI, an open source web interface function automated testing solution
  • Performance automated testing
  • Java/C + HP LoadRunner, commercial version performance testing solution
  • Java + JMeter, open source version of performance testing solution
  • Python + locust, open source version performance testing solution

Here, we borrow a picture from someone else, Martin Fowler, one of the founders of agile development methods. He borrowed the concept of a pyramid to show the levels of testing.

In fact, automated testing covers the entire process from UI (functional testing) to contracts (interface testing) and underlying code methods (unit testing). If you want to master automated testing well, you really need to accumulate experience in the following three fields. :

  • Programming language, object-oriented programming is preferred, because a large number of open source technology solutions are based on object-oriented programming.
  • Third-party testing tools and testing frameworks, these are mainly learned through the documentation on the official website
  • The concept and design of testing, tools and languages ​​are just the means of testing. How to prepare test data, how to set test checkpoints and test steps determine the success or failure of the test.

In addition, the comprehensive front-end and server back-end technology guarantees test execution. Come on, kids, have 3 minutes passed?

So do you know about automated testing now? If you still have questions, please feel free to discuss with me!

 Summarize:

 Optical theory is useless. You must learn to follow along and practice it in order to apply what you have learned to practice. At this time, you can learn from some practical cases.

If it is helpful to you, please like and save it to give the author an encouragement. It also makes it easier for you to search quickly next time.

If you don’t understand, please consult the small card below. The blogger also hopes to learn and improve with like-minded testers.

At the appropriate age, choose the appropriate position and try to give full play to your own advantages.

My path to automated test development is inseparable from plans at each stage, because I like planning and summarizing.

Test development video tutorials and study notes collection portal! !

Guess you like

Origin blog.csdn.net/m0_70618214/article/details/131229934