rainchen / ckb-system-testing

This project is a TestNG (Java) project, for running system tests for Nervos CKB.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CKB System Testing

This project is a TestNG (Java) project, using for running system tests for Nervos CKB.

Build Status GitHub tag (latest SemVer)

Getting Started

These instructions will guide you how to run and write test cases.

Prerequisites

What things you need to install the software and how to install them

  • Java
  • Maven

Installing

install Java on Mac: https://java.com/en/download/help/mac_install.xml

Running the tests

Run regression/smoke/performance tests

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.

Write test cases

Instructions for how to write test cases, read docs/how-to-write-tests.md for details.

Coding style

We use "Google Java Style Guide" as coding style guide:

Installing the coding style settings in Intellij

  1. Download the intellij-java-google-style.xml file from the http://code.google.com/p/google-styleguide/ repo.
  2. go into Preferences -> Editor -> Code Style. Click on Manage and import the downloaded Style Setting file. Select GoogleStyle as new coding style.

Installing the coding style settings in Eclipse

  1. Download the eclipse-java-google-style.xml file from the http://code.google.com/p/google-styleguide/ repo.
  2. Under Window/Preferences select Java/Code Style/Formatter. Import the settings file by selecting Import.

Deployment

CI pipeline workflow

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

Contributing

  1. Know how to run tests: docs/how-to-run-tests.md
  2. Know how to write tests: docs/how-to-write-tests.md
  3. Know how to report issues: new issue

Commit your changes

Workflow

GitHub Flow, Understanding the GitHub flow

git style guide

use git-style-guide for Branches, Commits,Messages, Merging

Versioning

We use SemVer for versioning.

License

This project is licensed under the Apache 2.0 License

Acknowledgments

  • You should know how to use Maven.
  • You should know how to write test cases using TestNG.

About

This project is a TestNG (Java) project, for running system tests for Nervos CKB.


Languages

Language:Java 95.2%Language:Makefile 2.6%Language:Shell 2.3%