我收到 com.intuit.karate.core.FeatureParser错误-语法错误:升级到0.9.0时。有人可以告诉我pom.xml怎么了,让我知道我是否缺少最新版本0.9.0的依赖项。它在 0.8.0。在这里,我正在复制我的工作pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.testproject</groupId>
<artifactId>api-testing</artifactId>
<version>0.8.0</version>
<!--<version>0.9.0</version>-->
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<activemq.version>5.15.6</activemq.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<!--<karate.version>0.8.0</karate.version>-->
<cucumber.reporting.version>3.8.0</cucumber.reporting.version>
<!--<karate.version>0.9.0</karate.version>-->
</properties>
<dependencies>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>selenium-jupiter</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.0</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
<!--<artifactId>karate-jersey</artifactId>-->
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.intuit.karate/karate-jersey -->
<!--<dependency>-->
<!--<groupId>com.intuit.karate</groupId>-->
<!--<artifactId>karate-jersey</artifactId>-->
<!--<version>0.9.0</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>3.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit4</artifactId>
<version>0.8.0.1</version>
<!--<version>0.9.0</version>-->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160810</version>
<scope>test</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>com.intuit.karate</groupId>-->
<!--<artifactId>karate-core</artifactId>-->
<!--<version>0.9.0.RC1</version>-->
<!--<scope>test</scope>-->
<!--</dependency>-->
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
在升级时,我看到了创建的Karate UI运行程序和并行执行设置的问题。
ERROR com.intuit.karate.core.FeatureParser - syntax error: mismatched input
'<EOF>' expecting {FEATURE_TAGS, FEATURE}
答案 0 :(得分:-1)
首先-听起来很像您有一个空文件,扩展名为*.feature
。空手道现在要严格一些。日志应该告诉您要查看的功能。
如果这不能解决-是的,这可能是解析器错误。我需要您按照以下说明进行操作:https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
由于这听起来像是一个严重的错误,所以我愿意放宽规则,即使您提供了可以重现此问题的示例(最小)功能文件-太好了,并提出了问题。