SlideShare a Scribd company logo
© 2018 The Sage Group plc or its licensors. All rights reserved.
Visual Regression
Testing. Galen framework.
Kiran Kumar Shivane
Senior QA Automation Engineer
Kirankumar.Shivane@sage.com
© 2018 The Sage Group plc or its licensors. All rights reserved.
• Visual Testing – what it is?
• Problem - Need of Visual Testing
• Solution - Galen & Overview.
• How to automate tests.
• Demo
• Q&A
Agenda
© 2018 The Sage Group plc or its licensors. All rights reserved.
• Risk of Regression on every release to track UI Issues.
• Approximately 14-19% are UI Defects out of 100%.
• Sage intact UI team reports 10+ Defects on every release
.
• 6 to 10+ major Escalation on every quarter.
• Reduces 100% Manual UI testing efforts.
• Reduces 15% Overall testing efforts
• It is incredibly ‘faster’, ‘flexible’ and ‘pixel-perfect’.
• Significant time gains and the risk of regression reduced
• One method could replace many lines of code in
Selenium
Problem
© 2018 The Sage Group plc or its licensors. All rights reserved.
Functional Automation and Manual Visual Testing
• Automated functional testing tools are poorly suited for finding visual bugs.
• For manual testers, visual testing behaves a lot like this spot-the-difference game.
• It took me about 3 minutes to spot all six. Or you can cheat and look at the answers 
© 2018 The Sage Group plc or its licensors. All rights reserved.
Why can’t func Automation test cover visual issues?
If you used traditional checkpoints in a functional testing tool like Selenium
Webdriver, Cypress, WebdriverIO, or Appium, you’d have to check the following for each of those
21 visual elements:
1.Visible (true/false), Upper-left x,y coordinates, Height, Width, Background color,
21 visual elements x 5 assertions per element = 105 lines of assertion code
Imagine you need to test your app on:
5 operating systems, 5 popular browsers, 2 screen, 10 standard mobile device
“21 combo of browsers X 2 orientations of the ten mobiles (2×10)=20 +18 desktop display
resolutions”
798 Screen Configurations x 100 Screens in-app = 79,800 Screen
Configurations to test
© 2018 The Sage Group plc or its licensors. All rights reserved.
Solution
• Visual testing using Galen framework.
• Checking UI on Multiple environments, screen sizes, OSes,
and browsers etc.,
© 2018 The Sage Group plc or its licensors. All rights reserved.
Cross Browser & Cross Platform
© 2018 The Sage Group plc or its licensors. All rights reserved.
Advantages
• Cross browser testing, Cross Platform, Cross Device testing.
• Easy to Write/Read syntax, Opensource, Integration with Appium.
• Testing internationalization on the website.
• Error Reporting with screenshots for Pass & Fail
• Color scheme testing & Checking visible text.
• Testing relative location of elements in web page.
• Can be integrated with Selenium Grid, Browser Stack, Sauce labs,
Jenkins for CI execution.
• Code maintenance is easy when there are no lot of UI changes.
© 2018 The Sage Group plc or its licensors. All rights reserved.
Value adds ofGalen
Developers
• When developer changes the css, New views are implemented.
• With each check-in of front-end code.
• After unit testing and API testing, and before functional testing
• When dev want to verify bug related to UI is fixed for various
devices
with various resolutions.
Testers
• When QA wants to verify web app layout stays responsive.
• UI Displayed correctly on all kind of devices with various resolution.
• When sprint testing is going on along with Functional Validations.
• Ideally as part of your CI/CD pipeline running in Jenkins.
• When changes happens in UI like text alignment, font family, color,
image size, font size etc. changes.
How often? On days ending with “y”.
🙂
© 2018 The Sage Group plc or its licensors. All rights reserved.
How itworks?
• 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
© 2018 The Sage Group plc or its licensors. All rights reserved.
Open-source Tools
• Galen framework widely used Opensource Tool.
• Phantom CSS
Commercial Tools
• Applitools – Used by Sony, SAP, MasterCard.
• Crossbrowsertesting Visual Testing - From Smart Bear
Cost: $849/mo to $1249/mo & More.
Competitive Advantages.
© 2018 The Sage Group plc or its licensors. All rights reserved.
© 2018 The Sage Group plc or its licensors. All rights reserved.
Demo
Integrated with existing ia-selenium framework
Link:
https://intacct.box.com/s/4ep8d73lwjhxwjdvewvcypndx4idllns
© 2018 The Sage Group plc or its licensors. All rights reserved.
© 2018 The Sage Group plc or its licensors. All rights reserved.
Q&A
© 2018 The Sage Group plc or its licensors. All rights reserved.
© 2018 The Sage Group plc or its licensors. All rights reserved.
Thank You
© 2018 The Sage Group plc or its licensors. All rights reserved.
Differences:
1. Arm is Longer.
2. Leg is Moved.
3. Paw is not showing.
4. Stripe is wider.
5. Fence is different.
6. Arm is longer.
© 2018 The Sage Group plc or its licensors. All rights reserved.
Getting Started
Technically
• Define Galen
Specs
• Objects Definition
• Object specs
• Run individual Spec
files
• Inject JavaScript code
• Create Test suite
• Run Test suite
© 2018 The Sage Group plc or its licensors. All rights reserved.
Objects
Definition
@object
s
Header id header
Logo-box css .logo-box
Search-
bar
xpath //input[@class=‘searchBa
r’]
• 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/)
© 2018 The Sage Group plc or its licensors. All rights reserved.
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,
© 2018 The Sage Group plc or its licensors. All rights reserved.
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
© 2018 The Sage Group plc or its licensors. All rights reserved.
Test
Suite
• Grouping Test Specs
• Create Global Variables
• Import Test Suites
• Run Specs on different
browsers
• Run in Selenium Grid
• Parameterization
• Disabling tests
© 2018 The Sage Group plc or its licensors. All rights reserved.
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"
© 2018 The Sage Group plc or its licensors. All rights reserved.
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|
© 2018 The Sage Group plc or its licensors. All rights reserved.
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"
© 2018 The Sage Group plc or its licensors. All rights reserved.
Report
s
• Report for individual Test cases
• Screenshots for each Test case
(Pass/Fail)
• Report for Test suite executed
© 2018 The Sage Group plc or its licensors. All rights reserved.
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.
© 2018 The Sage Group plc or its licensors. All rights reserved.
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.
© 2018 The Sage Group plc or its licensors. All rights reserved.
Reference
s
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/

