Groovy-based Geb and Spock automation examples. Please run automation tests responsibly.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
twitter-app-ui-automation
LICENSE
README.md

README.md

Git repo: geb-and-spock-automation-examples

  • Groovy-based Geb and Spock automation examples.
  • Please run automation tests responsibly. You may use the code provided in this repository only to learn Geb and Spock.
  • Latest Geb Manual is your best source for documentation : Latest Geb Manual
  • Licensed under the Apache License, Version 2.0

Running the examples

Twitter login and logout example:

Note: All paths relative to directory: twitter-app-ui-automation

  • Update the src\test\resources\LoginFlowConfig.groovy file with the username / password.

  • For the username, do not use the email but the twitter handle without the @ sign in the front. E.g. mycooltwitterhandle

  • Go to the twitter-app-ui-automation directory and run the automated spec from the command line:

    • cd twitter-app-ui-automation
    • gradlew chromeTest -Denv=test
  • The above runs the twitter automated tests in Chrome. Using the configuration i.e., url, username, password etc supplied under the "test" environment.

Changing environments

  • You can change the environment (env) to use for e.g. to "prod" env, by changing the command-line to use -Denv=prod

Changing to a different browser

  • To run the tests with a different browser replace the chromeTest above with the following choices:

    • Firefox :
      • gradlew firefoxTest -Denv=test
    • Chrome Headless :
      • gradlew chromeHeadlessTest -Denv=test