1

I tried cloning and running test cases on this Corda V4 Sample on Windows 10:
https://github.com/corda/samples/tree/release-V4/cordapp-example


It gives following error

Command line is too long. Shorten command line for Run Contract Tests - Kotlin or also for JUnit default configuration.


I tried this fix: https://stackoverflow.com/a/50857092/4627552 But it throws another error

'net.corda.core.transactions.MissingContractAttachments: Cannot find contract attachments for com.example.contract.IOUContract'


Tests run perfectly fine on Unix (tried on Ubuntu).
Just creates a Issue on Windows

2 Answers2

1

This might help:

Here is the background: IntelliJ IDEA 2017.3 EAP: Configurable command line shortener and more

In your IntelliJ project go to: Run->Edit Configuration

The Run/Debug Configurations form will appear:

Run/Debug Configurations Form

Under the drop-down list beside "Shorten command line:" you can select either "JAR manifest" or "classpath file"

Both worked for me but I haven't done extensive testing.

0

You can use gradle test configuration in Intellij to run the tests.

In your IntelliJ project go to: Run->Edit Configuration

Click on the plus sign and Select Gradle. You can fill the details, in the Tasks field provide :<modulename>:cleanTest:<modulename>:test. For eg.:contracts:cleanTest:contracts:test and in the arguments field, you can specify --tests "<test_name>"

Sanjay S B
  • 259
  • 2
  • 15