在 Karate DSL 框架中,IntelliJ IDE 无法使用 Gradle 找到可见的功能文件 [英] In Karate DSL Framework, IntelliJ IDE is unable to find visible feature files using Gradle

查看:32
本文介绍了在 Karate DSL 框架中,IntelliJ IDE 无法使用 Gradle 找到可见的功能文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下工具创建示例空手道 DSL 测试时;抛出在 [classpath: packagename] 找不到任何功能":

IntelliJ 2017.2.3摇篮 2.9

项目结构如屏幕截图所示.请注意,我在带有 Gradle 的 Eclipse Mars 4.5.2 中使用了完全相同的项目结构,但我无法复制此问题.我还将 Maven 与 Intellij 一起使用,并且没有发生此问题.

使用 Gradle 将问题隔离到 Intellij!有什么想法吗?

解决方案

我最好的猜测是 IntelliJ Gradle 不支持

When using the following tools to create a sample Karate DSL Test; a "no features found at [classpath: packagename]" is thrown:

IntelliJ 2017.2.3 Gradle 2.9

project structure is shown in screenshot. Note that I have used the exact same project structure in Eclipse Mars 4.5.2 with Gradle and I was not able to replicate this issue. I also used Maven with Intellij and this issue did not occur.

The issue is isolated to Intellij using Gradle! any thoughts?

解决方案

My best guess is IntelliJ Gradle does not honor the sourceSets tweak needed for the recommended Karate folder structure.

I just had an idea, try switching to the "traditional" Java project structure where *.feature files are in src/test/resources (not src/test/java) and that might just work.

Example project structure, from IDEA 2017.2.6 with Gradle.

这篇关于在 Karate DSL 框架中,IntelliJ IDE 无法使用 Gradle 找到可见的功能文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