SlideShare uma empresa Scribd logo
1 de 48
Baixar para ler offline
1 
Automation Abstractions: 
Page Objects and Beyond 
Alan Richardson 
@eviltester 
https://xp-dev.com/svn/AutomationAbstractions 
www.SeleniumSimplified.com 
www.EvilTester.com 
www.CompendiumDev.co.uk 
www.JavaForTesters.com
2 
What is Abstraction? 
● Modelling 
● Separation of concerns 
● Logical vs Physical 
● Functional vs Structural 
● Interfaces vs Implementations 
● Data / Entities / Persistence 
● Functionality / Task Flow 
● Goals / Strategies 
● Layers – GUI, DB, HTTP 
● Etc.
“I must create a system. or be 
enslav'd by another Mans; I 
will not reason & compare: 
my business is to create” 
William Blake, 1820 
Jerusalem: The Emanation of the Giant Albion 
3 
http://www.blakearchive.org/exist/blake/archive/object.xq?objectid=jerusalem.e.illbk.10&java=no
https://xp-dev.com/svn/AutomationAbstractions 
4 
Example Test Without 
Abstraction 
@Before 
public void startDriver(){ 
@Test 
public void canCreateAToDoWithNoAbstraction(){ 
driver.get("http://todomvc.com/architecture-examples/backbone/"); 
int originalNumberOfTodos = driver.findElements( 
By.cssSelector("ul#todo-list li")).size(); 
WebElement createTodo = driver.findElement(By.id("new-todo")); 
createTodo.click(); 
createTodo.sendKeys("new task"); 
createTodo.sendKeys(Keys.ENTER); 
assertThat(driver.findElement( 
By.id("filters")).isDisplayed(), is(true)); 
int newToDos = driver.findElements( 
By.cssSelector("ul#todo-list li")).size(); 
assertThat(newToDos, greaterThan(originalNumberOfTodos)); 
} 
driver = new FirefoxDriver(); 
} 
@After 
public void stopDriver(){ 
driver.close(); 
driver.quit(); 
} 
NoAbstractionTest.java
But this does use some 
abstraction layers 
LLooccaattoorr A Abbssttrraaccttioionns 
WebElement Generic Element Abstraction 
5 
Example Test Without 
Abstraction 
@Before 
public void startDriver(){ 
WebDriver Generic Browser Abstraction 
@Test 
public void canCreateAToDoWithNoAbstraction(){ 
Firefox Browser Abstraction 
driver.get("http://todomvc.com/architecture-examples/backbone/"); 
int originalNumberOfTodos = driver.findElements( 
By.cssSelector("ul#todo-list li")).size(); 
WebElement createTodo = driver.findElement(By.id("new-todo")); 
createTodo.click(); 
createTodo.sendKeys("new task"); 
createTodo.sendKeys(Keys.ENTER); 
assertThat(driver.findElement( 
By.id("filters")).isDisplayed(), is(true)); 
int newToDos = driver.findElements( 
Manipulation Abstractions 
By.cssSelector("ul#todo-list li")).size(); 
assertThat(newToDos, greaterThan(originalNumberOfTodos)); 
} 
driver = new FirefoxDriver(); 
} 
@After 
public void stopDriver(){ 
driver.close(); 
driver.quit(); 
} 
NoAbstractionTest.java
6 
WebDriver provides abstractions 
● Browser 
● DOM 
● Web Element 
Tool vendors gain value from generic abstractions. 
You gain value from 'domain' abstractions.
7 
Example Test With Abstraction 
@Before 
public void startDriver(){ 
@Test 
public void canCreateAToDoWithAbstraction(){ 
TodoMVCUser user = 
new TodoMVCUser(driver, new TodoMVCSite()); 
user.opensApplication().and().createNewToDo("new task"); 
ApplicationPageFunctional page = 
new ApplicationPageFunctional(driver, 
new TodoMVCSite()); 
assertThat(page.getCountOfTodoDoItems(), is(1)); 
assertThat(page.isFooterVisible(), is(true)); 
} 
driver = new FirefoxDriver(); 
} 
@After 
public void stopDriver(){ 
driver.close(); 
driver.quit(); 
} 
NoAbstractionTest.java
8 
Why Abstraction? 
● Change implementations 
● Single Responsibility – only changes when 
necessary 
● Makes automation readable and maintainable 
● We can unit test some of our test code 
● etc. 
https://xp-dev.com/svn/AutomationAbstractions
9 
Some Abstraction Layer Categories 
1) Data 
– Generic Data Abstractions e.g. email, postcode 
2) Physical 
– Physical layout of your application e.g. pages, 
components 
– Navigation across pages 
3) Domain 
– Your application Entities domain e.g. user, account 
4) Logical 
– User actions, workflows
10 
Common Automation Abstractions 
● Page Objects: pages, components, widgets 
● Dom Element Abstractions: select, textbox, etc. 
● Domain Objects: user, account, order 
● Gherkin (Given/When/And/Then) 
● Domain Specific Languages: code, keywords 
● ... 
https://xp-dev.com/svn/AutomationAbstractions
11 
Abstraction != Implementation 
● Abstraction != Tool / Framework / 
Implementation 
● Gherkin != Cucumber 
● Page Object != Page Factory / Slow Loadable 
● DSL != Keyword Driven 
If we want to get good at abstraction then we 
need to model, split apart, make the relationships 
clear, and be aware of our options.
12 
Page Objects 
● The most obvious 
automation abstraction 
● What is it? 
– A page? A Component? 
● Do web applications still 
have pages?
A Page Object that abstracts a Page 
13 
● Often has methods for 
– Opening the page 
– Accessing elements 
– Doing stuff, and navigating as a side-effect 
– Logical high level functionality e.g. login 
– Low level physical functionality e.g. 
typeUsername, clickLoginButton 
Should a Page Object be responsible for all of 
this?
14 
Page Object Design Decisions 
● What methods does it have? 
– Functional 
● login(username, password), 
● loginAs(user) 
– Structural 
● enterName(username), enterPassword(password), 
clickLogin(), submitLoginForm(username, password) 
● Does it expose elements or not? 
– public WebElement loginButton; 
– public WebElement getLoginButton(); 
– public clickLoginButton();
15 
Page Object Functionality 
Approaches 
● Expose WebElements Directly 
– Leads to WebElement Abstractions 
– public TextField userNameField; 
● Hide WebElements behind physical functional 
methods e.g. typeUserName("bob"); 
● Logical helper methods e.g. 
loginAs(name,pass) 
● Layers of Page Objects 
– Physical 
– Logical
16 
Navigation Design Decisions 
● Does a Page Object return other pages? 
public IssueListPage submit(){ 
driver.findElement(By.id(“submit”)).click(); 
return new IssueListPage(driver); 
} 
● Or Navigate implicitly after interactions 
● Or have navigation objects
17 
Implicit or Explicit Wait? 
● Implicit Wait 
driver.manage().timeouts(). 
implicitlyWait(15L, TimeUnit.SECONDS); 
assertThat(driver.findElement( 
By.id("filters")).isDisplayed() 
, is(true)); 
● Explicit Wait 
driver.manage().timeouts(). 
implicitlyWait(0L, TimeUnit.SECONDS); 
WebDriverWait wait = new WebDriverWait(driver,15); 
wait.until(ExpectedConditions.elementToBeClickable 
(By.id("filters"))); 
Example: 'NoAbstractionTest.java'
18 
Implementing Page Objects 
● POJO 
– Plain object, driver in constructor, methods use 
driver.<method> 
● Page Factory 
– Annotated elements, lazy instantiation via reflection 
● LoadableComponent 
– Common interface (load, isLoaded), isLoaded 
throws Error 
● SlowLoadableComponent 
– Common interface, waits for on isLoaded 
● Other approaches?
19 
Example Implementations 
https://xp-dev.com/svn/AutomationAbstractions
20 
POJO 
● 'ApplicationPage.java' 
– Used in 'SequentialCreationOfTest.java' 
– Not much refactoring in the example 
● Simple Class 
● WebDriver passed to constructor 
● Composition of any components 
● e.g. 
– com.seleniumsimplified.todomvc.page.pojo 
– 'ApplicationPage.java' 
● Not much refactoring in the example
Pojo Example 
21
22 
Functional vs Structural 
● Functional 
– loginAs(username, password) 
● Structural 
– enterUsername 
– enterPassword 
– clickLoginButton 
– submitLoginForm(username, password)
23 
Functional Vs Structural Example 
● One way of answering “what methods to put on 
a page object” 
– Is it functional / behavioural? 
– Is it structural / Physical? 
● Functional 'uses' Structural implementation 
● Why? 
– Sometimes it is just a naming difference 
– Handling exceptions in functional but not structural 
– Higher level methods in Functional 
– Different concepts e.g. deleteLastItem
24 
Page Factory 
● Annotate fields with @FindBy 
● Instantiate in constructor using 
PageFactory.initElements 
– Can create your own page factory initialiser 
● Avoids boilerplate accessor methods 
● Fast to create Page Objects 
● Might become harder to expand and maintain
25 
Page Factory Example 
@FindBy(how = How.CSS, using="#todo-count strong") 
private WebElement countElementStrong; 
@FindBy(how = How.CSS, using="#todo-count") 
private WebElement countElement; 
@FindBy(how = How.CSS, using="#filters li a") 
List<WebElement> filters; 
@FindBy(how = How.ID, using="clear-completed") 
List<WebElement> clearCompletedAsList; 
@FindBy(how = How.ID, using="clear-completed") 
WebElement clearCompletedButton; 
public ApplicationPageStructuralFactory(WebDriver driver, TodoMVCSite todoMVCSite) 
{ 
PageFactory.initElements(driver, this); 
this.driver = driver; 
...
26 
SlowLoadableComponent 
● Some pages and components need 
synchronisation to wait till they are ready 
– One approach – SlowLoadableComponent adds 
responsibility for waiting, to the page 
● extend SlowLoadableComponent 
● Standard interface for synchronisation on load 
– get() 
● If isLoaded then return this Else load 
● While not loaded{ wait for 200 millseconds} 
– Implement load and isLoaded
27 
Fluent Page Objects 
todoMVC = new ApplicationPageFunctionalFluent( 
driver, todoMVCSite); 
todoMVC.get(); 
todoMVC.enterNewToDo("First Completed Item"). 
and(). 
toggleCompletionOfLastItem(). 
then(). 
enterNewToDo("Still to do this"). 
and(). 
enterNewToDo("Still to do this too"). 
then(). 
filterOnCompleted();
28 
Fluent Page Objects 
● Methods return the page object or other objects 
instead of void 
– void clickDeleteButton(); 
– PageObject clickDeleteButton(); 
● Syntactic sugar methods: 
– and(), then(), also() 
● Can work well at high levels of abstraction and 
when no navigation involved 
● Train Wreck?
Navigation Options 
29 
● Direct in Test: page.get(); page.waitFor(); 
● Instantiate new pages based on test flow 
– Navigation as side-effect, may have to bypass 'get' 
– Loadable pages, non-loadable, support classes 
● Page Object methods might return other Pages 
– e.g. a method on the login page might be 
● MyAccountPage clickLogin(); 
● We might use navigation objects 
– direct, Jump.to(MyAccountPage.class) 
– path based (current page → desired page) 
● Navigate.to(MyAccountPage.class)
30 
Possible Domain Abstractions 
● Logical Objects 
– ToDo 
– ToDoList 
● Physical Objects 
– LocallyStoredToDo 
● Actors 
– User 
● Environment 
– Site 
– Implementation
31 
Page Objects & Domain Objects 
● Instead of 
– todoMVC.enterNewToDo(“New Item”) 
● We could have have 
– ToDoItem newItem = new ToDoItem(“New Item”); 
– todoMVC.enterNewToDo(newItem); 
● See code in DomainBasedTest
32 
Domain Objects That Span Logical 
& Physical 
e.g. User 
● user.createNewToDo(“new item”) 
● user.createNewToDo(newItem) 
● See use in NoAbstractionTest
33 
Sometimes it is possible to over 
think this stuff 
● Don't let thinking about this slow you down 
● Conduct experiments 
● Refactor 
● Rethink if 
– you are maintaining too much 
– your abstraction layer stops you doing stuff 
– you are 'working around' your abstraction layers
34 
Element 
Abstractions
35 
Element Abstraction Example 
public interface Checkbox { 
public boolean isChecked(); 
public Checkbox check(); 
public Checkbox uncheck(); 
public Checkbox toggle(); 
} 
● Would you include 'toggle'? 
https://xp-dev.com/svn/AutomationAbstractions
36 
Element Abstractions 
● Existing support classes: Select, 
● Possible: TextBox, Checkbox, TextBox, File etc. 
● Can enforce Semantics 
– Checkbox: isChecked, check(), uncheck(), toggle() 
– TextBox: clear(), enterText() 
– etc. 
● Pass back from Page Objects into test?
Element Abstraction Pros and Cons 
37 
● May have to create a custom page factory 
● Can help 'restrict' code i.e. check or uncheck, 
rather than click, enforces 'semantics' 
● If you create them... 
– allow return WebElement 
● so that I can go beyond the abstraction layer if I need to. 
Not required if it is just a WebElement wrapper. 
https://xp-dev.com/svn/AutomationAbstractions
38 
Component Abstractions 
● Shared Components/Widgets on the page 
● e.g. 
– VisibleToDoEntry, VisibleToDoList 
– Filters, Footer, Header, etc. 
● Could have 'functional' representation for 
repeated items e.g. login forms 
● Could have 'structural' representation 
● Likely use : page object composition
39 
Component Abstraction Example 
TodoEntry todo = page.getToDoEntryAt(lastItemPosition); 
todo.markCompleted(); 
Instead of 
page.markTodoCompleted(lastItemPosition);
40 
Gherkin as an abstraction layer 
Feature: We can create and edit To Do lists in ToDoMvc 
We want to amend todos in ToDoMVC because that is 
the set of exercises on the abstraction tutorial 
Scenario: Create a ToDo Item 
Given a user opens a blank ToDoMVC page 
When the user creates a todo "new task" 
Then they see 1 todo item on the page 
● Implement steps using highest appropriate 
abstraction layer 
● CucumberJVM as 'DSL implementor' 
● 'Expressibility' vs 'Step Re-use' 
● See todomvc.feature and ToDoMvcSteps
41 
My modeling biases 
● Driver 
– Inject so instantiate any page or component as 
required/desired at any time 
● Explicit Synchronisation 
– To make sure that the desired object is available 
and ready for use (as defined by synchronisation) 
● Navigation 
– Implicit (via taking action e.g. click) 
– Explicit Navigation Object, not in page object 
● Open/jump (via driver.get) 
● To (state model from current, to desired)
42 
My modeling biases 
● Page Objects 
– Physical 
● abstract the 'real world' 
– Components 
● For common features on the page 
– Logical 
● abstract the functionality 
● Sometimes these are entity methods not page objects 
– e.g. user.registers().and().logsin() 
● I tend not to.... 
– abstract WebElements
43 
My modeling biases 
● I tend not to.... 
– abstract WebElements 
– Use inheritence to create a model of the app 
● e.g. MyAppPage extends GenericAppPage 
– Use 3rd party abstractions on top of WebDriver
44 
Are there rights and wrongs? 
● Right / Wrong? 
● Decisions? 
● Project/Team/Organisation Standards? 
Identify your own biases - 
Experiment 
Recognise your decisions
45 
Decisions 
● The 'limits' and overlap of Abstraction Layers 
● Build it now, or 'refactor to' later 
● How much change is anticipated? 
– To which layer? GUI, Business domain, Workflow? 
● Who is working with the automation code? 
– Skill levels? Support needed? 
● How/When with the automation execute?
46 
Other Useful Links 
● Jeff “Cheezy” Morgan – page-object ruby gem, 
data_magic gem and stareast code 
– https://github.com/cheezy?tab=repositories 
● Marcus Merrell 
– Self-Generating Test Artifacts for Selenium/WebDriver 
– https://www.youtube.com/watch?v=mSCFsUOgPpw 
● Anand Ramdeo 
– One Step at a Time 
– https://www.youtube.com/watch?v=dFPgzH_XP1I 
https://xp-dev.com/svn/AutomationAbstractions
47 
Homework 
● Using the code at 
https://xp-dev.com/svn/AutomationAbstractions/ 
– Compare the different implementations under 'main' 
● com.seleniumsimplified.todomvc.page 
– Investigate how the Page Objects delegate to each 
other, and the Domain Objects use Page Objects 
– Examine the 'test' usage of the Page Objects and 
Domain Objects 
– Examine the different navigation approaches
48 
Blogs and Websites 
● CompendiumDev.co.uk 
● SeleniumSimplified.com 
● EvilTester.com 
● JavaForTesters.com 
● Twitter: @eviltester 
Online Training Courses 
● Technical Web Testing 101 
Unow.be/at/techwebtest101 
● Intro to Selenium 
Unow.be/at/startwebdriver 
● Selenium 2 WebDriver API 
Unow.be/at/webdriverapi 
Videos 
youtube.com/user/EviltesterVideos 
Books 
Selenium Simplified 
Unow.be/rc/selsimp 
Java For Testers 
leanpub.com/javaForTesters 
Alan Richardson 
uk.linkedin.com/in/eviltester 
Independent Test Consultant 
& Custom Training 
Contact Alan 
http://compendiumdev.co.uk/contact

Mais conteúdo relacionado

Mais procurados

SW 테스트 프로세스& 메뉴얼_V 모델
SW 테스트 프로세스& 메뉴얼_V 모델SW 테스트 프로세스& 메뉴얼_V 모델
SW 테스트 프로세스& 메뉴얼_V 모델KU HUISEONG
 
「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~
「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~
「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~A AOKI
 
[D2 오픈세미나]1.무한스크롤성능개선
[D2 오픈세미나]1.무한스크롤성능개선[D2 오픈세미나]1.무한스크롤성능개선
[D2 오픈세미나]1.무한스크롤성능개선NAVER D2
 
フラッター開発におけるシークレット情報取扱考察
フラッター開発におけるシークレット情報取扱考察フラッター開発におけるシークレット情報取扱考察
フラッター開発におけるシークレット情報取扱考察cch-robo
 
現場で役立つシステム設計の原則
現場で役立つシステム設計の原則現場で役立つシステム設計の原則
現場で役立つシステム設計の原則増田 亨
 
go_router が隠してくれるもの
go_router が隠してくれるものgo_router が隠してくれるもの
go_router が隠してくれるものcch-robo
 
Enhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock StructureEnhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock StructureSalesforce Developers
 
새해 일어난 일
새해 일어난 일새해 일어난 일
새해 일어난 일Eunhyang Kim
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...KMS Technology
 
メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −
メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −
メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −JustSystems Corporation
 
Next.js Introduction
Next.js IntroductionNext.js Introduction
Next.js IntroductionSaray Chak
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressionsHans Emmel
 
ディープラーニングとAppiumでモバイルテスト自動化
ディープラーニングとAppiumでモバイルテスト自動化ディープラーニングとAppiumでモバイルテスト自動化
ディープラーニングとAppiumでモバイルテスト自動化Nozomi Ito
 
Cognitive Complexity でコードの複雑さを定量的に計測しよう
Cognitive Complexity でコードの複雑さを定量的に計測しようCognitive Complexity でコードの複雑さを定量的に計測しよう
Cognitive Complexity でコードの複雑さを定量的に計測しようShuto Suzuki
 
Testing with Express, Mocha & Chai
Testing with Express, Mocha & ChaiTesting with Express, Mocha & Chai
Testing with Express, Mocha & ChaiJoerg Henning
 
2022 01-okky-코드리뷰
2022 01-okky-코드리뷰2022 01-okky-코드리뷰
2022 01-okky-코드리뷰Myeongseok Baek
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]Kuro Hsu
 

