SlideShare a Scribd company logo
My Test Automation Journey
2015 Vera Djakova & Vaidas Pilkauskas
Agenda
● How to make a big mess
● And then clean the campground
● Using Driver Pattern
My experience
New Life
Let’s start!
● Dream team
● Dream tools
○ Selenium
○ Java
○ Maven
Even
requirement
to use IE is
OK
So I have started!
After three months...
//Add new document, click button "New"
click (//button[contains(@value, 'New')]);
Thread.sleep(2000);
//Check new form
shouldHaveText("New document");
//Click button "Add" and check errors
click("//button[contains(@value, 'Add')]");
Thread.sleep(1000);
shouldHaveText(labelFromProperties("document.properties", "document.message.document-name-empty"));
//Type document name, select type, add activation date
insert("//input[contains(@name, 'name')]", "doc_1");
selectById("//select[contains(@name, 'type')]", 1);
insert("//input[contains(@name, 'start-date')]", "2015-10-15");
//Click button "Add"
click("//button[contains(@value, 'Add')]");
//Check new document
Thread.sleep(5000);
shouldHaveText(labelFromProperties("document.properties", "document.message.successfully-add"));
shouldHaveText("doc_1");
Complicated test logic
xpath
// Click button "Yes"
click(".//body/table/dir/dir[6]/button[2]");
Technical debt
Manual dependencies
Help me
• Static analysis (Sonar) -> refactoring
• sleep -> wait
Help me vol2
• Project build structure
• Page Object
Driver pattern in tests
Testing REST APIs
What is an API?
{
“item”: “flower”
}
{
“status”: “accepted”
}
@Test shouldRetrieveUserByLogin() {
String userJson = "{"username": "vaidas"}";
HttpRequest post = new Post("https://localhost:8080/users", userJson);
HttpResponse postResp = HttpClient().execute(post);
assertThat(postResp.status, is(200));
HttpRequest get = new Get("https://localhost:8080/users/vaidas");
HttpResponse getResp = HttpClient().execute(get);
User user = mapper.readValue(getResp, User.class);
assertThat(username, is("vaidas"));
}
Few problems with such test
● Business requirements are mixed
within implementation
● URLs are hardcoded
● Payload format is hardcoded
● Test exposes use of HTTP protocol
Improved version
@Test shouldRetrieveUserByUsername() {
givenUserExists("vaidas");
GetUserResponse getResp = usersDriver.aGetUserRequest()
.withUsername("vaidas").execute();
assertThat(getResp, allOf(hasStatus(OK), hasUsername("vaidas")));
}
Driver pattern
● Abstracts implementation from business logic
● Removes duplication
● Test specification becomes reusable
So, what if there’s a need to...
● Add another protocol (http + https)
● Another input format
● Test with different configuration
● Customize for different clients
InternetBankApiTest extends BankApiTest
with InternetBankDriver
with InternetBankApiMatchers
AtmApiTest extends BankApiTest
with AtmDriver
with AtmMatchers
Depending on your programming language:
● Use inheritance or composition
● Java 8 has default method in interfaces
● Consider using another language - JavaScript, Groovy,
Scala, etc
What if there is difference
between two implementations?
● Override tests by extending the contract class
● Use class hierarchy to group tests into
reusable test suites
Page Object pattern
● Is a variant of Driver pattern
● Selenium best practice
● encapsulates selector logic
● Solves the same problem as using drivers with
API testing
● Does not have to be per page, but per
component
Test patterns summary
● Use Driver Pattern for Microservice/API
● Use Page Object for graphical interface
Lessons learnt
• Testers should not work separately from
programmers
• Quality matters
• Allocate time to maintain tests
• Or later it will cost €
Summary
● Do more pairing
● Treat automation as a craft
● Regular feedback is a must
Thanks!
Q&A

More Related Content

What's hot

Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011
Adam Christian
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJS
Peter Drinnan
 
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JSUnit-testing and E2E testing in JS
Unit-testing and E2E testing in JS
Michael Haberman
 
Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015
Iakiv Kramarenko
 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular Slides
Jim Lynch
 
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
SQALab
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and Beyond
Alan Richardson
 
Testing React Applications
Testing React ApplicationsTesting React Applications
Testing React Applications
stbaechler
 
Automation testing with Drupal 8
Automation testing with Drupal 8Automation testing with Drupal 8
Automation testing with Drupal 8
nagpalprachi
 
Page object pattern
Page object patternPage object pattern
Page object pattern
Petro Konopelko
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
Applitools
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
Ludmila Nesvitiy
 
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
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
Zoe Gilbert
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]
Iakiv Kramarenko
 
