当前位置:网站首页>How to standardize the deployment of automated testing?

How to standardize the deployment of automated testing?

2022-07-06 03:39:00 Two black

If implemented properly , Automated testing can provide efficient productivity and quality improvements for product and system development projects . however , When the team just started implementing , Applying best practices can be a tedious task .

In this article , We aim to clarify some of the most common challenges that teams face in pursuing Automation , And may provide valuable solutions to overcome these challenges .

One 、 Test range

Whether it's functional testing , Or automation or performance testing , The first step is , Is to clarify the test scope and demand indicators . For automated testing , especially UI automation , Not all function points are suitable for UI automation .

According to the specific business situation and project stability , choice UI automation +API The combination of Automation , Select the appropriate business point to design the targeted automatic test scheme , That's the best plan .

For what project is suitable to do UI automation

Here are a few I personally think are more suitable for UI Automated point :

①、 High frequency of use , There are many abnormal judgments , And the most basic function , For example, user registration 、 Sign in ;

②、 The core functions of the client , Like the order center , Membership Center ;

③、 Promotion page 、 Information display page, etc ;


In terms of effect , Unit automation is the most profitable , But unit automation is for most beginners of automated testing , Too difficult .

At present, most small and medium-sized enterprises in China , Develop its own development specifications 、 Management and other work are not done very well , Unit automation , Probability of realization , Not optimistic in the short term .

And interface automation , At present, it is the most cost-effective choice .

UI The input-output ratio of Automation , Is the lowest of the three models , But for more and more complex large-scale systems ,UI Automation in some ways , It can also reduce the workload of many post release smoke tests .

Two 、 System architecture

For most functional testers , System architecture doesn't need much attention , But for automation or performance testers , The system architecture is the preliminary requirement analysis 、 A key point of technical scheme selection and design .

