空手道加特林:未选取对功能文件的更改 [英] Karate Gatling: Changes to feature file aren't picked up

查看:55
本文介绍了空手道加特林:未选取对功能文件的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试建立一系列触发空手道场景的测试方法.我对功能文件所做的更改仅偶尔由Gatling进行.例如,在下面的功能文件代码中,运行前四个项目(包括注释掉的"relationships"行):

I'm attempting to build a series of gatling tests triggering karate scenarios. Changes I'm making to the feature file are only occasionally picked up by Gatling. For example, in the feature file code below, the first four items are run (including the commented out 'relationships' line):

Feature: This feature attempts to load the main tabs in sequence for the purposes of performance testing via gatling

    Background: Create the investigation and job first
      # Get api url from karate-config.js
      * url baseUrl
      # This configures the http headers to use admin user for running the tests
      * callonce read('classpath:common/headers/admin-headers.feature')

      * def investigaitonId = 150
      * def jobId = 51


  Scenario: Twitter investigation with 1 selector
    Given path 'investigations', investigaitonId
    When method get
    Then status 200

    Given path 'jobs', jobId
    When method get
    Then status 200

    Given path 'investigations', investigaitonId, 'actors'
    When method get
    Then status 200

    #Given path 'investigations', investigaitonId, 'relationships'
    #When method get
    #Then status 200

    Given path 'investigations', investigaitonId, 'entities'
    When method get
    Then status 200

    Given path 'investigations', investigaitonId, 'events'
    When method get
    Then status 200

    Given path 'investigations', investigaitonId, 'activities'
    When method get
    Then status 200

    Given path 'investigations', investigaitonId, 'activities-media'
    When method get
    Then status 200

其余的不是.查看所附的运行结果屏幕: 在此处输入图片描述

The rest aren't. See attached screen of run results: enter image description here

POM以供参考:

    <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.4</karate.version>
        <junit5.version>5.5.1</junit5.version>
        <masterthought.version>4.9.0</masterthought.version>
        <gatling.plugin.version>3.0.2</gatling.plugin.version>
        <gatling.charts.version>3.2.1</gatling.charts.version>
        <scala.version>2.15.2</scala.version>
    </properties>

我怀疑每次进行更改时,诸如编译文件之类的内容都不会刷新或重新编译.

I suspect something like a compile file not refreshing or recompiling whenever a change is made.

推荐答案

使用以下命令已解决此问题:

This issue was resolved using the following command:

mvn clean test-compile gatling:test

这篇关于空手道加特林:未选取对功能文件的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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