【发布时间】:2017-02-07 09:17:39
【问题描述】:
目前正在实施 GEB、Spock、Groovy。我遇到了这样的场景
spock 表中有一组数据。我必须将模块名作为参数传递,从 spock 表中搜索,然后返回两个值用户 ID 和密码。下面的代码是骨架代码
我的问题是如何根据参数搜索模块名称? 如何返回两个数据?
Class Password_Collection extends Specification {
def "Secure password for search and Data Driven"(String ModuleName) {
expect:
// Search based on modulename in where
// pick the values and return the picked data
where:
Module | User_Name | Pass_word
login_Pass | cqauthor1 | SGVsbG8gV29ybGQ =
AuthorPageTest_Pass | cqauthor2 | DOIaRTd35f3y4De =
PublisherPage_pass | cqaauthor3 | iFK95JKasdfdO5 ==
}
}
如果您提供代码,将对学习和实施有很大帮助。
【问题讨论】: