程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

What do Python automated tests need to learn? How to learn? Where to start? After reading this article, the goal of learning automated testing is clear, and learning is simple and rough.

編輯:Python

Before writing this article , I have met many colleagues , Because they have been doing manual testing before , Now I am eager to do automated testing , There is no shortage of work 5 More than one year old . I have been engaged in software automation testing for nearly 5 year , from server End to web End , from API To mobile, Experience the benefits and pain of Automation , Share your personal experience here . Want to automate , First, you have to understand some common problems of automated testing :

Some problems in automated testing

One 、 Before learning automation , You need to know what automated testing is ? 

In a broad sense Speak up , Automation includes everything through tools ( Program ) The behavior of replacing or assisting manual testing can be regarded as automation , Include performance testing tools (LoadRunner、Jmeter), Or a program written by oneself , Used to generate 1 To 100 Test data . So in fact, in a broad sense : Performance testing 、 Interface testing and other tests that use testing tools are called " automated testing ".

In a narrow sense , Simulate the process of manual testing by means of tool recording or scripting , Execute test cases by playing back or running scripts , Instead of manual verification of system functions .
Of course , What is often said in the industry “ automated testing ” And the requirements of the enterprise “ automated testing ” Most of them are “ Based on product or project UI Automated testing of layers ”. For performance testing , Interface testing is not generally categorized as automated testing .

Two 、 Why do automated testing

according to 51testing Of 《 Survey report on software testing practitioners in China 》, Manual testing accounts for 89% , Relative to development , Test the bottom of the threshold , Salaries are generally low , Although the required knowledge has a certain breadth , But it lacks depth . This is the general status of testing .
Just because the threshold of manual skill test is not high , Make a large number of graduates , Even non professionals poured into the industry . Thus increasing the fierce competition in this industry . For those who have worked for several years and are in manual testing, they will have a strong sense of crisis . Because the technical content of the work is not high , Salary growth has encountered a bottleneck , On the other hand, it is threatened by new entrants , For the same job, the company spends 5K People who recruit can do , Then it won't take 8K Trick .
This question should not have appeared in the discussion of technology , But it is a problem that most testers have to face . therefore , In terms of the development of testers , I really need automation technology to increase my competitiveness .
The most tangible advantage of automated testing is —— Work is easy to find : There's a test engineer ( It's not me ) Find an interesting phenomenon , Almost all the testing positions she applied for , Automation testing experience is needed in recruitment . But when she started working , It turns out that these companies are trying to do automated testing , But most of the results are not very . however , Although she was involved in some tragic projects , But she can always wrap these tragedies into comedies for the next interview .

3、 ... and 、 What are the main types of automated testing

Automated testing is generally divided into three types : Unit automation testing , Interface automation testing ,UI automated testing .

The unit automation test is generally carried out by the R & D personnel , The tester mainly carries out interface and test UI My self Dynamic test , But because of UI The demand for is changing frequently , So interface testing is what testers do most . 

Four 、 The advantages of automated testing

Frequent regression tests - Quick feedback - Almost unlimited test case iteration execution - Support agile and extreme programming - Documentation following test cases - Custom defect report  - Be able to find defects not found in manual testing

5、 ... and 、 What projects are suitable for automated testing ?

If you have decided to learn automated testing , How to learn is the next problem to face ? This problem is analyzed based on the tested product , If the technology you learn can't be applied ( verification ), It will make your learning process difficult . 

First, consider whether the product is suitable for automatic testing . The common consensus of this method is to weigh it from three aspects .2.6 Software requirements change infrequently 2.7 The stability of test scripts determines the maintenance cost of automated testing . If software requirements change too frequently , Testers need to update test cases and related test scripts according to changing requirements , Script maintenance itself is a process of code development , Need modification 、 debugging , Modify the framework of automated testing when necessary , If the cost is no less than the test cost saved by using it , So automated testing is a failure . Some modules in the project are relatively stable , And some module requirements are very variable . We can test relatively stable modules automatically , And the big change is still manual testing . The project cycle is long

Due to the determination of automated testing requirements 、 Design of automatic testing framework 、 It takes a long time to write and debug test scripts . Such a process itself is a test software development process , It will take a long time to complete . If the project cycle is short , There is not enough time to support such a process , So automated testing becomes a joke .

The reuse of automated test scripts should be considered from three aspects , On the one hand, whether there are great differences between the tested projects ( Such as C/S Systems and B/S Differences in systems ); Whether the selected test tool adapts to this difference ; Last , Whether testers have the ability to develop an automated test framework to adapt to this difference .

6、 ... and 、 Mainstream automated test framework

  • Automated testing framework

The tools for desktop programs are :QTP、 AutoRunner
web The tools used are :QTP、AutoRunner、Robot Framework、watir、selenium

  • Test framework selection

because B/S Many advantages of Architecture , Many years ago C/S The application of architecture turns to B/S structure . And that's what drives web Development of development and testing technology . This has also led to QTP The desolation of the framework ,Selenium Frame and Robot Framework The proliferation of frameworks .
The tested product is C/S Architecturally , The recommended QTP ;
The tested product is B/S structure , The recommended selenium ;

  • The mainstream automated testing framework in the market

RFS: Robot Framework + Selenium
Selenium+unittest frame
Why not QTP Or other tools ? because selenium Yes B/S Application support is very good , More important , It supports multilingual development , A real trial selenium , What you need to master is not just a tool , You also need to learn a language .

7、 ... and 、 Measurement opening selection python still java?

In terms of language learnability : ruby、python;
In terms of the breadth of language application : python、java、C#、php;
In terms of language related testing technology maturity and data : python、java、ruby;
You can consider what language the entire technical team uses , Then choose the appropriate language ;
We are here to naturally select the most popular in the market , It's widely used , Those with high technology maturity Python Explain ;

8、 ... and 、 Automated test learning path

How to systematically turn functional testing to automation ? Now I've integrated some common and necessary points in enterprises to share with you :

One 、 First learn a programming language , Suggest python【 Notice that the pictures are not all shown , Include all the original learning road maps not shown below , Friends in need can Point here Check the bulletin board Join my automated test exchange group to download ,(← You can click directly to the announcement Office )

Because the article cannot be too long , All nodes are not displayed , Friends in need can join my technical exchange group to download by themselves

Two 、Python Automated test framework application

 

3、 ... and 、 Automated testing - Web UI automation  

 

 

Four 、 Automated testing - Mobile UI automation

 

 

5、 ... and 、 Automated testing - Interface automation testing

 

 

6、 ... and 、 Automated testing - Continuous integration Git、jenkins、Docker

 

 

  7、 ... and 、 Automated testing -  Performance testing LoadRunner、jmeter、app performance

 

 

  8、 ... and 、 Automated testing - WEB Security testing 、 Penetration test 、 Vulnerability scanning

 

 

Nine 、 Automated testing - RobotFramework、AirTest

 

 

10、 Test and development - Automated test platform development

 

 

11、 Internet high salary test to expand knowledge 、Redis、MongoDB、Nginx Cluster practice

 

I hope you want to learn by yourself , Through my sharing, I can take fewer detours , It can form its own system , And applied to practice . Of course , I sincerely hope you will get a promotion and a raise , Because there is bread, there will be a better life pursuit .

summary

These skills will help testers gain very high value in the industry . Especially for all the latest automation tools and CI/CD Tools ( Such as Jenkins or GitLab) Have a proper understanding of , Then you will not only become a valuable resource in the team , It will also become a valuable resource in the industry .

Learning performance test 、 automated testing 、 Security testing or something , It must get twice the result with half the effort .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved