Galen Framework
- Responsive Design Look and Feel Automation
Why Galen Framework ?
• Layout Testing
• Responsive Design Testing
• Cross Browser Testing
Pros and Cons with Galen
• Pros:
• Open Source
• Easy to install
• Error Reporting with screenshots for Pass & Fail
• Easy to Write/Read syntax
• Multiple Browsers support
• Supports Functional Testing
• Cons:
• Lack of Test Editor.
• Code maintenance is costly when there are lot of UI changes.
Sample web page layout
How it works?
• Describe any layout using special syntax – Spec Language.
• It uses Selenium
• For interacting with elements on page and getting their locations and
dimensions.
• Once it sees that something is wrong
• Reports the error
• Makes a screenshot and highlights the misbehaving element on it.
• How it Runs?
• Open a page in browser
• Resizes it to specified size
• Test the layout according to user-defined specs
Getting Started with Galen
• Define Galen Specs
• Objects Definition
• Object specs
• Run individual Spec files
• Inject JavaScript code
• Create Test suite
• Run Test suite
Objects Definition
@objects
Header id header
Logo-box css .logo-box
Search-bar xpath //input[@class=‘searchBar’]
• Indentation is 1 to 8 spaces but not tab.
• xpath is not preferable unless css cannot be used.
• Syntax for Object definition depends on the Galen Framework
version. ( Ref: http://galenframework.com/docs/specslang-2.0-difference/)
Object Specs
=Test Global Header=
@ on desktop
Header:
height 40px
width 900px
centered horizontally inside screen
@ on mobile, desktop
Logo-box:
css color is “rgba(51, 51, 51, 1)”
css background-color is “rgba(120, 190, 32, 1)”
Search-bar:
below: header 0px
Object Specs ( cont.…)
• Object Definition
• http://galenframework.com/docs/reference-galen-spec-language-guide/#Objectdefinition
• Multiple objects definition
• http://galenframework.com/docs/reference-galen-spec-language-guide/#Multipleobjectsdefinition
• Object Groups
• http://galenframework.com/docs/reference-galen-spec-language-guide/#ObjectGroups
• Many more:
• Tagging and Sections
• Variables
• Conditional checks ( If, Else)
• Loops ( For, ForEach)
• Element locations relative to other elements
• http://galenframework.com/docs/reference-galen-spec-language-guide/#SpecsReference
Run Individual Spec file
galen check homepage.gspec
--url "http://example.com"
--size "640x480"
--javascript "some.js"
--include "mobile,all"
--exclude "toexclude"
--htmlreport "htmlreport-dir"
--testngreport "testng-report.xml"
--jsonreport "jsonreport-dir"
--junitreport "junit-report.xml“
Example:
galen check specs/galen.spec --url "http://www.example.com"
--size "1366x768" --include "desktop" --htmlreport "reports"
Test Suite
• Grouping Test Specs
• Create Global Variables
• Import Test Suites
• Run Specs on different browsers
• Run in Selenium Grid
• Parameterization
• Disabling tests
Test Suite Syntax
@@ set
domain http://www.example.com
@@table devices
@@parameterized using devices
Home page on ${device} device
selenium chrome ${domain} ${size}
check specs/galen.spec --include "${tags}"
|Device| |Tags| |Size|
|Mobile| |Mobile| |400x600|
|Tablet| |Tablet| |720x480|
|Desktop| |Desktop| |1364x800|
Run Test Suite
• galen test mytest01.test
--htmlreport "htmlreport-dir"
--testngreport "report/testng.xml"
--jsonreport "jsonreport-dir"
--junitreport "junit-report.xml"
--parallel-tests 4
--filter "Home page on * device“
• Example:
galen test tests/galen.test --htmlreport "reports"
Reports
• Report for individual Test cases
• Screenshots for each Test case (Pass/Fail)
• Report for Test suite executed
Capabilities of Galen
• Testing relative location of elements in web page.
• Checking visible text.
• Integration with Selenium Grid.
• Inject JavaScript into code.
• Color scheme testing.
• Integration with Appium.
• Can be integrated with Browser Stack, Sauce labs.
Additional Features
• Creating Page Dump
• Creates information about all test objects on page with image
samples.
• Image Comparison
• Java API
• JavaScript API
• Galen Extras
• Advanced expressions which extends Galen specs language.
Installation
• System Requirements:
• Java 1.7 or higher.
• Text Editor.
• Drivers for Respective browsers.
• Galen Framework binary
• http://galenframework.com/download/
• Add Galen folder to “PATH” environment variable.
References
Tutorials
http://mindengine.net/
Documents
http://galenframework.com/docs/all/
Sample Project
http://galenframework.com/docs/tutorial-first-project/
Galen Spec Language
http://galenframework.com/docs/reference-galen-spec-language-
guide/
Thank You

More Related Content

PPTX
Automated layout testing using Galen Framework
PDF
XpDays - Automated testing of responsive design (GalenFramework)
PPTX
Galen Framework - Responsive Design Automation
PPTX
Get responsive with Galen
PPTX
Visual Regression Testing
PPT
jQuery Intro
PPT
Selenium (2)
PPTX
Intro to Rails Give Camp Atlanta
Automated layout testing using Galen Framework
XpDays - Automated testing of responsive design (GalenFramework)
Galen Framework - Responsive Design Automation
Get responsive with Galen
Visual Regression Testing
jQuery Intro
Selenium (2)
Intro to Rails Give Camp Atlanta

What's hot (19)

PDF
Patterns of a “good” test automation framework
PDF
Better Page Object Handling with Loadable Component Pattern
PPTX
5 x HTML5 worth using in APEX (5)
PDF
Try AngularJS
KEY
I18n
PDF
Angular Classy
PDF
Python for AngularJS
PPTX
Catalog display
PPTX
Write Selenide in Python 15 min
PDF
Page object pattern
PPTX
Setting up Page Object Model in Automation Framework
PDF
How angularjs saves rails
PPTX
CUCUMBER - Making BDD Fun
PDF
*Webinar* Learn from the Experts: How to Boost Test Coverage with Automated V...
PDF
Modern Functional Fluent ColdFusion REST Apis
PPTX
Harish Understanding Aspnet
PPTX
Dash of ajax
PDF
AngularJS meets Rails
PPTX
Why angular js Framework
Patterns of a “good” test automation framework
Better Page Object Handling with Loadable Component Pattern
5 x HTML5 worth using in APEX (5)
Try AngularJS
I18n
Angular Classy
Python for AngularJS
Catalog display
Write Selenide in Python 15 min
Page object pattern
Setting up Page Object Model in Automation Framework
How angularjs saves rails
CUCUMBER - Making BDD Fun
*Webinar* Learn from the Experts: How to Boost Test Coverage with Automated V...
Modern Functional Fluent ColdFusion REST Apis
Harish Understanding Aspnet
Dash of ajax
AngularJS meets Rails
Why angular js Framework
Ad

Viewers also liked (11)

PPTX
ODP
Who is responsible? Perception of importance and responsibility of future t...
PPTX
La capa de ozono
PPTX
Teacher ethics and responsibilities
DOCX
Duties and responsibilities of teachers
PPTX
Special Protection Against Child Abuse, Exploitation and Discrimination Act (...
PPTX
PPTX
Rights of a Child (Philippines)
PPTX
Teacher professional responsibilities chap. 2
PPT
Special laws on children 8353, 9262, 9231, 7877, 7610, 920
PPTX
Principles of Teaching:Different Methods and Approaches
Who is responsible? Perception of importance and responsibility of future t...
La capa de ozono
Teacher ethics and responsibilities
Duties and responsibilities of teachers
Special Protection Against Child Abuse, Exploitation and Discrimination Act (...
Rights of a Child (Philippines)
Teacher professional responsibilities chap. 2
Special laws on children 8353, 9262, 9231, 7877, 7610, 920
Principles of Teaching:Different Methods and Approaches
Ad

Similar to Galenframework (20)

PDF
[Srijan Wednesday Webinars] Automating Visual Regression using ‘Galen’
PDF
Awesome html with ujs, jQuery and coffeescript
PPTX
Automated ui-testing
PPTX
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
PDF
Session on Selenium Powertools by Unmesh Gundecha
PDF
How to use selenium successfully
PPTX
SharePoint and jQuery Essentials
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PDF
Escaping Test Hell - ACCU 2014
PDF
Intro JavaScript
PDF
Web Components v1
PDF
full-stack-webapp-testing-with-selenium-and-rails.pdf
PPTX
Automated UI Testing
PPTX
Learning About JavaScript (…and its little buddy, JQuery!)
PDF
Learning to run
PDF
Introduction to AngularJS
PDF
Webcomponents are your frameworks best friend
PPTX
Untying the Knots of Web Dev with Internet Explorer
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
[Srijan Wednesday Webinars] Automating Visual Regression using ‘Galen’
Awesome html with ujs, jQuery and coffeescript
Automated ui-testing
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Session on Selenium Powertools by Unmesh Gundecha
How to use selenium successfully
SharePoint and jQuery Essentials
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Escaping Test Hell - ACCU 2014
Intro JavaScript
Web Components v1
full-stack-webapp-testing-with-selenium-and-rails.pdf
Automated UI Testing
Learning About JavaScript (…and its little buddy, JQuery!)
Learning to run
Introduction to AngularJS
Webcomponents are your frameworks best friend
Untying the Knots of Web Dev with Internet Explorer
Better End-to-End Testing with Page Objects Model using Protractor

Recently uploaded (20)

PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
The influence of sentiment analysis in enhancing early warning system model f...
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Auditboard EB SOX Playbook 2023 edition.
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
Internet of Everything -Basic concepts details
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Custom Battery Pack Design Considerations for Performance and Safety
The influence of sentiment analysis in enhancing early warning system model f...
Basics of Cloud Computing - Cloud Ecosystem
Convolutional neural network based encoder-decoder for efficient real-time ob...
Auditboard EB SOX Playbook 2023 edition.
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Statistics on Ai - sourced from AIPRM.pdf
Rapid Prototyping: A lecture on prototyping techniques for interface design
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
giants, standing on the shoulders of - by Daniel Stenberg
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
sustainability-14-14877-v2.pddhzftheheeeee
Internet of Everything -Basic concepts details
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Training Program for knowledge in solar cell and solar industry
NewMind AI Weekly Chronicles – August ’25 Week IV
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf

Galenframework

  • 1. Galen Framework - Responsive Design Look and Feel Automation
  • 2. Why Galen Framework ? • Layout Testing • Responsive Design Testing • Cross Browser Testing
  • 3. Pros and Cons with Galen • Pros: • Open Source • Easy to install • Error Reporting with screenshots for Pass & Fail • Easy to Write/Read syntax • Multiple Browsers support • Supports Functional Testing • Cons: • Lack of Test Editor. • Code maintenance is costly when there are lot of UI changes.
  • 5. How it works? • Describe any layout using special syntax – Spec Language. • It uses Selenium • For interacting with elements on page and getting their locations and dimensions. • Once it sees that something is wrong • Reports the error • Makes a screenshot and highlights the misbehaving element on it. • How it Runs? • Open a page in browser • Resizes it to specified size • Test the layout according to user-defined specs
  • 6. Getting Started with Galen • Define Galen Specs • Objects Definition • Object specs • Run individual Spec files • Inject JavaScript code • Create Test suite • Run Test suite
  • 7. Objects Definition @objects Header id header Logo-box css .logo-box Search-bar xpath //input[@class=‘searchBar’] • Indentation is 1 to 8 spaces but not tab. • xpath is not preferable unless css cannot be used. • Syntax for Object definition depends on the Galen Framework version. ( Ref: http://galenframework.com/docs/specslang-2.0-difference/)
  • 8. Object Specs =Test Global Header= @ on desktop Header: height 40px width 900px centered horizontally inside screen @ on mobile, desktop Logo-box: css color is “rgba(51, 51, 51, 1)” css background-color is “rgba(120, 190, 32, 1)” Search-bar: below: header 0px
  • 9. Object Specs ( cont.…) • Object Definition • http://galenframework.com/docs/reference-galen-spec-language-guide/#Objectdefinition • Multiple objects definition • http://galenframework.com/docs/reference-galen-spec-language-guide/#Multipleobjectsdefinition • Object Groups • http://galenframework.com/docs/reference-galen-spec-language-guide/#ObjectGroups • Many more: • Tagging and Sections • Variables • Conditional checks ( If, Else) • Loops ( For, ForEach) • Element locations relative to other elements • http://galenframework.com/docs/reference-galen-spec-language-guide/#SpecsReference
  • 10. Run Individual Spec file galen check homepage.gspec --url "http://example.com" --size "640x480" --javascript "some.js" --include "mobile,all" --exclude "toexclude" --htmlreport "htmlreport-dir" --testngreport "testng-report.xml" --jsonreport "jsonreport-dir" --junitreport "junit-report.xml“ Example: galen check specs/galen.spec --url "http://www.example.com" --size "1366x768" --include "desktop" --htmlreport "reports"
  • 11. Test Suite • Grouping Test Specs • Create Global Variables • Import Test Suites • Run Specs on different browsers • Run in Selenium Grid • Parameterization • Disabling tests
  • 12. Test Suite Syntax @@ set domain http://www.example.com @@table devices @@parameterized using devices Home page on ${device} device selenium chrome ${domain} ${size} check specs/galen.spec --include "${tags}" |Device| |Tags| |Size| |Mobile| |Mobile| |400x600| |Tablet| |Tablet| |720x480| |Desktop| |Desktop| |1364x800|
  • 13. Run Test Suite • galen test mytest01.test --htmlreport "htmlreport-dir" --testngreport "report/testng.xml" --jsonreport "jsonreport-dir" --junitreport "junit-report.xml" --parallel-tests 4 --filter "Home page on * device“ • Example: galen test tests/galen.test --htmlreport "reports"
  • 14. Reports • Report for individual Test cases • Screenshots for each Test case (Pass/Fail) • Report for Test suite executed
  • 15. Capabilities of Galen • Testing relative location of elements in web page. • Checking visible text. • Integration with Selenium Grid. • Inject JavaScript into code. • Color scheme testing. • Integration with Appium. • Can be integrated with Browser Stack, Sauce labs.
  • 16. Additional Features • Creating Page Dump • Creates information about all test objects on page with image samples. • Image Comparison • Java API • JavaScript API • Galen Extras • Advanced expressions which extends Galen specs language.
  • 17. Installation • System Requirements: • Java 1.7 or higher. • Text Editor. • Drivers for Respective browsers. • Galen Framework binary • http://galenframework.com/download/ • Add Galen folder to “PATH” environment variable.