Jest: Frontend Testing leicht gemacht @EnterJS2018
Jest: Frontend Testing leicht gemacht @EnterJS2018Jest: Frontend Testing leicht gemacht @EnterJS2018
Jest: Frontend Testing leicht gemacht @EnterJS2018
Holger Grosse-Plankermann
 
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and SprayNexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Matthew Farwell
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
JWORKS powered by Ordina
 
Selenium withnet
Selenium withnetSelenium withnet
Selenium withnetVlad Maniak
 
Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)
Dignitas Digital Pvt. Ltd.
 

What's hot (20)

Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJS
 
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JSUnit-testing and E2E testing in JS
Unit-testing and E2E testing in JS
 
Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015
 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular Slides
 
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
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and Beyond
 
Testing React Applications
Testing React ApplicationsTesting React Applications
Testing React Applications
 
Automation testing with Drupal 8
Automation testing with Drupal 8Automation testing with Drupal 8
Automation testing with Drupal 8
 
Page object pattern
Page object patternPage object pattern
Page object pattern
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
 
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...
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]
 
Jest: Frontend Testing leicht gemacht @EnterJS2018
Jest: Frontend Testing leicht gemacht @EnterJS2018Jest: Frontend Testing leicht gemacht @EnterJS2018
Jest: Frontend Testing leicht gemacht @EnterJS2018
 
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and SprayNexthink Library - replacing a ruby on rails application with Scala and Spray
Nexthink Library - replacing a ruby on rails application with Scala and Spray
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
Selenium withnet
Selenium withnetSelenium withnet
Selenium withnet
 
Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)
 

Similar to My Test Automation Journey

Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
SpiritsoftsTraining
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
SpiritsoftsTraining
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
SpiritsoftsTraining
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
SpiritsoftsTraining
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
SpiritsoftsTraining
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
Sai Krishna
 
Integrating Selenium testing infrastructure into Scala Project
Integrating Selenium testing infrastructure into Scala ProjectIntegrating Selenium testing infrastructure into Scala Project
Integrating Selenium testing infrastructure into Scala Project
Knoldus Inc.
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
Sam Becker
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie
hcderaad
 
Strategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source FrameworksStrategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source Frameworks
Dimitry Polivaev
 
Testing Tools Online Training.pdf
Testing Tools Online Training.pdfTesting Tools Online Training.pdf
Testing Tools Online Training.pdf
SpiritsoftsTraining
 
Unit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSUnit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJS
Knoldus Inc.
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
Ganuka Yashantha
 
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
Ortus Solutions, Corp
 
Frontend training
Frontend trainingFrontend training
Frontend training
Adrian Caetano
 
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API
Gavin Pickin
 
3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API - 3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API -
Ortus Solutions, Corp
 
Test automation - Building effective solutions
Test automation - Building effective solutionsTest automation - Building effective solutions
Test automation - Building effective solutions
Artem Nagornyi
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Ortus Solutions, Corp
 

Similar to My Test Automation Journey (20)

Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Integrating Selenium testing infrastructure into Scala Project
Integrating Selenium testing infrastructure into Scala ProjectIntegrating Selenium testing infrastructure into Scala Project
Integrating Selenium testing infrastructure into Scala Project
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie
 
Strategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source FrameworksStrategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source Frameworks
 
Testing Tools Online Training.pdf
Testing Tools Online Training.pdfTesting Tools Online Training.pdf
Testing Tools Online Training.pdf
 
Unit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSUnit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJS
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
 
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
 
Frontend training
Frontend trainingFrontend training
Frontend training
 
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API
 
3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API - 3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API -
 
Test automation - Building effective solutions
Test automation - Building effective solutionsTest automation - Building effective solutions
Test automation - Building effective solutions
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
 

More from Vaidas Pilkauskas

Hiring Backend Engineers
Hiring Backend EngineersHiring Backend Engineers
Hiring Backend Engineers
Vaidas Pilkauskas
 
Understanding Mocks
Understanding MocksUnderstanding Mocks
Understanding Mocks
Vaidas Pilkauskas
 
Coderetreat introduction
Coderetreat introductionCoderetreat introduction
Coderetreat introduction
Vaidas Pilkauskas
 
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Vaidas Pilkauskas
 
Can you trust your tests?
Can you trust your tests?Can you trust your tests?
Can you trust your tests?
Vaidas Pilkauskas
 
