Understand continuous testing, only to understand DevOps
Posted Jun 16, 2020 • 5 min read
The success of software products depends to a large extent on timely control of market demand. The adoption of DevOps can speed up product delivery and improve user experience, thereby helping to maintain an advantage over competitors.
As an extension of the agile development methodology, DevOps emphasizes collaboration and communication between different teams in development, testing, and operation.
Continuous integration and continuous testing is a process of building, testing products, and fixing bugs in iterations. It helps the team discover defects early in the development phase, when the defects are usually relatively less complex and are easier to resolve. Through continuous integration and continuous testing, companies can minimize the risk of errors as early as possible and accelerate the delivery of better quality software.
Benefits of continuous testing in DevOps for product development
Regular risk analysis:You will have a build that has gone through all the testing phases, because continuous testing will mark the potential risks of each phase.
Improve user experience:Continuous testing adapts to the dynamic needs of users. The team can continuously update based on feedback to make the product more robust, more flexible, and more reliable.
Enhance product security:By creating a support system, you can ensure that applications are protected from threats and malware.
Plan feedback:Evaluate all architectural layers of the delivery pipeline and share executable feedback with the team.
Higher resource utilization:As mentioned earlier, finding bugs early can save money and resources. You can use best practices for continuous testing and defect prevention strategies and redeploy valuable resources to other strategic development plans.
Continuous testing for the role of DevOps
During the DevOps process, continuous testing provides a continuous feedback mechanism that acts as a catalyst in the entire product delivery pipeline. Automatic feedback at each stage ensures that defects can be resolved early in the development process.
Actionable feedback is necessary, which determines whether the next process in the delivery chain can be initiated. For example, if the feedback can move forward, the process will continue; if the feedback shows that there is a problem, then the process needs to be suspended and corrective actions taken.
Continuous testing conducted by a professional testing team can assess the business risks associated with the software in real time. In addition, it provides risk-based feedback to help the team make better trade-off decisions.
Practice of continuous testing in DevOps
1. Move left or right of the test
Traditional testing mainly focuses on the end of the software development cycle and before the product is released. In order to cater to the ever-increasing delivery frequency, more and more team testing activities began to move to the left and right sides. For general problems, the cost of repairing the software is higher and the fee for enterprises is charged. Once a problem occurs in the production environment, it will cause relatively large losses. Usually, the test is shifted to the left; for software products with display functions, it is easier to find in the production environment The problem is usually tested right. Faced with the problem of swinging the test, it can be explained from this picture how the test in DevOps should be implemented.
Test left shift refers to testers participating earlier in various activities of the software project, defining relevant test cases before function development, and discovering quality problems in advance. Early introduction of the testing process helps prevent defects and provides developers with the flexibility to apply dynamic changes throughout the development phase.
Test right shift is to directly monitor in the production environment and obtain user feedback in real time. In this method, feedback is collected from the user side, and the user experience satisfaction of the product is continuously improved based on the user feedback, improving product quality. Testing the right shift helps to better respond to unexpected situations.
The ideal DevOps cycle is a one-click deployment from code development to production environment operation. Obviously DevOps attaches great importance to the automation of construction, testing and deployment, and the use of continuous integration has become the basis of continuous testing. An important step to achieve continuous testing is to create a comprehensive automated test suite for use in continuous integration builds. The code will be verified by this automated test suite immediately after submission. Common automated test suites are composed of unit tests, component inspections, and acceptance tests. The code or functional coverage of each test must be at least 80%to ensure that regression problems are not introduced.
3. Make it more efficient to improve test coverage
The practice of DevOps requires improving code coverage and increasing the coverage of low-level availability so that problems related to code coverage will not occur when deploying to higher-level availability.
Some organizations default to "run all tests every time" to ensure code coverage. This not only wastes resources but also lengthens the test cycle, and there is no real guarantee for code coverage. Test those parts that need to be tested to save time, money and resources. Visual model allows various paths to be explored and optimized so that only a small number of test cases can provide maximum coverage. You can use Rally, HP ALM, ZenTao ZTF and other tools to import test cases, remove duplicate use cases, and distribute optimized use cases.
4. Cross-department collaboration!( https://i0.wp.com/segmentfault.comhttp://blog.cnezsoft.com/file.php?f=202006/f_5aa40a9f7e5e52cffd5697ca8b727404&t=jpg&o=&s=&v= 1592286042)
Quality assurance in DevOps is no longer the exclusive responsibility of testers, but the direction that all personnel must strive for. The successful implementation of continuous testing is inseparable from collaboration within, between, and across teams. Testers need to intervene in the development work in advance to develop test plans with developers; developers can participate in configuration deployment; operation and maintenance personnel can fill in test cases to the automated test case library; testers configure automated test cases to the continuous delivery chain at any time In , the common purpose of all members is to deliver efficient and high-quality products.
DevOps breaks the barrier between development and operation and maintenance, and shortens the development cycle. Among them, continuous integration, continuous testing, and continuous delivery are key catalysts for improving quality, while continuous testing is more challenging. Mastering the continuous testing of the DevOps life cycle plays a vital role in fully understanding DevOps.