문제

I want to run all spock specs in the given directory sharing the same driver instance. Also I want to keep running all the test even if some tests fail and generate a html report. With cucumber it was easy to do by just running cucumber in the given directory. How to do it with spock. I am using geb with spock for grails application's functional testing

도움이 되었습니까?

해결책

If your build.gradle file contains something like this:

task test(overwrite: true, dependsOn: drivers.collect { tasks["${it}Test"] })

then, to run the tests use the following commands:

gradlew chromeTest
gradlew firefoxTest

To run the tests for all the browsers, you can run the following command:

gradlew test

This should continue running even one of the test fails and when it will finish, gradle will provide you the location for the html report.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top