geb

Learning GEB and Spock

自古美人都是妖i 提交于 2019-11-30 07:12:05
I am a manual tester trying to learn GEB and Spock. To learn these do I have to have prior knowledge of java or groovy? I have been reading the book of GEB, What are the prerequisites, books or learning resources? Please help. Thanks. Arun Manivannan I tried compiling some essentials and some 'good-to-haves' that I found very helpful when I picked up Geb. Some Groovy Magic . Most of all that you need to learn Groovy is covered in this manual but for obvious reasons if you get obsessed with the language you might want to consider Groovy in Action . While Java is not needed to pick up Groovy, If

Spock Stepwise - Keep running testsuite after single failure

五迷三道 提交于 2019-11-29 12:54:51
When using the Spock @Stepwise annotation, is there any way to configure it to not fail the entire testsuite after a single test fails? Decided to just create a new extension called @StepThrough. All I needed to do was subclass StepwiseExtension and take out the line of code that was failing the entire test suite. Pasted code below... StepThrough.groovy package com.test.SpockExtensions import org.spockframework.runtime.extension.ExtensionAnnotation import java.lang.annotation.ElementType import java.lang.annotation.Retention import java.lang.annotation.RetentionPolicy import java.lang

Learning GEB and Spock

我的梦境 提交于 2019-11-29 09:00:20
问题 I am a manual tester trying to learn GEB and Spock. To learn these do I have to have prior knowledge of java or groovy? I have been reading the book of GEB, What are the prerequisites, books or learning resources? Please help. Thanks. 回答1: I tried compiling some essentials and some 'good-to-haves' that I found very helpful when I picked up Geb. Some Groovy Magic. Most of all that you need to learn Groovy is covered in this manual but for obvious reasons if you get obsessed with the language

Geb - IncompatibleClassChangeError

风流意气都作罢 提交于 2019-11-29 08:04:03
I'm just starting out with Geb and am encountering this error when inputting sample code from the Book of Geb: import geb.Browser Browser.drive { go "http://google.com/ncr" // make sure we actually got to the page assert title == "Google" // enter wikipedia into the search field $("input", name: "q").value("wikipedia") // wait for the change to results page to happen // (google updates the page dynamically without a new request) waitFor { title.endsWith("Google Search") } // is the first link to wikipedia? def firstLink = $("li.g", 0).find("a.l") assert firstLink.text() == "Wikipedia" // click

Determine order of execution of Spock tests

◇◆丶佛笑我妖孽 提交于 2019-11-29 03:25:16
Is there a way to set the order in which tests are executed within an Spock Specification? For example: class MySpec extends IntegrationSpec { def 'test A'... def 'test B'... } I want 'test A' to be execute always before 'test B' This is because I'm doing some functional tests with Geb and Spock and data is not rolled back between tests. You can use @Stepwise annotation on a spec and spock will run each of the test definitions of the Spec in the order they are specified. Look at this example . 来源: https://stackoverflow.com/questions/13575972/determine-order-of-execution-of-spock-tests

Spock Stepwise - Keep running testsuite after single failure

痞子三分冷 提交于 2019-11-28 06:51:01
问题 When using the Spock @Stepwise annotation, is there any way to configure it to not fail the entire testsuite after a single test fails? 回答1: Decided to just create a new extension called @StepThrough. All I needed to do was subclass StepwiseExtension and take out the line of code that was failing the entire test suite. Pasted code below... StepThrough.groovy package com.test.SpockExtensions import org.spockframework.runtime.extension.ExtensionAnnotation import java.lang.annotation.ElementType