Testing your changes¶
Corda has a suite of tests that any contributing developers must maintain and extend when adding new code.
There are several test suites:
- Unit tests: These are traditional unit tests that should only test a single code unit, typically a method or class.
- Integration tests: These tests should test the integration of small numbers of units, preferably with mocked out services.
- Smoke tests: These are full end to end tests which start a full set of Corda nodes and verify broader behaviour.
- Other: These include tests such as performance tests, stress tests, etc, and may be in an external repo.
Running the automated tests¶
These tests are mostly written with JUnit and can be run via
- Windows: Run
gradlew test integrationTest smokeTest
- Unix/Mac OSX: Run
./gradlew test integrationTest smokeTest
Before creating a pull request please make sure these pass.
You should manually test anything that would be impacted by your changes. The areas that usually need to be manually tested and when are as follows:
- Node startup - changes in the
node:capsuleproject in both the Kotlin or gradle or the
- Sample project - changes in the
samplesproject. eg; changing the IRS demo means you should manually test the IRS demo.
- Explorer - changes to the
- Demobench - changes to the
How to manually test each of these areas differs and is currently not fully specified. For now the best thing to do is to ensure the program starts, that you can interact with it, and that no exceptions are generated in normal operation.