当从运行程序执行文件夹内的一组功能文件时,parallel=false 标志似乎不会被遵守,因为每个功能文件都是并行运行的。如果不将运行程序设置为仅执行单个线程,是否还有其他选择,或者这可能是一个错误?
以下是功能文件的一些示例,显示了parallel=false 标志:
设备完整流程
Feature: Test flow for all v1 device endpoints
Background: Test setup including authentication, pre-reqs (if any), constants, and logout settings
* if (skipdomain == true) { karate.logger.debug('skipDomain is set to ' + skipdomain + ' so Domain calls cannot be ran!'); karate.abort(); }
* def dataSourceRow = karate.get('karate.properties["karate.dsRow"]', 1)
* callonce read('../../../../constants.feature')
* url baseUrlDomain + domainPath
* configure headers = headers.domain_headers
* header host = domainHost
* def endpoint = 'various'
* def endpointMethod = 'multiple'
@smoke @parallel=false
Scenario: Scenario for endpoint
DHCP 完整流程
@domain @regression @hopper @parallel=false
Feature: Test flow for all v1 dhcp reservation endpoints
Background: Test setup including authentication, pre-reqs (if any), constants, and logout settings
* if (skipdomain == true) { karate.logger.debug('skipDomain is set to ' + skipdomain + ' so Domain calls cannot be ran!'); karate.abort(); }
* def dataSourceRow = karate.get('karate.properties["karate.dsRow"]', 1)
* callonce read('../../../../constants.feature')
* url baseUrlDomain + domainPath
* configure headers = headers.domain_headers
* header host = domainHost
* def endpoint = 'various'
* def endpointMethod = 'multiple'
* def randomNumber = function(min, max){ return Math.floor( Math.random() * ( max - min + 1 ) + min ) }
* def DateTime = Java.type('commonutilhelpers.DateTime')
* def timestamp = DateTime.doWorkStatic('MM/dd/yyyy HH:mm', '0')
* def deleteDHCP =
"""
function(dhcpReservation){
karate.call('this:referenceTests/DeviceDhcpReservation-DELETE.feature', { curDeviceId: dhcpReservation.macAddress});
}
"""
@smoke
Scenario: Scenario for endpoint
分组完成流程
@domain @regression @hopper
Feature: Test flow for all v1 group(s) endpoints
Background: Test setup including authentication, pre-reqs (if any), constants, and logout settings
* if (skipdomain == true) { karate.logger.debug('skipDomain is set to ' + skipdomain + ' so Domain calls cannot be ran!'); karate.abort(); }
* def dataSourceRow = karate.get('karate.properties["karate.dsRow"]', 1)
* callonce read('../../../../constants.feature')
* url baseUrlDomain + domainPath
* configure headers = headers.domain_headers
* header host = domainHost
* def endpoint = 'various'
* def endpointMethod = 'multiple'
* def deleteGroup =
"""
function(group){
karate.call('this:referenceTests/GroupsById-DELETE.feature', { groupId: group.id});
}
"""
@smoke @parallel=false
Scenario: Scenario for endpoint
我们正在解决一个问题,该问题可能是您所观察到的问题的根本原因,请仔细阅读它并了解如果您使用太多“全局”JS 函数的影响:https://github.com/karatelabs/空手道/问题/2329
最近对
develop
分支的一些代码更改可能已经解决了这个问题,因此如果您或您的团队可以按照这些说明并提供反馈,这将非常有帮助:https://github.com/karatelabs/karate/wiki /开发者指南