Mais procurados (20)

SW 테스트 프로세스& 메뉴얼_V 모델
SW 테스트 프로세스& 메뉴얼_V 모델SW 테스트 프로세스& 메뉴얼_V 모델
SW 테스트 프로세스& 메뉴얼_V 모델
 
「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~
「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~
「実践ドメイン駆動設計」社内読書会まとめ ~IDDD本難民に捧げる1章から7章~
 
Jenkins 再入門
Jenkins 再入門Jenkins 再入門
Jenkins 再入門
 
[D2 오픈세미나]1.무한스크롤성능개선
[D2 오픈세미나]1.무한스크롤성능개선[D2 오픈세미나]1.무한스크롤성능개선
[D2 오픈세미나]1.무한스크롤성능개선
 
フラッター開発におけるシークレット情報取扱考察
フラッター開発におけるシークレット情報取扱考察フラッター開発におけるシークレット情報取扱考察
フラッター開発におけるシークレット情報取扱考察
 
現場で役立つシステム設計の原則
現場で役立つシステム設計の原則現場で役立つシステム設計の原則
現場で役立つシステム設計の原則
 
go_router が隠してくれるもの
go_router が隠してくれるものgo_router が隠してくれるもの
go_router が隠してくれるもの
 
Enhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock StructureEnhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock Structure
 
새해 일어난 일
새해 일어난 일새해 일어난 일
새해 일어난 일
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −
メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −
メンバーのスキルアップ、どうしてる? − Java 100本ノックで新加入メンバーを鍛えてみた −
 
Next.js Introduction
Next.js IntroductionNext.js Introduction
Next.js Introduction
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressions
 
ディープラーニングとAppiumでモバイルテスト自動化
ディープラーニングとAppiumでモバイルテスト自動化ディープラーニングとAppiumでモバイルテスト自動化
ディープラーニングとAppiumでモバイルテスト自動化
 
Cognitive Complexity でコードの複雑さを定量的に計測しよう
Cognitive Complexity でコードの複雑さを定量的に計測しようCognitive Complexity でコードの複雑さを定量的に計測しよう
Cognitive Complexity でコードの複雑さを定量的に計測しよう
 
Testing with Express, Mocha & Chai
Testing with Express, Mocha & ChaiTesting with Express, Mocha & Chai
Testing with Express, Mocha & Chai
 
2022 01-okky-코드리뷰
2022 01-okky-코드리뷰2022 01-okky-코드리뷰
2022 01-okky-코드리뷰
 
Bazel
BazelBazel
Bazel
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]
 
Jenkins と groovy
Jenkins と groovyJenkins と groovy
Jenkins と groovy
 

Destaque

Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Alan Richardson
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object PatternDante Briones
 
Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014Oren Rubin
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSargis Sargsyan
 
Unbearable Test Code Smell
Unbearable Test Code SmellUnbearable Test Code Smell
Unbearable Test Code SmellSteven Mak
 
Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Alan Richardson
 
Applying Innovation at different levels of abstraction
Applying Innovation at different levels of abstractionApplying Innovation at different levels of abstraction
Applying Innovation at different levels of abstractionJathish MJ
 
Innovative Test Automation Solution
Innovative Test Automation SolutionInnovative Test Automation Solution
Innovative Test Automation SolutionAlan Lee White
 
Lessons learned with Bdd: a tutorial
Lessons learned with Bdd: a tutorialLessons learned with Bdd: a tutorial
Lessons learned with Bdd: a tutorialAlan Richardson
 
Is Abstraction the Key to Artificial Intelligence? - Lorenza Saitta
Is Abstraction the Key to Artificial Intelligence? - Lorenza SaittaIs Abstraction the Key to Artificial Intelligence? - Lorenza Saitta
Is Abstraction the Key to Artificial Intelligence? - Lorenza SaittaWithTheBest
 
Practical Test Automation Deep Dive
Practical Test Automation Deep DivePractical Test Automation Deep Dive
Practical Test Automation Deep DiveAlan Richardson
 
Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...
Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...
Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...Alan Richardson
 
Evil testers guide to technical testing
Evil testers guide to technical testingEvil testers guide to technical testing
Evil testers guide to technical testingAlan Richardson
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object PatternAnand Bagmar
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When AutomatingAlan Richardson
 
20041221 gui testing survey
20041221 gui testing survey20041221 gui testing survey
20041221 gui testing surveyWill Shen
 
Why Test Automation Fails
Why Test Automation FailsWhy Test Automation Fails
Why Test Automation FailsRanorex
 

Destaque (20)

Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014
 
Beyond Page Objects
Beyond Page ObjectsBeyond Page Objects
Beyond Page Objects
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
Unbearable Test Code Smell
Unbearable Test Code SmellUnbearable Test Code Smell
Unbearable Test Code Smell
 
Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014
 
Applying Innovation at different levels of abstraction
Applying Innovation at different levels of abstractionApplying Innovation at different levels of abstraction
Applying Innovation at different levels of abstraction
 
Innovative Test Automation Solution
Innovative Test Automation SolutionInnovative Test Automation Solution
Innovative Test Automation Solution
 
Lessons learned with Bdd: a tutorial
Lessons learned with Bdd: a tutorialLessons learned with Bdd: a tutorial
Lessons learned with Bdd: a tutorial
 
Ch1 1
Ch1 1Ch1 1
Ch1 1
 
Is Abstraction the Key to Artificial Intelligence? - Lorenza Saitta
Is Abstraction the Key to Artificial Intelligence? - Lorenza SaittaIs Abstraction the Key to Artificial Intelligence? - Lorenza Saitta
Is Abstraction the Key to Artificial Intelligence? - Lorenza Saitta
 
Practical Test Automation Deep Dive
Practical Test Automation Deep DivePractical Test Automation Deep Dive
Practical Test Automation Deep Dive
 
Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...
Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...
Test Automation Day 2015 Keynote Alan Richardson - Practical Lessons Learned ...
 
Multithreading Design Patterns
Multithreading Design PatternsMultithreading Design Patterns
Multithreading Design Patterns
 
Evil testers guide to technical testing
Evil testers guide to technical testingEvil testers guide to technical testing
Evil testers guide to technical testing
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object Pattern
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When Automating
 
20041221 gui testing survey
20041221 gui testing survey20041221 gui testing survey
20041221 gui testing survey
 
Why Test Automation Fails
Why Test Automation FailsWhy Test Automation Fails
Why Test Automation Fails
 

Semelhante a Automation Abstraction Layers: Page Objects and Beyond

Automation Abstractions: Page Objects and Beyond
Automation Abstractions: Page Objects and BeyondAutomation Abstractions: Page Objects and Beyond
Automation Abstractions: Page Objects and BeyondTechWell
 
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Iakiv Kramarenko
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest servicesIoan Eugen Stan
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideMek Srunyu Stittri
 
Selenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web ApplicationsSelenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web Applicationsqooxdoo
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and EasybIakiv Kramarenko
 
Selenium Testing Training in Bangalore
Selenium Testing Training in BangaloreSelenium Testing Training in Bangalore
Selenium Testing Training in Bangalorerajkamal560066
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
 
Hybrid App using WordPress
Hybrid App using WordPressHybrid App using WordPress
Hybrid App using WordPressHaim Michael
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Roy de Kleijn
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e bigAndy Peterson
 
The WebView Role in Hybrid Applications
The WebView Role in Hybrid ApplicationsThe WebView Role in Hybrid Applications
The WebView Role in Hybrid ApplicationsHaim Michael
 
Up and Running with ReactJS
Up and Running with ReactJSUp and Running with ReactJS
Up and Running with ReactJSLoc Nguyen
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instrumentsArtem Nagornyi
 
One code Web, iOS, Android
One code Web, iOS, AndroidOne code Web, iOS, Android
One code Web, iOS, AndroidArtem Marchenko
 
Test strategy for web development
Test strategy for web developmentTest strategy for web development
Test strategy for web developmentalice yang
 
Ditching jQuery Madison
Ditching jQuery MadisonDitching jQuery Madison
Ditching jQuery MadisonHao Luo
 

Semelhante a Automation Abstraction Layers: Page Objects and Beyond (20)

Automation Abstractions: Page Objects and Beyond
Automation Abstractions: Page Objects and BeyondAutomation Abstractions: Page Objects and Beyond
Automation Abstractions: Page Objects and Beyond
 
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testing
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java side
 
Selenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web ApplicationsSelenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web Applications
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
 
Web ui testing
Web ui testingWeb ui testing
Web ui testing
 
Selenium Testing Training in Bangalore
Selenium Testing Training in BangaloreSelenium Testing Training in Bangalore
Selenium Testing Training in Bangalore
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Hybrid App using WordPress
Hybrid App using WordPressHybrid App using WordPress
Hybrid App using WordPress
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
 
The WebView Role in Hybrid Applications
The WebView Role in Hybrid ApplicationsThe WebView Role in Hybrid Applications
The WebView Role in Hybrid Applications
 
Up and Running with ReactJS
Up and Running with ReactJSUp and Running with ReactJS
Up and Running with ReactJS
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 
One code Web, iOS, Android
One code Web, iOS, AndroidOne code Web, iOS, Android
One code Web, iOS, Android
 
Test strategy for web development
Test strategy for web developmentTest strategy for web development
Test strategy for web development
 
Marcin Wasilczyk - Page objects with selenium
Marcin Wasilczyk - Page objects with seleniumMarcin Wasilczyk - Page objects with selenium
Marcin Wasilczyk - Page objects with selenium
 
Ditching jQuery Madison
Ditching jQuery MadisonDitching jQuery Madison
Ditching jQuery Madison
 

Mais de Alan Richardson

Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Alan Richardson
 
Automating to Augment Testing
Automating to Augment TestingAutomating to Augment Testing
Automating to Augment TestingAlan Richardson
 
Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Alan Richardson
 
Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020Alan Richardson
 
The Future of Testing Webinar
The Future of Testing WebinarThe Future of Testing Webinar
The Future of Testing WebinarAlan Richardson
 
Secrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slidesSecrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slidesAlan Richardson
 
Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604Alan Richardson
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonAlan Richardson
 
Programming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsProgramming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsAlan Richardson
 
Technology Based Testing
Technology Based TestingTechnology Based Testing
Technology Based TestingAlan Richardson
 
About Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAbout Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAlan Richardson
 
Automating and Testing a REST API
Automating and Testing a REST APIAutomating and Testing a REST API
Automating and Testing a REST APIAlan Richardson
 
Technical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameTechnical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameAlan Richardson
 
TDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzTDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzAlan Richardson
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to codeAlan Richardson
 
How To Test With Agility
How To Test With AgilityHow To Test With Agility
How To Test With AgilityAlan Richardson
 
Your Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be FlakyYour Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be FlakyAlan Richardson
 
What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.Alan Richardson
 

Mais de Alan Richardson (20)

Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021
 
Automating to Augment Testing
Automating to Augment TestingAutomating to Augment Testing
Automating to Augment Testing
 
Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009
 
Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020
 
The Future of Testing Webinar
The Future of Testing WebinarThe Future of Testing Webinar
The Future of Testing Webinar
 
Devfest 2019-slides
Devfest 2019-slidesDevfest 2019-slides
Devfest 2019-slides
 
Secrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slidesSecrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slides
 
Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan Richardson
 
Programming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsProgramming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStrings
 
Technology Based Testing
Technology Based TestingTechnology Based Testing
Technology Based Testing
 
About Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAbout Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil Tester
 
Shift left-testing
Shift left-testingShift left-testing
Shift left-testing
 
Automating and Testing a REST API
Automating and Testing a REST APIAutomating and Testing a REST API
Automating and Testing a REST API
 
Technical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameTechnical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" Game
 
TDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzTDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzz
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to code
 
How To Test With Agility
How To Test With AgilityHow To Test With Agility
How To Test With Agility
 
Your Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be FlakyYour Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be Flaky
 
What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.
 

