Giter Site home page Giter Site logo

groovy_automation_template's Introduction

Groovy_Automation

This project is for practiceing Groovy, Geb, and Spock.

Badges

CircleCI Actions GitHub Known Vulnerabilities GitHub issues StackShare

Motivation

This is to keep my automations skills sharp.

Notification

This automation is happy path only and does not test for failures. It is an example and learning on how it can done. If you wish to test more thoroughly then I would suggest using Cucumber and Scenario Outlines to test many different scenarios including failures.

Tools

BDD framework used

Built with

Continuous Intergration

Depandacy Maintenance

Downloads

Spock

Features

With testing our Circle-CI runner will use maven to run our automation scripts in Command line.

Code Example

Setup

chromeHeadless {
        driver = {
            ChromeOptions options = new ChromeOptions()
            options.addArguments('headless')
            options.addArguments("--no-sandbox")
            options.addArguments("--disable-gpu")
            options.addArguments("--window-size=1400x1200")
            options.addArguments("--disable-extensions")
            new ChromeDriver(options)
        }
    }

Test

def "Can get to Software Testing"(){
       when:
       to BenWeeseDevHome

       then:
       sideMenu.links[1].text().startsWith("Software Testing")

       when:
       sideMenu.links[1].click()

       then:
       at SoftwareTestingPage

   }

Page Object

class SoftwareTestingPage extends Page{
    static url = "QA/softwaretesting/"
    static at = { title.startsWith("Software Testing") }

    static content = {
        sideMenu { module(SideMenuModule) }
    }
}

Module

class SideMenuModule extends Module{
    static content = {
        linksContainer { $(".navigation-list") }
        links { linksContainer.find("a") }
    }
}

Other Examples

Credits

Ben Weese

groovy_automation_template's People

Contributors

benweese avatar dependabot-preview[bot] avatar

Watchers

 avatar

groovy_automation_template's Issues

Build Failing


> Task :compileTestGroovy FAILED

FAILURE: Build failed with an exception.
2 actionable tasks: 2 executed

* What went wrong:
Execution failed for task ':compileTestGroovy'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 36s
##[error]Process completed with exit code 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.