Setup and run Geb and Spock testing frameworks | | - Install IntelliJ IDEA Community Edition for Windows
- Import from source: the tssgTech local git repository
- Import Gradle Module.
- Right click on tssgTech/tests/GebAndSpock
- In popup menu, select Import Gradle Module (about 70% down the list)
- In status bar (bottom of IDEA window), wait for import and index.
- Gradle tab will show up on right side of IDEA window.
- Setup multipage branch
- In IDEA window, bottom right corner, click on Git: <branch>
- Select the remote branch multipage
- In the popup, name the local branch multipage
- Configure IDEA to run the Gradle chromeTest task
- Create a Gradle Environment Configuration
- In Edit Configuration dropdown (top right area of IDEA window), click drop down and select Edit Configuration
- In Popup, on top left, click '+' and select Gradle
- Give the Gradle environment a name (e.g. Run chromeTest)
- Select Gradle project: tssgTech/tests/GebAndSpock
- In Tasks, enter chromeTest
- Click OK button in bottom right of popup.
- Run Geb and Spock tests in Selenium Grid
- This is the default configuration in src/test/resources/GebConfig.groovy
- In the chromeTest environment, select the green play button ()
- Configure Geb and Spock to run tests locally
- n src/test/resources/GebConfig.groovy, chrome {} section,
comment out the entire section driver = {} that starts with DesiredCapabilities - Uncomment:
driver = { new ChromeDriver() }
- Run Geb and Spock tests Locally.
- Run the Gradle environment you created earlier.
- Select the green play button ()
- Review test reports
- in GebAndSpock/build/reports/chromeTest/
- tests/index.html # contains report as html
- geb/Tests/TSSGTechSpec # contains screenshots
|