Developer Tests - Things to Know
Developer Tests - Things to KnowDeveloper Tests - Things to Know
Developer Tests - Things to Know
Vaidas Pilkauskas
 

More from Vaidas Pilkauskas (6)

Hiring Backend Engineers
Hiring Backend EngineersHiring Backend Engineers
Hiring Backend Engineers
 
Understanding Mocks
Understanding MocksUnderstanding Mocks
Understanding Mocks
 
Coderetreat introduction
Coderetreat introductionCoderetreat introduction
Coderetreat introduction
 
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
 
Can you trust your tests?
Can you trust your tests?Can you trust your tests?
Can you trust your tests?
 
Developer Tests - Things to Know
Developer Tests - Things to KnowDeveloper Tests - Things to Know
Developer Tests - Things to Know
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

My Test Automation Journey

  • 1. My Test Automation Journey 2015 Vera Djakova & Vaidas Pilkauskas
  • 2. Agenda ● How to make a big mess ● And then clean the campground ● Using Driver Pattern
  • 5. Let’s start! ● Dream team ● Dream tools ○ Selenium ○ Java ○ Maven
  • 7. So I have started!
  • 9. //Add new document, click button "New" click (//button[contains(@value, 'New')]); Thread.sleep(2000); //Check new form shouldHaveText("New document"); //Click button "Add" and check errors click("//button[contains(@value, 'Add')]"); Thread.sleep(1000); shouldHaveText(labelFromProperties("document.properties", "document.message.document-name-empty")); //Type document name, select type, add activation date insert("//input[contains(@name, 'name')]", "doc_1"); selectById("//select[contains(@name, 'type')]", 1); insert("//input[contains(@name, 'start-date')]", "2015-10-15"); //Click button "Add" click("//button[contains(@value, 'Add')]"); //Check new document Thread.sleep(5000); shouldHaveText(labelFromProperties("document.properties", "document.message.successfully-add")); shouldHaveText("doc_1");
  • 11. xpath // Click button "Yes" click(".//body/table/dir/dir[6]/button[2]");
  • 14. Help me • Static analysis (Sonar) -> refactoring • sleep -> wait
  • 15. Help me vol2 • Project build structure • Page Object
  • 16.
  • 19. What is an API?
  • 21. @Test shouldRetrieveUserByLogin() { String userJson = "{"username": "vaidas"}"; HttpRequest post = new Post("https://localhost:8080/users", userJson); HttpResponse postResp = HttpClient().execute(post); assertThat(postResp.status, is(200)); HttpRequest get = new Get("https://localhost:8080/users/vaidas"); HttpResponse getResp = HttpClient().execute(get); User user = mapper.readValue(getResp, User.class); assertThat(username, is("vaidas")); }
  • 22. Few problems with such test ● Business requirements are mixed within implementation ● URLs are hardcoded ● Payload format is hardcoded ● Test exposes use of HTTP protocol
  • 23. Improved version @Test shouldRetrieveUserByUsername() { givenUserExists("vaidas"); GetUserResponse getResp = usersDriver.aGetUserRequest() .withUsername("vaidas").execute(); assertThat(getResp, allOf(hasStatus(OK), hasUsername("vaidas"))); }
  • 24. Driver pattern ● Abstracts implementation from business logic ● Removes duplication ● Test specification becomes reusable
  • 25. So, what if there’s a need to... ● Add another protocol (http + https) ● Another input format ● Test with different configuration ● Customize for different clients
  • 26. InternetBankApiTest extends BankApiTest with InternetBankDriver with InternetBankApiMatchers AtmApiTest extends BankApiTest with AtmDriver with AtmMatchers Depending on your programming language: ● Use inheritance or composition ● Java 8 has default method in interfaces ● Consider using another language - JavaScript, Groovy, Scala, etc
  • 27. What if there is difference between two implementations? ● Override tests by extending the contract class ● Use class hierarchy to group tests into reusable test suites
  • 28. Page Object pattern ● Is a variant of Driver pattern ● Selenium best practice ● encapsulates selector logic ● Solves the same problem as using drivers with API testing ● Does not have to be per page, but per component
  • 29. Test patterns summary ● Use Driver Pattern for Microservice/API ● Use Page Object for graphical interface
  • 30.
  • 31. Lessons learnt • Testers should not work separately from programmers • Quality matters • Allocate time to maintain tests • Or later it will cost €
  • 32. Summary ● Do more pairing ● Treat automation as a craft ● Regular feedback is a must