我安装了最新版本的SpecFlow,但功能文件显示仍然没有颜色,就像这样......
(插入图像的代表不够)
是否为Specflow文件中显示的颜色设置了某些配置?
VS2015 Specflow 2.1
我想知道是否还有其他人遇到过类似的问题或有使用WebDriverWait的经验?
如果他们知道为什么我会收到一个NoSuchElementException,它似乎只在调试模式下抛出。在正常运行时运行测试时,我不会抛出此错误。
我可以单击继续,也可以跳过异常。
在我的空手道测试中,我需要将响应 id 写入 txt 文件(或任何其他文件格式,例如 JSON),我想知道它是否有能力做到这一点,我在文档中没有看到其他内容。在否的情况下,是否有一个简单的 JavaScript 函数可以这样做?
我不确定如何从已创建的功能中拆分响应字符串以获取响应标头“位置”值。
我试过的
1)
Feature: Create Tariff
Background:
* def result = call read('../../get-user-token.feature')
* def serviceId = call read('create-service.feature')
Scenario: Create Tariff
Given url 'https://app-dev.topbox.pro/tariff-svc/api/v1/tariffs'
And header Authorization = result.response.token_type + " " + result.response.access_token
And request
"""
{
serviceTypeId: '#(serviceId.responseHeaders['Location'].split('/')[1])',
owner: 1,
type: 0,
pencePerMile: '69.69',
minMileage: '1.00',
minCost: 5,
zoneFrom: '',
zoneTo: '',
fixedCost: 0
}
"""
When method POST
Then status 201
Run Code Online (Sandbox Code Playgroud)
这导致...
IntegrationTests.TestSetup.create-tariff:create-tariff.feature:10 - net.minidev.json.parser.ParseException:位置 46 处出现意外标记 L。
2)
Feature: Create Tariff
Background:
* def result …Run Code Online (Sandbox Code Playgroud)