How to build a test environment? This is something that many testers need to understand. Testing is a necessary inspection before each product goes online. No matter what product it is, effective testing is a responsibility for product quality. The software testing environment must The consideration is under what hardware and software can the software run normally, and under what environment it cannot run normally.
As long as you are doing testing, you will know the testing environment and how to build the testing environment? Not all people will understand clearly. In fact, the testing environment will be different in every company. The same process and method, one of which is the operation and maintenance personnel responsible for the construction, and the other is the tester for the construction and maintenance. This article will explain the issue of the test environment construction for everyone.
In fact, most complex test environments are built by development, because the developer knows where any configuration file needs to be placed, so it is relatively easy to set up. If it is operation and maintenance construction, it needs to be constructed and maintained according to the installation manual provided by the development, and there will be a certain installation method in the manual.
This makes the installation manual very important, especially when there are many environments, such as a development environment, a functional test environment, and a performance test environment. Although it may be written for a long time, it may not be read by anyone. If there is a problem, there is no way to maintain it in time. Now the installation manual is also to be constantly updated, which is a trend of the times.
When you get the installation manual, it is usually a Linux operating system, which can be executed automatically by relying on Jenkins or writing a bunch of shell scripts independently: you can first copy the installation file to a specified directory, start the service, and update the log. ; If there is a database configuration, you need to execute some SQL to make the newly configured data take effect; if the server hard disk is not enough, you need to delete useless test logs according to the log path in the manual. If you don't know how to write Shell scripts, you can also manually execute the update or maintenance of the compilation and copy commands. There are ways, but the efficiency is not too high.
In general maintenance, you need to be proficient in Linux and familiar with the database, because in many cases, testers need to customize and maintain the test environment. In some large-scale test teams, configuration administrators are responsible for the operation and maintenance of the test environment, which can effectively exercise knowledge of Linux operations and databases.
When the test environment is set up, it should be as consistent as possible with the online environment. If the conditions are insufficient, it can be reduced in the same proportion. For example, a set of environment has three layers: application server, cache server, and database server. You can also take two for each layer, which can basically simulate a distributed structure. If it doesn't work, one on each floor is fine, but it can't simulate distributed, which depends on the requirement of test quality.
It should be noted that: Some people may ask, if there is no problem in the test environment, is there no problem after going online? The answer is no. Because there will always be some small differences between the test environment and the production environment, it is safe to publish a grayscale version first in the online environment, then do a smoke test or some tracking tests, and then release it.
Obviously, the comprehensive ability required for testing is also relatively high, not only requires proficiency in the database and operating system, but also learns to write a shell script, which is also a difficult place to do testing.