For example, the programming language of system development , The type of database used , Communication service framework ( If you want to do API automation , Then the communication protocol adopted by the system can't get around the point ), Deployment of application server, etc , All need to be considered .

3、 ... and 、 Project situation

On this point , I think we should confirm whether the system is suitable for automated testing through analysis and communication . that , What kind of system is suitable for automatic testing ?


As shown in the figure above , I've outlined some of the characteristics of projects that are suitable for automated testing , Of course , You don't need to have all , Only a few points need to be met to consider automated testing ( The part marked by the red line is the basic condition ).

Of course , The project situation is not just these , There are other points , It also needs to be considered , such as :

①、 Document management

Documents include requirements documents 、 Test plan 、 The test case 、 Test specifications 、 The development of specification 、 Database table design document 、 Interface documents, etc .

If the document is not perfect, there is even no corresponding document , So automated testing , The preparatory work in the early stage requires more time and energy .

②、 Process management

Whether the requirements iteration of the project is stable ? From requirements review to development 、 test 、 Whether there is a standardized process for release and launch ?

If the requirement iteration is fast or unstable , Then the script maintenance workload of automated testing will increase exponentially ; If there is no better process management , The progress of automation will always encounter many unspeakable pits , Communication costs , Change cost, etc , It will also affect

Design and planning of test scheme .

In automated testing , You need to be familiar with these questions , Be prepared to respond . Automated testing process , Change is the biggest challenge !!!

Four 、“ The goal is ” Agreement

there “ The goal is ”, It refers to personal goal setting and leader Expectations for Automation , The angle of the station is different , Understand the difference , Therefore, the expected results are different . Not to reach complete agreement , What I'm trying to say here is The importance of communication .

Personal information about the system , Technology Architecture , Understanding of test scope , Corresponding automatic test scheme design and goal setting , Should be the same leader Keep communicating , Constant adjustment , Reach a certain degree of agreement , This can also avoid a lot of subsequent trouble .

Of course , Goal setting , It should also be based on specific automation test requirements , Task splitting , review , Constant adjustment , This is a The process of continuous adjustment , It takes patience and persistence

5、 ... and 、 Running environment

Automated test script development , It also needs to be based on different environments , And the choice of environment , Different situations need to be considered , Here are my personal thoughts :

1、SIT Environmental Science :

SIT Environmental Science , Also known as system integration environment , It's what we often call a test environment , If the test script is based on SIT Environment development and debugging , So you need SIT The environment is relatively stable .

But most of the time ,SIT Because the environment requires multiple submission tests , The cross impact is large , And SIT There are still some differences between the environment and the production environment ( As for why , Believe in testing children's shoes , We all know the pain points ).

2、UAT Environmental Science :

UAT Environmental Science , This is what we call the acceptance environment , Of course, similar , There are also grayscale environments .UAT Relative environment SIT In terms of environment , It is relatively stable and consistent with production , It is very suitable for automatic test script development and debugging , And daily test regression .

But the role of automated testing is not limited to this , It can also carry out production and smoking after release , Regular polling test, etc .

3、 Production environment :

If the test script is developed and debugged in the production environment , And test execution , Then we need to solve the following problems :

①、 Network problems

In general, our SIT and UAT The environment is deployed inside the enterprise , The network environment is also an intranet , Request parsing is different from Internet . Run the script in the production environment for regression and smoke , You need to consider the real user operating environment , The influence of different networks on the test results .

And in the test script ,sleep It's best not to ( especially UI automation , Forced waiting is easy to bring many uncontrollable variables ).

②、 Data pollution

Automated testing of production environment returns to smoking , It is necessary to isolate the data generated by the test , Otherwise, the business will be affected , And pollute the production data . Common data isolation methods are as follows :

Test whitelist account 、 Network tags 、 Thread tags 、 The test data falls into the corresponding test library , Some businesses can also use MOCK Objects and baffles .

About data isolation , In performance testing , It is also a key point to be considered , Of course, these methods are often used for data isolation in performance testing , Avoid the impact of production data pollution .

6、 ... and 、 Service deployment

The continuous integration environment is also called CI Environmental Science , Similar to that CD Environmental Science ( Continuous delivery ).

These applications , In agile testing , There are many applications , But at present, in the industry , I personally understand that , More and more enterprises begin to build a continuous integration environment , The benefits of doing so are many , such as :

①、 Version iteration test , Can pass CI Service one click submission , Save time , Increase of efficiency ;

②、 If you need to make a lot of test data , You can use a small script , Just configure , Click the start button ;

③、 When releasing the production environment , Can pass CI Service automation packaging and deployment , It avoids the misoperation of manual packaging and configuration ;

④、 Automated test scripts , Deployed in CI After environment , Just click Start , Or set the departure conditions , The form of scheduled tasks , To achieve regular production polling , Smoke and other test work after release ;

7、 ... and 、 The test strategy

The strategy here , From the following perspectives :

1、 Task split

After confirming the test scope and demand indicators , Split the automated test tasks into smaller pieces , The time required for people to work / The range of days , Finish the task on time , Keep adjusting if you have problems ;

2、 priority

After the task is split , Prioritizing tasks , Communicate through review , Confirm which tasks to complete first , Then complete what... Etc .

Test scheme design , It can be divided into the first phase 、 Phase II automated test task , For example, the first phase realizes the coverage of automated testing to a certain extent , To achieve PC End of the automation test , The second phase can consider the automatic test coverage of the mobile terminal ,

The third phase can consider the development of automatic test platform and so on . Have goals and plans , Constantly adjust according to project changes and progress .

Prioritization of automated tasks , You can refer to these points :

①、 The higher the user frequency, the higher the priority should be ;

②、 The basic functions of the system should be at the top of the list ;

③、 System core functions ( Such as pay 、 Order ) Should be covered earlier ;

④、 Problems in production in the historical records are called multi-function points , We should consider covering as much as possible ;

3、 Man hour estimate

Preliminary preparations ( Such as scope confirmation 、 Demand analysis 、CI The deployment environment 、 Test plan design 、 Technical framework selection 、 Documentation, etc ) After completion , Work hour estimation needs to be made for specific split tasks , To confirm the phased progress of the work ,

Easy to adjust at any time . The following points need to be considered in man hour estimation :

①、 Automation Tester's personal technical ability , characteristic ;

②、 Project situation 、 Process management 、 The degree of change in the system architecture ;

③、 The degree of difficulty of the technical implementation of the test scheme ;

8、 ... and 、 solve the problem

Automated testing on the road , It's all holes !!!

We will encounter many problems in our work , Have communication problems 、 Management issues 、 Technical difficulties 、 And some indescribable problems , But only by finding a way to solve these problems , We can constantly improve in our work , Finish the work , Get what you deserve .

Different enterprises have different kinds of problems , There is no perfect company , So at work , Learn to adapt to the environment , Harmonious communication , It is also a necessary part of the work .

The essence of work is to take money to eliminate disasters , solve the problem , Create value !!!

therefore , A good mindset , Persistent attitude , Solutions to problems , This is what children's shoes need to be tested automatically ...

Learning resource sharing

Finally, thank everyone who reads my article carefully , Watching the rise and attention of fans all the way , Reciprocity is always necessary , Although it's not very valuable , If you can use it, you can take it

These materials , For those who want to advance 【 automated testing 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful …….

Join my communication group below for free !

原网站

版权声明
本文为[Two black]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060338286986.html