sollecitom 9a69a36904 Merge remote-tracking branch 'remotes/open/master' into merges/may-14-15-21
# Conflicts:
#	.idea/compiler.xml
#	constants.properties
#	experimental/behave/src/main/kotlin/net/corda/behave/network/Network.kt
#	experimental/behave/src/main/kotlin/net/corda/behave/node/Distribution.kt
#	experimental/behave/src/test/kotlin/net/corda/behave/service/PostreSQLServiceTests.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/bridging/AMQPBridgeManager.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/CordaPersistence.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/HibernateConfiguration.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/AMQPChannelHandler.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/AMQPClient.kt
#	node/src/integration-test/kotlin/net/corda/node/AuthDBTests.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt
#	node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt
#	node/src/main/kotlin/net/corda/node/services/messaging/MessagingExecutor.kt
#	node/src/main/kotlin/net/corda/node/services/persistence/AbstractPartyToX500NameAsStringConverter.kt
#	node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionMappingStorage.kt
#	node/src/main/kotlin/net/corda/node/utilities/AddOrRemove.kt
#	node/src/test/kotlin/net/corda/node/services/config/NodeConfigurationImplTest.kt
#	samples/attachment-demo/src/integration-test/kotlin/net/corda/attachmentdemo/AttachmentDemoTest.kt
#	samples/irs-demo/web/src/test/kotlin/net/corda/irs/web/IrsDemoWebApplicationTests.kt
#	samples/simm-valuation-demo/src/integration-test/kotlin/net/corda/vega/SimmValuationTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalTestUtils.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/RPCDriver.kt
#	testing/smoke-test-utils/src/main/kotlin/net/corda/smoketesting/NodeConfig.kt
#	webserver/src/integration-test/kotlin/net/corda/webserver/WebserverDriverTests.kt
2018-05-14 15:56:43 +01:00
..
2018-04-19 11:49:17 +01:00
2018-05-02 12:31:22 +01:00
2018-04-19 11:49:17 +01: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 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"