SlideShare a Scribd company logo
Testing Grails Applications with Selenium RC Rob Fletcher, Energized Work
Running Selenium RC Tests grails install-plugin selenium-rc grails test-app grails test-app -functional
Browsers grails -Dselenium.browser=*firefox test-app
Selenium RC vs. Selenium IDE
Better Factored Tests
Writing Selenium RC Tests Use  @Mixin(SeleniumTest) Simple
Works with non-JUnit frameworks Extend GrailsSeleniumTestCase Offers Selenese-like assertions,  e.g.   assertTextPresent
Easy migration from Selenese Use Page Object Pattern Tests do not interact directly with Selenium
The Page Object Pattern
Page Object Test Example
 
 
Data Driving
Using Build-Test-Data
BDD Frameworks

More Related Content

PPTX
Cross-browser unit testing JavaScript
PDF
Simple Unit Testing in Appcelerator Titanium Alloy
PDF
Continuous Integration for Titanium
PDF
TiCalabash and TiMocha: The keys to Better & More Stable Titanium Apps
PDF
Cracking android app. Мокиенко Сергей
PPTX
Cypress workshop for JSFoo 2019
PPTX
Why I am hooked on the future of React
PPTX
Automated testing using Selenium & NUnit
Cross-browser unit testing JavaScript
Simple Unit Testing in Appcelerator Titanium Alloy
Continuous Integration for Titanium
TiCalabash and TiMocha: The keys to Better & More Stable Titanium Apps
Cracking android app. Мокиенко Сергей
Cypress workshop for JSFoo 2019
Why I am hooked on the future of React
Automated testing using Selenium & NUnit

What's hot (20)

PDF
Selenium WebDriver with C#
PDF
After the Code
PPT
Selenium 2: The Future of Selenium is now!
PDF
No more waiting for API - Android Stub Server
PDF
Selenium and Sauce Labs
PPTX
Run Selenium Tests With Jenkins and BrowseEmAll
PPT
Jenkins users meetup plugins overview
PPTX
Maintainable UI Tests with Selenium and C#
DOCX
Selenium webdriver course content rakesh hansalia
PDF
How To Use Selenium Successfully (Java Edition)
PDF
Hubware test strategy improvements
PPTX
ASP.NET Core Unit Testing
PPTX
Continuous Testing in the Cloud
PPTX
Protractor
PDF
Building serverless-applications
PDF
SeleniumCamp 2015 Andrii Soldatenko
PPTX
Introduction to cypress in Angular (Chinese)
PPTX
Beyond the Release: CI That Transforms Organizations
PPT
Selenium (1)
PPTX
Selenium ui paradigm - DDD North 2
Selenium WebDriver with C#
After the Code
Selenium 2: The Future of Selenium is now!
No more waiting for API - Android Stub Server
Selenium and Sauce Labs
Run Selenium Tests With Jenkins and BrowseEmAll
Jenkins users meetup plugins overview
Maintainable UI Tests with Selenium and C#
Selenium webdriver course content rakesh hansalia
How To Use Selenium Successfully (Java Edition)
Hubware test strategy improvements
ASP.NET Core Unit Testing
Continuous Testing in the Cloud
Protractor
Building serverless-applications
SeleniumCamp 2015 Andrii Soldatenko
Introduction to cypress in Angular (Chinese)
Beyond the Release: CI That Transforms Organizations
Selenium (1)
Selenium ui paradigm - DDD North 2
Ad

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Big Data Technologies - Introduction.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
“AI and Expert System Decision Support & Business Intelligence Systems”
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Mobile App Security Testing_ A Comprehensive Guide.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Weekly Chronicles - August'25 Week I
sap open course for s4hana steps from ECC to s4
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
Ad

Testing Grails Applications With Selenium Rc

Editor's Notes

  • #2: Comparison with webtest/g-func Comparison with Selenium IDE Test examples Running tests Browsers Page Objects Data Driving Spock/BDD
  • #3: Show example suite run
  • #5: Selenese not a 'real' language Sequence, Selection & Iteration (1 out of 3) No encapsulation / modularity
  • #6: Selenese tests as a 'run-on sentence' divide into methods simpler modularity (no custom commands) leads into… less repetition… page object pattern Bits of coverage hide in long tests Temptation to extend tests
  • #8: What is a page object? exposes methods that reflect the things the user can see and do on a page eliminate duplication by building abstractions hides the detail of how code completion tests responsible for assertions, not page object Underlying implementation can be changed
  • #9: Note does not extend or mixin Selenium test classes
  • #10: shows how page object hide detail of implementation Page object handles position of elements in table, test can access by name
  • #11: Factory method that opens URL Navigation method that returns another page object Scrapes error messages and returns in useful form Returns element value if present (can't do in Selenese) Uses MOP to override property access to type in form fields
  • #12: using monolithic data setup Build test data Fixtures tearDown
  • #13: withTransaction blocks ensure data committed and errors thrown right away Importance of tearDown