Continuous integration testing (2) - test case containerization (transfer)

Author: http://blog.csdn.net/kansuke_zola/article/details/52795370

background

We all know that Docker has been widely used in the production process, 
write picture description here

  1. The development package the developed code into a mirror image, push it to the warehouse, and enter the test cycle, that is, step 2;
  2. After the test is developed and the specified image is pulled from the warehouse to the local, the service in the container is started according to the docker run command. At this point, the test environment is ready and the test is started;
  3. If there is a problem during the test, it will be reported to the developer to locate the problem, and return to step 1;
  4. When the test is completed, the development is notified that the test has been completed, the development will notify the operation and maintenance personnel of the image tag, and the operation and maintenance personnel will pull the image to the online machine, start and run.

The above is the cycle that docker goes through in production applications. From the above process, it can be found that compared with the original production cycle, the advantages of docker application are:

  1. Compatible with multiple platforms at the same time, you can run ubuntu in centos system, centos in macos, etc., to solve the dependence of services on hardware systems.
  2. It can ensure the unity of development, testing, and operation and maintenance environments, and solve the problems caused by the dependence of services on the environment;
  3. Docker ensures that each container has its own resources and is isolated from other containers

Environment configuration

The version of the instructions for github users is relatively low, and you can go to the maven repository to query the new dependency version.

Note: docker-client depends on the httpclient package of apache, pay attention to the conflict of dependencies when using the configuration.

<dependency>
  <groupId>com.spotify</groupId>
  <artifactId>docker-client</artifactId>
  <version>5.0.2</version>
</dependency>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5

Summary of Test Methods

  1. From the point of test method, the test is divided into

    black box testing 
    white box testing 
    grey box testing

  2. According to test purpose

    unit testing 
    functional testing 
    integration testing 
    system testing 
    alpha testing 
    beta testing

  3. From the point of view of operation

    Manual testing 
    automated testing

  4. According to the measured target service quality requirements

    Performance testing 
    Stress testing 
    Stability testing 
    Compatibility testing 
    Security testing

  5. from the testing phase

    Smoke testing 
    BVT testing 
    Regression testing 
    Acceptance testing

  6. business-wise

    Front-end test (mobile terminal, pc terminal) 
    interface test 
    strategy test 
    middleware test 
    data storage test

Reference from: 
http://www.cnblogs.com/TankXiao/archive/2012/02/20/2347016.html  
https://github.com/spotify/docker-client  
http://www.programcreek.com/java -api-examples/index.php?api=com.spotify.docker.client.DockerClient

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326619621&siteId=291194637