Cursive / Intellij - 未定义的step_definitions警告

问题描述 投票:0回答:1

我正在使用lein-cucumber写黄瓜测试。我的测试套装执行没有任何错误,但我的IDE标记这些警告:

  • 鉴于无法解决。
  • 然后无法解决。
  • 未定义的步骤参考:...

enter image description here enter image description here

我已经安装了插件:cursivecucumbergherkin到Intellij。但这些警告仍然显示出来。

这是我的project.clj文件:

(defproject app version
  :dependencies [
  [org.clojure/clojure "1.8.0"]
  [org.clojure/tools.logging "0.4.0"]
  [org.clojure/tools.cli "0.3.5"]
  [org.clojure/data.json "0.2.6"]
  [clj-http "3.9.1"]
  [mysql/mysql-connector-java "5.1.38"]
  [org.slf4j/slf4j-log4j12 "1.7.25"]
  [log4j/log4j "1.2.17" :exclusions [javax.mail/mail
  javax.jms/jms
  com.sun.jmdk/jmxtools
  com.sun.jmx/jmxri]]
  [metosin/compojure-api "1.1.11"]
  [metosin/ring-swagger "0.24.3"]
  [compojure "1.6.0"]
  [cheshire "5.8.0"]
  [ring "1.6.3"]
  [ring/ring-json "0.4.0"]
  [ring-logger "0.7.7"]
  [environ "1.1.0"]
  [korma "0.4.3"]
  [blackwater "0.0.9"]
  [prismatic/schema "1.1.7"]
  [siili/humanize "0.1.1"]
  [amazonica "0.3.117"]
  [clj-time "0.14.2"]
  [ring-cors "0.1.12"]
  [commons-io "2.0"]
  ]

  :plugins      [
  [lein-ring "0.12.1"]
  [lein-cucumber "1.0.2"]
  [lein-cloverage "1.0.10"]
  [lein-kibit "0.1.6"]
  [lein-cloverage "1.0.10"]
  [lein-try "0.4.3"]
  [nightlight/lein-nightlight "1.0.0"]
  [jonase/eastwood "0.2.3"]
  [cider/cider-nrepl "0.16.0"]
  ]

  :min-lein-version "2.5.3"

  :ring {:handler app.api.handler/app}

  :source-paths ["src"]

  :resource-paths ["resources"]

  :test-paths ["test/unit"
  "test/features"]

  :cucumber-feature-paths ["test/features"]

  :profiles {:uberjar {:aot :all}}
  )
intellij-idea clojure cursive
1个回答
2
投票

使用动态定义变量/函数的库时可能会发生这种情况。 Cursive无法发现这些定义,因为它需要评估生成定义的代码。

这似乎是看Given is defined如何。我也看到像Amazonica这样的库生成基于AWS SDK的定义。

© www.soinside.com 2019 - 2024. All rights reserved.