Skip to content

Groovy-based Geb and Spock automation examples. Please run automation tests responsibly.

License

Notifications You must be signed in to change notification settings

AutomationSchool/geb-and-spock-automation-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Groovy-based Geb and Spock automation examples. Please run automation tests responsibly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages