corda/experimental/behave
sollecitom 8a561cddbf Merge remote-tracking branch 'remotes/open/master' into merges/march-19-14-41
# Conflicts:
#	client/rpc/src/test/kotlin/net/corda/client/rpc/RPCPerformanceTests.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/CordaPersistence.kt
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt
#	node/src/main/java/CordaCaplet.java
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt
2018-03-19 15:17:49 +00:00
..
deps Port library functionality from corda/behave 2018-02-09 19:08:26 +00:00
src Merge remote-tracking branch 'remotes/open/master' into merges/march-19-14-41 2018-03-19 15:17:49 +00:00
build.gradle Introduced copyright in all source files. (#519) 2018-03-06 17:29:21 +00:00
prepare.sh Fix prepare script and cash config check 2018-02-12 10:36:44 +00:00
README.md Enable selective runs 2018-02-12 11:36:06 +00:00

Introduction

This project illustrates how one can use Cucumber / BDD to drive and test homogeneous and heterogeneous Corda networks on a local machine. The framework has built-in support for Dockerised node dependencies so that you easily can spin up a Corda node locally that, for instance, uses a 3rd party database provider such as MS SQL Server or Postgres.

Structure

The project is split into three pieces:

  • Testing Library (main) - This library contains auxiliary functions that help in configuring and bootstrapping Corda networks on a local machine. The purpose of the library is to aid in black-box testing and automation.

  • Unit Tests (test) - These are various tests for the library described above. Note that there's only limited coverage for now.

  • BDD Framework (scenario) - This module shows how to use BDD-style frameworks to control the testing of Corda networks; more specifically, using Cucumber.

Setup

To get started, please follow the instructions below:

  • Go up to the root directory and build the capsule JAR.

    $ cd ../../
    $ ./gradlew install
    
  • Come back to this folder and run:

    $ cd experimental/behave
    $ ./prepare.sh
    

This script will download necessary database drivers and set up the dependencies directory with copies of the Corda fat-JAR and the network bootstrapping tool.

Selective Runs

If you only want to run tests of a specific tag, you can append the following parameter to the Gradle command:

$ ../../gradlew scenario -Ptags="@cash"
# or
$ ../../gradlew scenario -Ptags="@cash,@logging"