是否有人知道任何允许Geb功能测试用于性能测试的工具?
在"持续交付"一书中,建议功能测试可用于性能测试,只是想知道是否有人有任何想法如何使用Gradle,Spock和Geb实现.
为了给出上下文,目前,我们正在使用JMeter脚本来模拟在页面上随机链接之后爬行我们站点的大量用户.这样可以相对较好地覆盖链接到内容,但是网站的某些区域(例如搜索和登录功能)不会被触及.
提前致谢.
以下示例代码:
class MySpec extends spock.lang.Specification {
def "My test"(int b) {
given:
def a = 1
expect:
b > a
where:
b << 2..4
}
}
Run Code Online (Sandbox Code Playgroud)
抛出以下编译错误:"where-blocks只能包含参数化(例如'salary << [1000,5000,9000]; salaryk = salary/1000')"
但使用List而不是Range:
where:
b << [2,3,4]
Run Code Online (Sandbox Code Playgroud)
按预期编译并运行正常.
我还能以某种方式指定范围吗?