Testing 空手道软件-如果条件在0.9.6中不起作用,则简单
使用空手道软件框架,我对新发布的版本(0.9.6)有问题。我对简单IF条件有问题Testing 空手道软件-如果条件在0.9.6中不起作用,则简单,testing,karate,Testing,Karate,使用空手道软件框架,我对新发布的版本(0.9.6)有问题。我对简单IF条件有问题 * if (locate('{h6}' + appName).exists) karate.call('classpath:ui/common/applicationDeletion.feature') 此条件在版本0.9.5中正常工作。但在上一版本中,运行该功能时会出现错误: evaluation (js) failed: if (locate('{h6}' + appName).exists) karate.
* if (locate('{h6}' + appName).exists) karate.call('classpath:ui/common/applicationDeletion.feature')
此条件在版本0.9.5中正常工作。但在上一版本中,运行该功能时会出现错误:
evaluation (js) failed: if (locate('{h6}' + appName).exists) karate.call('classpath:ui/common/applicationDeletion.feature'), java.lang.RuntimeException: cannot find locator: {h6}stx-fat-app-tst
stack trace: com.intuit.karate.driver.Driver.locate(Driver.java:275)
==> expected: <true> but was: <false>
evaluation(js)失败:如果(locate({h6}+appName).exists)karate.call('classpath:ui/common/applicationDeletion.feature'),java.lang.RuntimeException:找不到定位器:{h6}stx fat app tst
堆栈跟踪:com.intuit.karate.driver.driver.locate(driver.java:275)
==>预期:但是:
0.9.5版和0.9.6版之间似乎有一些变化。我希望条件为FALSE,不会执行(跳过)空手道调用,并遵循以下代码
你能给我一些提示为什么它不起作用吗
谢谢大家!
POM文件
<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>testing</groupId>
<artifactId>ssp-uc-tests</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<karate.version>0.9.6</karate.version>
</properties>
<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
<version>0.9.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>0.9.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>5.3.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
</plugins>
</build>
</project>
4.0.0
测试
ssp uc测试
0.0.1
罐子
UTF-8
1.8
3.6.0
0.9.6
空手道
空手道阿帕奇
0.9.6
测试
空手道
空手道-junit5
0.9.6
测试
org.junit.jupiter
朱尼特木星发动机
5.4.0
测试
公地io
公地io
2.6
网络智囊团
黄瓜报道
5.3.1
朱尼特
朱尼特
4.13
测试
src/test/java
**/*.爪哇
org.apache.maven.plugins
maven编译器插件
${maven.compiler.version}
UTF-8
${java.version}
${java.version}
-沃罗
org.apache.maven.plugins
maven surefire插件
3.0.0-M5
请阅读发行说明:
是的,API改变了
改为这样做:
* if (exists('{h6}' + appName)) karate.call('classpath:ui/common/applicationDeletion.feature')