如何读取请求 URL 给出的 table 数据?
How to read table data where the Request URL has given?
我有一个包含以下内容的功能文件。
Feature: Webservices Testing
I want to use this template for my feature file
Background:
* url 'http://101.154.221.189:9101/search/InvGuidedSearchService?wsdl'
@Scenario1
Scenario: Get Available Units
Given request 'testdata'
When method post
Then status 200
* print 'Response of GetAvailableUnits:', response
@Scenario2
Scenario: GetMember Preferences
* url 'http://101.231.121.211:9211/extn/scep/MemberPreferencesService'
Given request 'testdata'
When method post
Then status 200
* print 'Response of GetMemberPreferences:', response
* table testdata
|file_name|
|'getAvailableUnitDetail.xml'|
|'getMemberPreferences.json'|
为了从table数据中读取文件请求文件,我需要使用什么代码程序?对于上面的代码,我收到了错误消息并且无法正常工作。
这段代码需要更正什么?
谢谢
首先了解应该如何读取 Cucumber 中的数据 table。我刚才写了一篇 blog post 概述。阅读并实施示例。它应该给你足够的知识来解决你当前的问题。
我有一个包含以下内容的功能文件。
Feature: Webservices Testing
I want to use this template for my feature file
Background:
* url 'http://101.154.221.189:9101/search/InvGuidedSearchService?wsdl'
@Scenario1
Scenario: Get Available Units
Given request 'testdata'
When method post
Then status 200
* print 'Response of GetAvailableUnits:', response
@Scenario2
Scenario: GetMember Preferences
* url 'http://101.231.121.211:9211/extn/scep/MemberPreferencesService'
Given request 'testdata'
When method post
Then status 200
* print 'Response of GetMemberPreferences:', response
* table testdata
|file_name|
|'getAvailableUnitDetail.xml'|
|'getMemberPreferences.json'|
为了从table数据中读取文件请求文件,我需要使用什么代码程序?对于上面的代码,我收到了错误消息并且无法正常工作。
这段代码需要更正什么?
谢谢
首先了解应该如何读取 Cucumber 中的数据 table。我刚才写了一篇 blog post 概述。阅读并实施示例。它应该给你足够的知识来解决你当前的问题。