【发布时间】:2018-02-01 17:17:21
【问题描述】:
我尝试在 Gauge 规范中使用 file 特殊参数。
Export a customer
----------------------------------------
* Find customer "Hans"
* Export customer to <file:/customer.xml>
这个的java实现看起来像这样
@Step("Export customer to <file>")
public void test(String file) {
System.out.println("file " + file);
}
我假设参数 typ 是 String(也可以是 File 吗?)
但是,运行它,返回
[ParseError] C:\Users\user\IdeaProjects\qmsgauge\specs\tenantManagement.spec:40
Dynamic parameter <file:/customer.xml> could not be resolved => 'Export customer to <file:/customers.xml>'
Successfully generated html-report to => C:\Users\user\IdeaProjects\qmsgauge\reports\html-report\index.html
我如何在规范中定义文件参数以及需要如何为此编写java实现?
谢谢
【问题讨论】:
标签: java testing automated-tests bdd getgauge