我尝试在Windows10上克隆并运行这个Corda V4示例测试用例:
https://github.com/corda/samples/tree/release-V4/cordapp-example
它会给出以下错误
Command line is too long. Shorten command line for Run Contract Tests - Kotlin or also for JUnit default configuration.
我尝试了这个修复:https://stackoverflow.com/a/50857092/4627552,但它抛出了另一个错误
'net.corda.core.transactions.MissingContractAttachments: Cannot find contract attachments for com.example.contract.IOUContract'
测试在Unix上运行得很好(在Ubuntu上试用过)。
只是在Windows上制造了一个问题
发布于 2019-05-01 01:06:06
这可能会有所帮助:
这里是背景:IntelliJ IDEA 2017.3 EAP: Configurable command line shortener and more
在您的IntelliJ项目中,转到:运行->编辑配置
运行/调试配置表单将会出现:
在"Shorten command line:“旁边的下拉列表中,可以选择"JAR manifest”或"classpath file“。
这两种方法都适用于我,但我没有做过广泛的测试。
发布于 2020-03-16 20:55:52
您可以使用Intellij中的gradle测试配置来运行测试。
在您的IntelliJ项目中,转到:运行->编辑配置
单击加号并选择Gradle。您可以填写详细信息,在Tasks字段中提供:<modulename>:cleanTest:<modulename>:test
。对于:contracts:cleanTest:contracts:test
和arguments字段,您可以指定--tests "<test_name>"
https://stackoverflow.com/questions/54859765
复制相似问题