首页 > 解决方案 > 如何解决“无法解析 com.intuit.karate:karate-gatling:1.2.0”?

问题描述

我已经有一个空手道 e2e 用于我的 api 测试,我正在尝试使用 gatling 进行性能测试。我已经安装了scala(我正在使用intellij ide)我有java jdk 15并且我的环境变量为java和gatling正确设置我已经添加了对scala类的框架支持我在我的pom中添加了以下依赖项我仍然得到“无法解决com.intuit.karate:karate-gatling:1.2.0"?

    <plugins>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>4.5.3</version>
      </plugin>
      <plugin>
        <groupId>io.gatling</groupId>
        <artifactId>gatling-maven-plugin</artifactId>
        <version>3.1.1</version>

 <dependencies>
   <dependency>
      <groupId>com.intuit.karate</groupId>
      <artifactId>karate-apache</artifactId>
      <version>${karate.version}</version>
      <scope>test</scope>
   </dependency>
   <dependency>
      <groupId>com.intuit.karate</groupId>
      <artifactId>karate-junit4</artifactId>
      <version>${karate.version}</version>
      <scope>test</scope>
   </dependency>
</dependencies>

标签: intellij-ideaperformance-testingkarate

解决方案


不,那不是你的做法。花一些时间阅读文档:https ://github.com/intuit/karate/tree/master/karate-gatling

或者首先让演示示例工作,然后根据您的需要对其进行自定义:https ://github.com/intuit/karate/tree/master/examples/gatling

而且 1.1.0 是最新的,不是 1.2.0


推荐阅读