1 Star 0 Fork 0

青风/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
testingInfo.rst 3.73 KB
一键复制 编辑 原始数据 按行查看 历史

Testing

./test-pyramid.png

Unit test

See building Hyperledger Fabric <http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build.html> for unit testing instructions.

See Unit test coverage reports

To see coverage for a package and all sub-packages, execute the test with the -cover switch:

go test ./... -cover

To see exactly which lines are not covered for a package, generate an html report with source code annotated by coverage:

go test -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html

Integration test

See Hyperledger Fabric Integration tests for Hyperledger Fabric integration test details.

Integration tests cover testing between components, e.g., tests between peers and an orderer, and are used to show that a feature is working as expected across different interfaces. They ensure that components and systems work together as expected for a specific feature. Integration tests are validation tests that are not expected to stress the system. Test friendly configurations with real implementations should be used. Each user consumable feature should extend the suite of integration tests. These tests use a small number of assets (eg. chaincode, peers, orgs) across multiple tests.

Integration tests are in 2 categories: Component Integration and System Integration.

Component integration tests could include some mocked interfaces as necessary. This form of integration tests can be used for negative testing and forced event testing.

System integration tests use live builds and packages. These also have been referred to as end-to-end tests.

Once system integration tests complete successfully, a CR may be merged to a repository.

For more details on how to execute the integration tests, see the integration README.

See IT Daily Results

See IT Weekly Results

Interoperability test

Interoperability tests are higher-level integration tests that span across repositories to test the compatibility between fabric, fabric-ca and fabric-sdk-*. This test suite contains a very limited number of tests, which are executed after a merge is performed in any of the repositories. These tests are not feature based and do not need to be updated often. They use a maximum number of assets in order to verify compatibility between commits. Once these Interoperability tests pass, a build combination is considered good and the new build artifacts may be published for use with other repositories.

System test

See System Testing Hyperledger Fabric for details on system testing.

System testing includes the following categories: * Scalability

  • Performance and Concurrency
  • Upgrades and Fallbacks
  • Long Running
  • Compatibility
  • Chaos and Recovery
  • Functional (only for regression purposes)

See SVT Daily Results

See SVT Weekly Results

See SVT Performance Test Results Graphs With Testviewer

See SVT Performance TestViewer Details

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/liuwenshan/fabric.git
git@gitee.com:liuwenshan/fabric.git
liuwenshan
fabric
fabric
master

搜索帮助