我正在尝试构建一系列触发空手道场景的加特林测试。我对功能文件所做的更改只是偶尔会被加特林拾取。例如,在下面的功能文件代码中,运行前四项(包括注释掉的“relationships”行):
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
其余的都不是。请参阅所附的运行结果屏幕:在此输入图像描述
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>
我怀疑诸如编译文件之类的东西在进行更改时不会刷新或重新编译。