This project is a TestNG (Java) project, using for running system tests for Nervos CKB.
These instructions will guide you how to run and write test cases.
What things you need to install the software and how to install them
- Java
- Maven
install Java on Mac: https://java.com/en/download/help/mac_install.xml
make test # run regression tests, slow
make test-smoke # run smoke tests, fast
make test-performance # run performance tests, very slow
make test-load # run load tests, very slow, read config from 'loadConfig.yml'
Explain how to run the tests, read docs/how-to-run-tests.md for details.
Instructions for how to write test cases, read docs/how-to-write-tests.md for details.
We use "Google Java Style Guide" as coding style guide:
- Official: https://google.github.io/styleguide/javaguide.html
- Chinese version: https://jervyshi.gitbooks.io/google-java-styleguide-zh/content/
- Download the intellij-java-google-style.xml file from the http://code.google.com/p/google-styleguide/ repo.
- go into Preferences -> Editor -> Code Style. Click on Manage and import the downloaded Style Setting file. Select GoogleStyle as new coding style.
- Download the eclipse-java-google-style.xml file from the http://code.google.com/p/google-styleguide/ repo.
- Under Window/Preferences select Java/Code Style/Formatter. Import the settings file by selecting Import.
How to run this project on CI(using Jenkins):
put following codes in the Jenkins Build config's Execute shell
# export CKB_DOCKER_IMAGE_TAG_NAME=v0.13.0 # set this ENV variable to specified test target version
# get available tag from https://hub.docker.com/r/nervos/ckb/tags
make setup # install requirements
make update # update ckb docker image
make test # run test cases
- Know how to run tests: docs/how-to-run-tests.md
- Know how to write tests: docs/how-to-write-tests.md
- Know how to report issues: new issue
GitHub Flow, Understanding the GitHub flow
use git-style-guide for Branches, Commits,Messages, Merging
We use SemVer for versioning.
This project is licensed under the Apache 2.0 License
- You should know how to use Maven.
- You should know how to write test cases using TestNG.