There are many factors that affect stability, such as the complexity of the architecture, space utilization, and chain length of the entire functionality.
This article focuses on link length.
I don’t know if you’ve heard the term full-link manometry. That is to directly test the pressure of the whole functional link, and press out the weakest link for optimization and reinforcement.
So in our test development work, when developing a function, if the link to realize this function is too long, the more supporting services, then its stability will be greatly reduced. As we all know, the quality of a car chain is determined by the weakest link.
In the full link of a function, any error in one link will result in the failure of the whole link.
Liu, a test developer for a large company, recently took charge of a feature that periodically monitored the online login interface, essentially running local requests scripts every five minutes.
However, as a senior tester, such a small script to write a for loop to poll was too low, so he decided to do something very big.
1. Firstly, the structure of the interface. He is going to extract the latest structure from the interface document, monitor the online log, and change the monitoring script of the online interface in real time.
2. The data of the interface was not written to death, so part of the data was extracted from the log of the pressure testing platform, and the other part was called from the company database.
3. Execution interval. He used Jenkins of the company to set up a slave machine to control the execution interval.
4. Script code, he used Jenkins hook to automatically obtain the latest code of Gitllab, automatic deployment.
5. Underlying driver: He used the request underlying microservice of the interface test platform.
6. Check algorithm. He was too lazy to write a new one, so he directly called the check interface of the company’s central desk.
7. Manually triggered. Once receiving the online notification email, it will trigger the execution once every day through monitoring emails.
8. Report results. Automatically generated report results are sent to the responsible person, so he dynamically obtains email addresses from the company’s user database and organizational structure relationship.
9. The alarm system, including email alarm, telephone alarm and SMS alarm, is called directly by using the interface provided by the company’s center station, which is simple and convenient.
10. Data quantification. He stored all the request logs and made a small function to regularly count the success rate and other data.
The whole organization structure design is like this, said to do, in his hard to spend several days of time finally fixed the interface monitoring function, very happy. But after stability became his sting, he received a lot of alarm, and feedback, check, found that because of the problems in network/support services to, today is China upgrade, tomorrow is the service maintenance, the day after tomorrow is the document address change, the day is the database permissions, greatly the day after tomorrow is the pressure measuring platform token expired… .
What he didn’t understand was what was wrong, that the architecture was both high end and functional, impeccable. But why did this happen? In fact, it is very simple, the whole architecture is too complex, too many modules, too many supporting services, too many calls.
Pulling a whole body, he did not fulfill the high cohesion/low coupling idea.
Later he paid attention to the public number: test development dry goods. It occurred to him that he should not have designed such a complex design in the first place, but took it as it came, so he planned to develop a specialized maintenance robot to periodically check the stability of all his support services…….
In addition to the above:
Stability is also part of the quality test tool.
A lot of times it’s inversely proportional to efficiency. What the leader says is to pursue both efficiency and quality, which is difficult to achieve if the cost is fixed. Therefore, the purpose of methodology is to prevent us from blindly doing things that waste costs and reduce stability.