github.com/ldc1995/fabric-ca@v2.0.0-alpha.0.20200422214819-8d49c278c386+incompatible/test/integration/README.md (about) 1 ## Integration Testing 2 3 This document describes the integration test package file and code layout strategy. 4 5 #### Goal 6 7 The goal of this package is to run end-to-end test between the Fabric CA client and server. 8 Each test should ideally execute fabric-ca-client commands that will execute a specific function 9 on the server. 10 11 #### File Naming Convention 12 Each test file should contain tests that are per-server configuration. In default_test.go, a 13 default server configuration is laid out and most default options are used. This file should 14 contain all tests that are tested against a default server. If tests need to be run against a 15 server that uses other configuration options, a new test file should be created and within this 16 file, a new server configuration should be defined. 17 18 #### Coding Convention 19 Tests should be written so as to minimize the starting and stopping of the server, this is the 20 recommended approach to help minimize test runtime. The use of TestMain can be utilized to prevent 21 multiple starts and stops. 22 23 This assumes that each test is a unit and doesn't change the state of the server in a way that matters 24 or would affect the running of another test also in this file. If tests are related and order dependent, 25 then a single TestXXX could call multiple testYYY functions in a definite order.