More Related Content

Featured

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Galen_Sage_PPT_v01.pptx

  • 1. © 2018 The Sage Group plc or its licensors. All rights reserved. Visual Regression Testing. Galen framework. Kiran Kumar Shivane Senior QA Automation Engineer Kirankumar.Shivane@sage.com
  • 2. © 2018 The Sage Group plc or its licensors. All rights reserved. • Visual Testing – what it is? • Problem - Need of Visual Testing • Solution - Galen & Overview. • How to automate tests. • Demo • Q&A Agenda
  • 3. © 2018 The Sage Group plc or its licensors. All rights reserved. • Risk of Regression on every release to track UI Issues. • Approximately 14-19% are UI Defects out of 100%. • Sage intact UI team reports 10+ Defects on every release . • 6 to 10+ major Escalation on every quarter. • Reduces 100% Manual UI testing efforts. • Reduces 15% Overall testing efforts • It is incredibly ‘faster’, ‘flexible’ and ‘pixel-perfect’. • Significant time gains and the risk of regression reduced • One method could replace many lines of code in Selenium Problem
  • 4. © 2018 The Sage Group plc or its licensors. All rights reserved. Functional Automation and Manual Visual Testing • Automated functional testing tools are poorly suited for finding visual bugs. • For manual testers, visual testing behaves a lot like this spot-the-difference game. • It took me about 3 minutes to spot all six. Or you can cheat and look at the answers 
  • 5. © 2018 The Sage Group plc or its licensors. All rights reserved. Why can’t func Automation test cover visual issues? If you used traditional checkpoints in a functional testing tool like Selenium Webdriver, Cypress, WebdriverIO, or Appium, you’d have to check the following for each of those 21 visual elements: 1.Visible (true/false), Upper-left x,y coordinates, Height, Width, Background color, 21 visual elements x 5 assertions per element = 105 lines of assertion code Imagine you need to test your app on: 5 operating systems, 5 popular browsers, 2 screen, 10 standard mobile device “21 combo of browsers X 2 orientations of the ten mobiles (2×10)=20 +18 desktop display resolutions” 798 Screen Configurations x 100 Screens in-app = 79,800 Screen Configurations to test
  • 6. © 2018 The Sage Group plc or its licensors. All rights reserved. Solution • Visual testing using Galen framework. • Checking UI on Multiple environments, screen sizes, OSes, and browsers etc.,
  • 7. © 2018 The Sage Group plc or its licensors. All rights reserved. Cross Browser & Cross Platform
  • 8. © 2018 The Sage Group plc or its licensors. All rights reserved. Advantages • Cross browser testing, Cross Platform, Cross Device testing. • Easy to Write/Read syntax, Opensource, Integration with Appium. • Testing internationalization on the website. • Error Reporting with screenshots for Pass & Fail • Color scheme testing & Checking visible text. • Testing relative location of elements in web page. • Can be integrated with Selenium Grid, Browser Stack, Sauce labs, Jenkins for CI execution. • Code maintenance is easy when there are no lot of UI changes.
  • 9. © 2018 The Sage Group plc or its licensors. All rights reserved. Value adds ofGalen Developers • When developer changes the css, New views are implemented. • With each check-in of front-end code. • After unit testing and API testing, and before functional testing • When dev want to verify bug related to UI is fixed for various devices with various resolutions. Testers • When QA wants to verify web app layout stays responsive. • UI Displayed correctly on all kind of devices with various resolution. • When sprint testing is going on along with Functional Validations. • Ideally as part of your CI/CD pipeline running in Jenkins. • When changes happens in UI like text alignment, font family, color, image size, font size etc. changes. How often? On days ending with “y”. 🙂
  • 10. © 2018 The Sage Group plc or its licensors. All rights reserved. How itworks? • 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
  • 11. © 2018 The Sage Group plc or its licensors. All rights reserved. Open-source Tools • Galen framework widely used Opensource Tool. • Phantom CSS Commercial Tools • Applitools – Used by Sony, SAP, MasterCard. • Crossbrowsertesting Visual Testing - From Smart Bear Cost: $849/mo to $1249/mo & More. Competitive Advantages.
  • 12. © 2018 The Sage Group plc or its licensors. All rights reserved. © 2018 The Sage Group plc or its licensors. All rights reserved. Demo Integrated with existing ia-selenium framework Link: https://intacct.box.com/s/4ep8d73lwjhxwjdvewvcypndx4idllns
  • 13. © 2018 The Sage Group plc or its licensors. All rights reserved. © 2018 The Sage Group plc or its licensors. All rights reserved. Q&A
  • 14. © 2018 The Sage Group plc or its licensors. All rights reserved. © 2018 The Sage Group plc or its licensors. All rights reserved. Thank You
  • 15. © 2018 The Sage Group plc or its licensors. All rights reserved. Differences: 1. Arm is Longer. 2. Leg is Moved. 3. Paw is not showing. 4. Stripe is wider. 5. Fence is different. 6. Arm is longer.
  • 16. © 2018 The Sage Group plc or its licensors. All rights reserved. Getting Started Technically • Define Galen Specs • Objects Definition • Object specs • Run individual Spec files • Inject JavaScript code • Create Test suite • Run Test suite
  • 17. © 2018 The Sage Group plc or its licensors. All rights reserved. Objects Definition @object s Header id header Logo-box css .logo-box Search- bar xpath //input[@class=‘searchBa r’] • 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/)
  • 18. © 2018 The Sage Group plc or its licensors. All rights reserved. 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,
  • 19. © 2018 The Sage Group plc or its licensors. All rights reserved. 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
  • 20. © 2018 The Sage Group plc or its licensors. All rights reserved. Test Suite • Grouping Test Specs • Create Global Variables • Import Test Suites • Run Specs on different browsers • Run in Selenium Grid • Parameterization • Disabling tests
  • 21. © 2018 The Sage Group plc or its licensors. All rights reserved. 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"
  • 22. © 2018 The Sage Group plc or its licensors. All rights reserved. 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|
  • 23. © 2018 The Sage Group plc or its licensors. All rights reserved. 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"
  • 24. © 2018 The Sage Group plc or its licensors. All rights reserved. Report s • Report for individual Test cases • Screenshots for each Test case (Pass/Fail) • Report for Test suite executed
  • 25. © 2018 The Sage Group plc or its licensors. All rights reserved. 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.
  • 26. © 2018 The Sage Group plc or its licensors. All rights reserved. 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.
  • 27. © 2018 The Sage Group plc or its licensors. All rights reserved. Reference s 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/