【问题标题】:Corda V4 Contract and Flow Test cases dosent run in IntelliJ on WindowsCorda V4 合同和流程测试用例不在 Windows 上的 IntelliJ 中运行
【发布时间】:2021-04-30 14:42:59
【问题描述】:

我尝试在 Windows 10 上的 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 上创建一个问题

【问题讨论】:

    标签: corda


    【解决方案1】:

    这可能会有所帮助:

    这是背景: IntelliJ IDEA 2017.3 EAP: Configurable command line shortener and more

    在您的 IntelliJ 项目中转到:运行->编辑配置

    将出现运行/调试配置表单:

    在“Shorten command line:”旁边的下拉列表中,您可以选择“JAR manifest”或“classpath file”

    两者都对我有用,但我还没有进行广泛的测试。

    【讨论】:

    【解决方案2】:

    您可以在 Intellij 中使用 gradle 测试配置来运行测试。

    在您的 IntelliJ 项目中转到:运行->编辑配置

    单击加号并选择 Gradle。您可以填写详细信息,在任务字段中提供:<modulename>:cleanTest:<modulename>:test。例如:contracts:cleanTest:contracts:test,在参数字段中,您可以指定--tests "<test_name>"

    【讨论】:

      猜你喜欢
      • 2018-05-04
      • 1970-01-01
      • 2018-08-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-02
      • 2013-07-24
      • 1970-01-01
      相关资源
      最近更新 更多