Último

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Último (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Automation Abstraction Layers: Page Objects and Beyond

  • 1. 1 Automation Abstractions: Page Objects and Beyond Alan Richardson @eviltester https://xp-dev.com/svn/AutomationAbstractions www.SeleniumSimplified.com www.EvilTester.com www.CompendiumDev.co.uk www.JavaForTesters.com
  • 2. 2 What is Abstraction? ● Modelling ● Separation of concerns ● Logical vs Physical ● Functional vs Structural ● Interfaces vs Implementations ● Data / Entities / Persistence ● Functionality / Task Flow ● Goals / Strategies ● Layers – GUI, DB, HTTP ● Etc.
  • 3. “I must create a system. or be enslav'd by another Mans; I will not reason & compare: my business is to create” William Blake, 1820 Jerusalem: The Emanation of the Giant Albion 3 http://www.blakearchive.org/exist/blake/archive/object.xq?objectid=jerusalem.e.illbk.10&java=no
  • 4. https://xp-dev.com/svn/AutomationAbstractions 4 Example Test Without Abstraction @Before public void startDriver(){ @Test public void canCreateAToDoWithNoAbstraction(){ driver.get("http://todomvc.com/architecture-examples/backbone/"); int originalNumberOfTodos = driver.findElements( By.cssSelector("ul#todo-list li")).size(); WebElement createTodo = driver.findElement(By.id("new-todo")); createTodo.click(); createTodo.sendKeys("new task"); createTodo.sendKeys(Keys.ENTER); assertThat(driver.findElement( By.id("filters")).isDisplayed(), is(true)); int newToDos = driver.findElements( By.cssSelector("ul#todo-list li")).size(); assertThat(newToDos, greaterThan(originalNumberOfTodos)); } driver = new FirefoxDriver(); } @After public void stopDriver(){ driver.close(); driver.quit(); } NoAbstractionTest.java
  • 5. But this does use some abstraction layers LLooccaattoorr A Abbssttrraaccttioionns WebElement Generic Element Abstraction 5 Example Test Without Abstraction @Before public void startDriver(){ WebDriver Generic Browser Abstraction @Test public void canCreateAToDoWithNoAbstraction(){ Firefox Browser Abstraction driver.get("http://todomvc.com/architecture-examples/backbone/"); int originalNumberOfTodos = driver.findElements( By.cssSelector("ul#todo-list li")).size(); WebElement createTodo = driver.findElement(By.id("new-todo")); createTodo.click(); createTodo.sendKeys("new task"); createTodo.sendKeys(Keys.ENTER); assertThat(driver.findElement( By.id("filters")).isDisplayed(), is(true)); int newToDos = driver.findElements( Manipulation Abstractions By.cssSelector("ul#todo-list li")).size(); assertThat(newToDos, greaterThan(originalNumberOfTodos)); } driver = new FirefoxDriver(); } @After public void stopDriver(){ driver.close(); driver.quit(); } NoAbstractionTest.java
  • 6. 6 WebDriver provides abstractions ● Browser ● DOM ● Web Element Tool vendors gain value from generic abstractions. You gain value from 'domain' abstractions.
  • 7. 7 Example Test With Abstraction @Before public void startDriver(){ @Test public void canCreateAToDoWithAbstraction(){ TodoMVCUser user = new TodoMVCUser(driver, new TodoMVCSite()); user.opensApplication().and().createNewToDo("new task"); ApplicationPageFunctional page = new ApplicationPageFunctional(driver, new TodoMVCSite()); assertThat(page.getCountOfTodoDoItems(), is(1)); assertThat(page.isFooterVisible(), is(true)); } driver = new FirefoxDriver(); } @After public void stopDriver(){ driver.close(); driver.quit(); } NoAbstractionTest.java
  • 8. 8 Why Abstraction? ● Change implementations ● Single Responsibility – only changes when necessary ● Makes automation readable and maintainable ● We can unit test some of our test code ● etc. https://xp-dev.com/svn/AutomationAbstractions
  • 9. 9 Some Abstraction Layer Categories 1) Data – Generic Data Abstractions e.g. email, postcode 2) Physical – Physical layout of your application e.g. pages, components – Navigation across pages 3) Domain – Your application Entities domain e.g. user, account 4) Logical – User actions, workflows
  • 10. 10 Common Automation Abstractions ● Page Objects: pages, components, widgets ● Dom Element Abstractions: select, textbox, etc. ● Domain Objects: user, account, order ● Gherkin (Given/When/And/Then) ● Domain Specific Languages: code, keywords ● ... https://xp-dev.com/svn/AutomationAbstractions
  • 11. 11 Abstraction != Implementation ● Abstraction != Tool / Framework / Implementation ● Gherkin != Cucumber ● Page Object != Page Factory / Slow Loadable ● DSL != Keyword Driven If we want to get good at abstraction then we need to model, split apart, make the relationships clear, and be aware of our options.
  • 12. 12 Page Objects ● The most obvious automation abstraction ● What is it? – A page? A Component? ● Do web applications still have pages?
  • 13. A Page Object that abstracts a Page 13 ● Often has methods for – Opening the page – Accessing elements – Doing stuff, and navigating as a side-effect – Logical high level functionality e.g. login – Low level physical functionality e.g. typeUsername, clickLoginButton Should a Page Object be responsible for all of this?
  • 14. 14 Page Object Design Decisions ● What methods does it have? – Functional ● login(username, password), ● loginAs(user) – Structural ● enterName(username), enterPassword(password), clickLogin(), submitLoginForm(username, password) ● Does it expose elements or not? – public WebElement loginButton; – public WebElement getLoginButton(); – public clickLoginButton();
  • 15. 15 Page Object Functionality Approaches ● Expose WebElements Directly – Leads to WebElement Abstractions – public TextField userNameField; ● Hide WebElements behind physical functional methods e.g. typeUserName("bob"); ● Logical helper methods e.g. loginAs(name,pass) ● Layers of Page Objects – Physical – Logical
  • 16. 16 Navigation Design Decisions ● Does a Page Object return other pages? public IssueListPage submit(){ driver.findElement(By.id(“submit”)).click(); return new IssueListPage(driver); } ● Or Navigate implicitly after interactions ● Or have navigation objects
  • 17. 17 Implicit or Explicit Wait? ● Implicit Wait driver.manage().timeouts(). implicitlyWait(15L, TimeUnit.SECONDS); assertThat(driver.findElement( By.id("filters")).isDisplayed() , is(true)); ● Explicit Wait driver.manage().timeouts(). implicitlyWait(0L, TimeUnit.SECONDS); WebDriverWait wait = new WebDriverWait(driver,15); wait.until(ExpectedConditions.elementToBeClickable (By.id("filters"))); Example: 'NoAbstractionTest.java'
  • 18. 18 Implementing Page Objects ● POJO – Plain object, driver in constructor, methods use driver.<method> ● Page Factory – Annotated elements, lazy instantiation via reflection ● LoadableComponent – Common interface (load, isLoaded), isLoaded throws Error ● SlowLoadableComponent – Common interface, waits for on isLoaded ● Other approaches?
  • 19. 19 Example Implementations https://xp-dev.com/svn/AutomationAbstractions
  • 20. 20 POJO ● 'ApplicationPage.java' – Used in 'SequentialCreationOfTest.java' – Not much refactoring in the example ● Simple Class ● WebDriver passed to constructor ● Composition of any components ● e.g. – com.seleniumsimplified.todomvc.page.pojo – 'ApplicationPage.java' ● Not much refactoring in the example
  • 22. 22 Functional vs Structural ● Functional – loginAs(username, password) ● Structural – enterUsername – enterPassword – clickLoginButton – submitLoginForm(username, password)
  • 23. 23 Functional Vs Structural Example ● One way of answering “what methods to put on a page object” – Is it functional / behavioural? – Is it structural / Physical? ● Functional 'uses' Structural implementation ● Why? – Sometimes it is just a naming difference – Handling exceptions in functional but not structural – Higher level methods in Functional – Different concepts e.g. deleteLastItem
  • 24. 24 Page Factory ● Annotate fields with @FindBy ● Instantiate in constructor using PageFactory.initElements – Can create your own page factory initialiser ● Avoids boilerplate accessor methods ● Fast to create Page Objects ● Might become harder to expand and maintain
  • 25. 25 Page Factory Example @FindBy(how = How.CSS, using="#todo-count strong") private WebElement countElementStrong; @FindBy(how = How.CSS, using="#todo-count") private WebElement countElement; @FindBy(how = How.CSS, using="#filters li a") List<WebElement> filters; @FindBy(how = How.ID, using="clear-completed") List<WebElement> clearCompletedAsList; @FindBy(how = How.ID, using="clear-completed") WebElement clearCompletedButton; public ApplicationPageStructuralFactory(WebDriver driver, TodoMVCSite todoMVCSite) { PageFactory.initElements(driver, this); this.driver = driver; ...
  • 26. 26 SlowLoadableComponent ● Some pages and components need synchronisation to wait till they are ready – One approach – SlowLoadableComponent adds responsibility for waiting, to the page ● extend SlowLoadableComponent ● Standard interface for synchronisation on load – get() ● If isLoaded then return this Else load ● While not loaded{ wait for 200 millseconds} – Implement load and isLoaded
  • 27. 27 Fluent Page Objects todoMVC = new ApplicationPageFunctionalFluent( driver, todoMVCSite); todoMVC.get(); todoMVC.enterNewToDo("First Completed Item"). and(). toggleCompletionOfLastItem(). then(). enterNewToDo("Still to do this"). and(). enterNewToDo("Still to do this too"). then(). filterOnCompleted();
  • 28. 28 Fluent Page Objects ● Methods return the page object or other objects instead of void – void clickDeleteButton(); – PageObject clickDeleteButton(); ● Syntactic sugar methods: – and(), then(), also() ● Can work well at high levels of abstraction and when no navigation involved ● Train Wreck?
  • 29. Navigation Options 29 ● Direct in Test: page.get(); page.waitFor(); ● Instantiate new pages based on test flow – Navigation as side-effect, may have to bypass 'get' – Loadable pages, non-loadable, support classes ● Page Object methods might return other Pages – e.g. a method on the login page might be ● MyAccountPage clickLogin(); ● We might use navigation objects – direct, Jump.to(MyAccountPage.class) – path based (current page → desired page) ● Navigate.to(MyAccountPage.class)
  • 30. 30 Possible Domain Abstractions ● Logical Objects – ToDo – ToDoList ● Physical Objects – LocallyStoredToDo ● Actors – User ● Environment – Site – Implementation
  • 31. 31 Page Objects & Domain Objects ● Instead of – todoMVC.enterNewToDo(“New Item”) ● We could have have – ToDoItem newItem = new ToDoItem(“New Item”); – todoMVC.enterNewToDo(newItem); ● See code in DomainBasedTest
  • 32. 32 Domain Objects That Span Logical & Physical e.g. User ● user.createNewToDo(“new item”) ● user.createNewToDo(newItem) ● See use in NoAbstractionTest
  • 33. 33 Sometimes it is possible to over think this stuff ● Don't let thinking about this slow you down ● Conduct experiments ● Refactor ● Rethink if – you are maintaining too much – your abstraction layer stops you doing stuff – you are 'working around' your abstraction layers
  • 35. 35 Element Abstraction Example public interface Checkbox { public boolean isChecked(); public Checkbox check(); public Checkbox uncheck(); public Checkbox toggle(); } ● Would you include 'toggle'? https://xp-dev.com/svn/AutomationAbstractions
  • 36. 36 Element Abstractions ● Existing support classes: Select, ● Possible: TextBox, Checkbox, TextBox, File etc. ● Can enforce Semantics – Checkbox: isChecked, check(), uncheck(), toggle() – TextBox: clear(), enterText() – etc. ● Pass back from Page Objects into test?
  • 37. Element Abstraction Pros and Cons 37 ● May have to create a custom page factory ● Can help 'restrict' code i.e. check or uncheck, rather than click, enforces 'semantics' ● If you create them... – allow return WebElement ● so that I can go beyond the abstraction layer if I need to. Not required if it is just a WebElement wrapper. https://xp-dev.com/svn/AutomationAbstractions
  • 38. 38 Component Abstractions ● Shared Components/Widgets on the page ● e.g. – VisibleToDoEntry, VisibleToDoList – Filters, Footer, Header, etc. ● Could have 'functional' representation for repeated items e.g. login forms ● Could have 'structural' representation ● Likely use : page object composition
  • 39. 39 Component Abstraction Example TodoEntry todo = page.getToDoEntryAt(lastItemPosition); todo.markCompleted(); Instead of page.markTodoCompleted(lastItemPosition);
  • 40. 40 Gherkin as an abstraction layer Feature: We can create and edit To Do lists in ToDoMvc We want to amend todos in ToDoMVC because that is the set of exercises on the abstraction tutorial Scenario: Create a ToDo Item Given a user opens a blank ToDoMVC page When the user creates a todo "new task" Then they see 1 todo item on the page ● Implement steps using highest appropriate abstraction layer ● CucumberJVM as 'DSL implementor' ● 'Expressibility' vs 'Step Re-use' ● See todomvc.feature and ToDoMvcSteps
  • 41. 41 My modeling biases ● Driver – Inject so instantiate any page or component as required/desired at any time ● Explicit Synchronisation – To make sure that the desired object is available and ready for use (as defined by synchronisation) ● Navigation – Implicit (via taking action e.g. click) – Explicit Navigation Object, not in page object ● Open/jump (via driver.get) ● To (state model from current, to desired)
  • 42. 42 My modeling biases ● Page Objects – Physical ● abstract the 'real world' – Components ● For common features on the page – Logical ● abstract the functionality ● Sometimes these are entity methods not page objects – e.g. user.registers().and().logsin() ● I tend not to.... – abstract WebElements
  • 43. 43 My modeling biases ● I tend not to.... – abstract WebElements – Use inheritence to create a model of the app ● e.g. MyAppPage extends GenericAppPage – Use 3rd party abstractions on top of WebDriver
  • 44. 44 Are there rights and wrongs? ● Right / Wrong? ● Decisions? ● Project/Team/Organisation Standards? Identify your own biases - Experiment Recognise your decisions
  • 45. 45 Decisions ● The 'limits' and overlap of Abstraction Layers ● Build it now, or 'refactor to' later ● How much change is anticipated? – To which layer? GUI, Business domain, Workflow? ● Who is working with the automation code? – Skill levels? Support needed? ● How/When with the automation execute?
  • 46. 46 Other Useful Links ● Jeff “Cheezy” Morgan – page-object ruby gem, data_magic gem and stareast code – https://github.com/cheezy?tab=repositories ● Marcus Merrell – Self-Generating Test Artifacts for Selenium/WebDriver – https://www.youtube.com/watch?v=mSCFsUOgPpw ● Anand Ramdeo – One Step at a Time – https://www.youtube.com/watch?v=dFPgzH_XP1I https://xp-dev.com/svn/AutomationAbstractions
  • 47. 47 Homework ● Using the code at https://xp-dev.com/svn/AutomationAbstractions/ – Compare the different implementations under 'main' ● com.seleniumsimplified.todomvc.page – Investigate how the Page Objects delegate to each other, and the Domain Objects use Page Objects – Examine the 'test' usage of the Page Objects and Domain Objects – Examine the different navigation approaches
  • 48. 48 Blogs and Websites ● CompendiumDev.co.uk ● SeleniumSimplified.com ● EvilTester.com ● JavaForTesters.com ● Twitter: @eviltester Online Training Courses ● Technical Web Testing 101 Unow.be/at/techwebtest101 ● Intro to Selenium Unow.be/at/startwebdriver ● Selenium 2 WebDriver API Unow.be/at/webdriverapi Videos youtube.com/user/EviltesterVideos Books Selenium Simplified Unow.be/rc/selsimp Java For Testers leanpub.com/javaForTesters Alan Richardson uk.linkedin.com/in/eviltester Independent Test Consultant & Custom Training Contact Alan http://compendiumdev.co.uk/contact