mirror of
https://github.com/corda/corda.git
synced 2025-01-29 15:43:55 +00:00
CORDA-2715 - Update test runner instructions for CorDapp tutorial (#4863)
* made consistent with template review * fixing nested bullet layouts * updating based on (awesome) comments * next iteration :-) * more fixes
This commit is contained in:
parent
b98ed6db23
commit
76b07967e2
@ -481,6 +481,45 @@ Integration tests
|
||||
~~~~~~~~~~~~~~~~~
|
||||
You can run the CorDapp's integration tests by running the ``Run Integration Tests - Kotlin`` run configuration.
|
||||
|
||||
Running tests in IntelliJ
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We recommend editing your IntelliJ preferences so that you use the Gradle runner - this means that the quasar utils
|
||||
plugin will make sure that some flags (like ``-javaagent`` - see :ref:`below <tutorial_cordapp_alternative_test_runners>`) are
|
||||
set for you.
|
||||
|
||||
To switch to using the Gradle runner:
|
||||
|
||||
* Navigate to ``Build, Execution, Deployment -> Build Tools -> Gradle -> Runner`` (or search for `runner`)
|
||||
|
||||
* Windows: this is in "Settings"
|
||||
* MacOS: this is in "Preferences"
|
||||
|
||||
* Set "Delegate IDE build/run actions to gradle" to true
|
||||
* Set "Run test using:" to "Gradle Test Runner"
|
||||
|
||||
.. _tutorial_cordapp_alternative_test_runners:
|
||||
|
||||
If you would prefer to use the built in IntelliJ JUnit test runner, you can add some code to your ``build.gradle`` file and
|
||||
it will copy your quasar JAR file to the lib directory. You will also need to specify ``-javaagent:lib/quasar.jar``
|
||||
and set the run directory to the project root directory for each test.
|
||||
|
||||
Add the following to your ``build.gradle`` file - ideally to a ``build.gradle`` that already contains the quasar-utils plugin line:
|
||||
|
||||
.. sourcecode:: groovy
|
||||
|
||||
apply plugin: 'net.corda.plugins.quasar-utils'
|
||||
|
||||
task installQuasar(type: Copy) {
|
||||
destinationDir rootProject.file("lib")
|
||||
from(configurations.quasar) {
|
||||
rename 'quasar-core(.*).jar', 'quasar.jar'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
and then you can run ``gradlew installQuasar``.
|
||||
|
||||
Debugging your CorDapp
|
||||
----------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user