expo:qa16 - am i responsive? test me!

25
Am I responsive? Test me! Galen framework

Upload: fernando-martin-gil

Post on 15-Apr-2017

103 views

Category:

Software


0 download

TRANSCRIPT

Page 1: expo:QA16 - Am I responsive? Test me!

Am I responsive? Test me!Galen framework

Page 2: expo:QA16 - Am I responsive? Test me!

About me• Fernando Martín

• Senior QA Engineer

• Tech lover

• Quasi-blogger http://bit.ly/fer-mg

Page 3: expo:QA16 - Am I responsive? Test me!

What am I showing today?

Page 4: expo:QA16 - Am I responsive? Test me!

Responsive Web Design

Page 5: expo:QA16 - Am I responsive? Test me!
Page 6: expo:QA16 - Am I responsive? Test me!
Page 7: expo:QA16 - Am I responsive? Test me!

Galen comes to the rescue!

Page 8: expo:QA16 - Am I responsive? Test me!

What’s Galen?

Page 9: expo:QA16 - Am I responsive? Test me!

What’s Galen?•Human readable• Syntax–Basic –Advanced

• Reports• JS and Java APIs• Selenium integration

Page 10: expo:QA16 - Am I responsive? Test me!

Installation1.Download–http://galenframework.com/download/–Last release: 2.2.5

2.Extract

3.Install–Linux/OS X: sudo ./install.sh–Windows: galen.bat

Page 11: expo:QA16 - Am I responsive? Test me!

1.Object definitionGalen Spec Language

HTML<body> <div id='search-bar'> <input type='text' name='search' value=''/> <a href='#' class='search-button'>Search</a> </div> <ul id='menu'> <li><a href='#'>Home</a></li>

<li><a href='#'>Blog</a></li> </ul></body>

Galen spec language@objects search-panel id search-bar search-panel-button css #search-bar a menu-item-* css #menu li a

Page 12: expo:QA16 - Am I responsive? Test me!

Galen Spec Language2.Object specs

❏ near

❏ below❏ above❏ left-of, right-of❏ inside❏ width❏ height

❏ component❏ Frame

support❏ count❏ color-scheme❏ Image

❏ aligned❏ text❏ visible❏ centered❏ absent❏ contains❏ on

Page 13: expo:QA16 - Am I responsive? Test me!

Galen Spec Language3.Advanced object specs

❏ Importing❏ Same spec to multiple objects❏ If statements❏ Loops❏ Warning level❏ Custom rules❏ Custom functions❏ Galen Spec JS API

Page 14: expo:QA16 - Am I responsive? Test me!

Galen Spec Language• Ranges

–width 100px –width 50 to 200 px –width > 40 px –width < 40 px –width ~ 100 px–width 30 to 100 % of screen/width

Page 15: expo:QA16 - Am I responsive? Test me!

Galen Spec Language

@set headerMargin 10 to 20px

= Header = header-icon: inside header ${headerMargin} top left

• Variables

Page 16: expo:QA16 - Am I responsive? Test me!

Galen Spec Language

= Main section = @on *

menu: height 300 px

@on desktop login-button: height 40 px

• Tagging and sections

Page 17: expo:QA16 - Am I responsive? Test me!

Galen Spec Language

Page 18: expo:QA16 - Am I responsive? Test me!

Running tests• Single page test

→ args:• url• javascript• include/exclude• size• htmlreport• testngreport• jsonreport

$ galen check specFile [args]

Page 19: expo:QA16 - Am I responsive? Test me!

Running tests• Example

$ galen check homepage.spec --url “http://example.com” --size “640x480” --include “mobile” --exclude “desktop” --htmlreport “htmlreport-dir”

Page 20: expo:QA16 - Am I responsive? Test me!

Running tests• Test suite

→ args:• htmlreport• testngreport• parallel-tests• recursive• filter

$ galen test testSuite [args]

Page 21: expo:QA16 - Am I responsive? Test me!

Running tests• Example

$ galen test mytest01.test --testngreport "report/testng.xml" --parallel-tests 2

Page 22: expo:QA16 - Am I responsive? Test me!

Reports

Page 23: expo:QA16 - Am I responsive? Test me!

Resources• Official website: http://galenframework.com/

• Github: https://github.com/galenframework

• More examples: http://mindengine.net/category/galen/

Page 24: expo:QA16 - Am I responsive? Test me!

Let’s code it!

Page 25: expo:QA16 - Am I responsive? Test me!

Thank you!Questions?

[email protected]://github.com/fernando-martin

Fernando Martín

http://bit.ly/expoqa-galen