Abstract: Software testing, in the field of software is often seen by practitioners do not directly create value of the work link, the industry has been promoting software testing practitioners to pursue high-quality, efficient and low-cost testing. With the rapid development of AI& big data technology, software testing has also brought good news. Baidu MEG Quality performance platform has been exploring the application scenarios of AI technology in the field of software testing since 2018. With continuous breakthroughs in exploration, it is found that software testing contains extremely rich AI scenarios. We define intelligent testing as: a test method that combines data and algorithms to enable quality activities; After discussion and exploration, we divide intelligence testing into three stages: computational, perceptual and cognitive intelligence.

Intelligence testing Development Stage 1: Computational intelligence

In this stage, the behavior data generated by software process + algorithm + machine computing power is embedded into the quality activities to assist and intervene the testing behavior, so as to achieve the goal of improving quality and efficiency. This stage does not pursue sophisticated algorithms, but aims to prove that data and algorithms can play a great role in software testing.

In this stage, we realized the shortening of the queuing time of the test task based on genetic algorithm and task priority algorithm, the application of memory leak detection based on DTW algorithm, the accurate replay of the ten-billion-level flow based on Pearson correlation coefficient and bucket algorithm, and the significant reduction of the use case execution based on JC distance use case screening technology.

We spent nearly two years mining 50+ application scenarios in software testing activities and got very positive results. However, in practice, we also recognize the limitations of computational intelligence, such as use case recommendation based on coverage. If there is modification of the underlying code, most use cases will be selected, but the actual use cases still have no ability to uncover faults, resulting in great waste. In order to solve such problems, perceptual intelligence arises at the right moment.

Second stage of development: Perceptual intelligence

The confidence at this stage comes from two realities of the software testing world: 1. Not all software changes are risky; 2. Not all software testing activities expose risks. Therefore, there is a great waste of resources and problems in the field of software testing, which urges us to explore perceptual intelligence.

At this stage, behavioral data generated by the software process + higher-order algorithms + machine computing power are used to perceive risks and make decisions like human beings. The main purpose of this stage is to perceive, identify risks and make decisions like human beings to guide quality activities more efficiently. The explorations in this stage are as follows: Application of vision technology in front-end automation use case writing, popover removal, UIDIFF and other fields; The use-case recommendation technology based on risk prediction Bayesian + CatBoost can improve the use-case recommendation ratio from 50% to 10%. The autonomous test system based on LR model to predict project risk achieved 70% low-risk unmanned intervention online. White box code defect detection based on deep learning. These scenarios and breakthroughs in technical applications prove that AI can completely replace human beings in software testing to perceive and identify risks and make quality decisions, making software testing activities sufficiently efficient. Baidu intelligence test is currently mainly in this stage of continuous exploration.

The third stage of development: cognitive intelligence

The continuation of this phase is intelligent perception, perception of intelligent phase can be perceived risk recognition and decision to put into what kind of quality activities, but still the quality activities may be performed by people, such as use case writing, scene design, artificial click, such as cognitive intelligence after the perceived risk, the hope can be made by machine actual response to uncover risk, In this phase we explored based on the intelligent abnormal AST unit test code generation technology of c + + exception single recall problem such as the core, infinite loop, UCB policy priority traversal based unit time higher page coverage, intelligent positioning technology to reduce artificial screening failure cost, delivery, continuous integration pipelining scenarios such as self-healing technology; This stage is still in its infancy, but we believe that as AI technology continues to mature and innovate, cognitive intelligence will also usher in a big explosion.