SlideShare a Scribd company logo
A U T O M AT E D T E S T I N G
O F W E B A P P S
+Jonatan Kronqvist @zch
}>
A G E N D A
• Software testing in general
• Architecting for testability
• Testing web UIs
• What should I do?
A G E N D A
• Software testing in general
• Architecting for testability
• Testing web UIs
• What should I do?
Unit Testing
Integration Testing
System Testing
Regression Testing
End-to-End Testing
Acceptance Testing
Load Testing
Create VALUE for Your Customers
– J O H N D O E V E L O P E R
“Unit testing is a waste of time, because the tests
don't prove that things work correctly”
Red
Green
Refactor
1. You will ALWAYS have code that worked a minute ago
2. You will have more and more automatic tests that can be
run all the time
3. You will have usage examples for all of your code and API
4. All your code will be testable by default
Best ROI:
• integration
• regression
• system
Most unit tests could be
replaced by assertions
Focus on continuous integration
and system testing
B E H AV I O R D R I V E N D E V E L O P M E N T
Scenario 1: Account has sufficient funds
Given the account balance is $100
And the card is valid
And the machine contains enough money
When the Account Holder requests $20
Then the ATM should dispense $20
And the account balance should be $80
And the card should be returned
1. Easy to define end-to-end behavior to be tested
2. Business value easily translates to this format
3. You're probably already defining user stories
A G E N D A
• Software testing in general
• Architecting for testability
• Testing web UIs
• What should I do?
• Cross browser differences
• Logic that depends on the DOM
• Asynchronous execution
• Possibly slow execution
M V P
Presenter
Model
(State)
View
Rendering
logic
Event
handling
logic
Avoid new – Dependency Injection
A G E N D A
• Software testing in general
• Architecting for testability
• Testing web UIs
• What should I do?
Unit Testing?
Integration Testing?
System Testing?
End-to-end Testing?
Web automation
BDD framework + Selenium or Vaadin
TestBench
Narrative:

As a user

I want to perform calculations

So that I can easily get the results without
calculating in my head



Scenario: Calculate 1+2

Given I have the calculator open

When I push 1+2

Then the result should be 3.0
public class CalculatorSteps extends TestBenchTestCase {



private WebDriver driver;

private CalculatorPageObject calculator;



@BeforeScenario

public void setUpWebDriver() {

driver = TestBench.createDriver(new FirefoxDriver());

calculator = PageFactory.initElements(driver,
CalculatorPageObject.class);

}
@AfterScenario

public void tearDownWebDriver() {

driver.quit();

}
@Given("I have the calculator open")

public void theCalculatorIsOpen() {

calculator.open();

}



@When("I push $buttons")

public void enter(String buttons) {

calculator.enter(buttons);

}



@Then("the result should be $result")

public void assertResult(String result) {

assertEquals(result, calculator.getResult());

}

}
public class SimpleCalculation extends JUnitStory {

@Override

public Configuration configuration() {

return new MostUsefulConfiguration()

.useStoryLoader(new LoadFromClasspath(this.getClass()))

.useStoryReporterBuilder(new StoryReporterBuilder()
.withDefaultFormats()
.withFormats(Format.CONSOLE, Format.TXT));

}



@Override

public InjectableStepsFactory stepsFactory() {

return new InstanceStepsFactory(configuration(),
new CalculatorSteps());

}

}
}>
>2500 tests
<15 minutes
each commit
Load Testing
A G E N D A
• Software testing in general
• Architecting for testability
• Testing web UIs
• What should I do?
WHAT SHOULD I DO?
Architect for testability and flexibility
Focus on Integration, End-to-end and System
Tests
Try TDD, but don't sweat it
Use BDD
Don't forget to load test!
ENSURE VALUE IS CREATED
FOR YOUR CUSTOMERS
Q & A
Please rate the presentation at
gwtcreate.com/agenda
I M A G E S U S E D
• https://flic.kr/p/671Z4A
• https://flic.kr/p/bsozXc
• https://flic.kr/p/hRfBC
• https://flic.kr/p/nQ7ac5
• https://flic.kr/p/8sf5Xt
• https://flic.kr/p/4LH5Eo
• https://flic.kr/p/7Lx9Kk
• https://flic.kr/p/nAi4GZ
• https://flic.kr/p/eguHX8
• https://flic.kr/p/4fmu9E
• https://flic.kr/p/dtSHid
• https://flic.kr/p/bwpVQ7
• https://flic.kr/p/fGyo6Q

More Related Content

What's hot

Visual Studio 2010 Testing for Developers
Visual Studio 2010 Testing for DevelopersVisual Studio 2010 Testing for Developers
Visual Studio 2010 Testing for Developers
Steve Lange
 
Manual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web AppsManual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web Apps
SmartBear
 
Writing better tests for your java script app
Writing better tests for your java script appWriting better tests for your java script app
Writing better tests for your java script app
JakeGinnivan
 
Getting Started With Selenium
Getting Started With SeleniumGetting Started With Selenium
Getting Started With Selenium
SmartBear
 
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and DeliveryUsg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
Stephen Garrett
 
Test Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for AgileTest Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for Agile
SmartBear
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
drluckyspin
 
QA Strategies for Testing Legacy Web Apps
QA Strategies for Testing Legacy Web AppsQA Strategies for Testing Legacy Web Apps
QA Strategies for Testing Legacy Web Apps
Rainforest QA
 
Using Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development TeamUsing Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development Team
Rainforest QA
 
Sustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanSustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey Shannahan
QA or the Highway
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
ZendCon
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
Sargis Sargsyan
 
How to write better tests with Test Driven Development
How to write better tests with Test Driven DevelopmentHow to write better tests with Test Driven Development
How to write better tests with Test Driven Development
Alex Hoffman
 
Perl testing 101
Perl testing 101Perl testing 101
Perl testing 101
Craig Treptow
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
Kim Herzig
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh Dahal
QA or the Highway
 
5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing
Bhupesh Dahal
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online training
Divya Shree
 
ATAGTR2017 The way to recover the issue faced in IoT regression Testing
ATAGTR2017 The way to recover the issue faced in IoT regression TestingATAGTR2017 The way to recover the issue faced in IoT regression Testing
ATAGTR2017 The way to recover the issue faced in IoT regression Testing
Agile Testing Alliance
 
Software engineering
Software engineeringSoftware engineering
Software engineeringbartlowe
 

What's hot (20)

Visual Studio 2010 Testing for Developers
Visual Studio 2010 Testing for DevelopersVisual Studio 2010 Testing for Developers
Visual Studio 2010 Testing for Developers
 
Manual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web AppsManual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web Apps
 
Writing better tests for your java script app
Writing better tests for your java script appWriting better tests for your java script app
Writing better tests for your java script app
 
Getting Started With Selenium
Getting Started With SeleniumGetting Started With Selenium
Getting Started With Selenium
 
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and DeliveryUsg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
 
Test Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for AgileTest Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for Agile
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
QA Strategies for Testing Legacy Web Apps
QA Strategies for Testing Legacy Web AppsQA Strategies for Testing Legacy Web Apps
QA Strategies for Testing Legacy Web Apps
 
Using Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development TeamUsing Crowdsourced Testing to Turbocharge your Development Team
Using Crowdsourced Testing to Turbocharge your Development Team
 
Sustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanSustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey Shannahan
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
How to write better tests with Test Driven Development
How to write better tests with Test Driven DevelopmentHow to write better tests with Test Driven Development
How to write better tests with Test Driven Development
 
Perl testing 101
Perl testing 101Perl testing 101
Perl testing 101
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh Dahal
 
5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online training
 
ATAGTR2017 The way to recover the issue faced in IoT regression Testing
ATAGTR2017 The way to recover the issue faced in IoT regression TestingATAGTR2017 The way to recover the issue faced in IoT regression Testing
ATAGTR2017 The way to recover the issue faced in IoT regression Testing
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 

Viewers also liked

Accelerated learning pathways print
Accelerated learning pathways printAccelerated learning pathways print
Accelerated learning pathways print
Planet2025 Network
 
R For Rabbit - All Product Broucher
R For Rabbit - All Product BroucherR For Rabbit - All Product Broucher
R For Rabbit - All Product Broucher
smit4shrikant
 
Marissa Menendez Major Project Paper 1-30-15
Marissa Menendez Major Project Paper 1-30-15Marissa Menendez Major Project Paper 1-30-15
Marissa Menendez Major Project Paper 1-30-15Marissa Menendez
 
Fighting affluenza epidemic in america
Fighting affluenza epidemic in americaFighting affluenza epidemic in america
Fighting affluenza epidemic in americadavisme314
 
«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»
«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»
«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»
Арина Стороженко
 
NYAPE-5 Steps to Create Sustainable Change
NYAPE-5 Steps to Create Sustainable ChangeNYAPE-5 Steps to Create Sustainable Change
NYAPE-5 Steps to Create Sustainable ChangeScott Neil, PhD
 
Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...
Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...
Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...
Ignacio Riesgo
 
Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...
Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...
Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...
Amit Kapoor
 
Aboriginal Law Update, May 2015
Aboriginal Law Update, May 2015Aboriginal Law Update, May 2015
Aboriginal Law Update, May 2015
Bruce McIvor
 
UK brands proximity marketing survey
UK brands proximity marketing surveyUK brands proximity marketing survey
UK brands proximity marketing surveyJeff Sheldon
 
Fighting affluenza epidemic in america
Fighting affluenza epidemic in americaFighting affluenza epidemic in america
Fighting affluenza epidemic in america
davisme314
 
Mem consultora habilitada-eia_dgaam
Mem   consultora habilitada-eia_dgaamMem   consultora habilitada-eia_dgaam
Mem consultora habilitada-eia_dgaam
JCesar Nap
 
A&GS Newsletter2007Final
A&GS Newsletter2007FinalA&GS Newsletter2007Final
A&GS Newsletter2007FinalStacy Smith
 
"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)
"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)
"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)
Olga Grytsenko
 
Internet como soporte a una nueva generación de disease management
Internet como soporte a una nueva generación de disease managementInternet como soporte a una nueva generación de disease management
Internet como soporte a una nueva generación de disease management
Ignacio Riesgo
 
Fast&food restaurant.finishodp
Fast&food restaurant.finishodpFast&food restaurant.finishodp
Fast&food restaurant.finishodpRafacmar
 
El seguro de salud de empresa
El seguro de salud de empresa El seguro de salud de empresa
El seguro de salud de empresa
Ignacio Riesgo
 
Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...
Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...
Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...
Ignacio Riesgo
 

Viewers also liked (19)

Accelerated learning pathways print
Accelerated learning pathways printAccelerated learning pathways print
Accelerated learning pathways print
 
R For Rabbit - All Product Broucher
R For Rabbit - All Product BroucherR For Rabbit - All Product Broucher
R For Rabbit - All Product Broucher
 
Marissa Menendez Major Project Paper 1-30-15
Marissa Menendez Major Project Paper 1-30-15Marissa Menendez Major Project Paper 1-30-15
Marissa Menendez Major Project Paper 1-30-15
 
Fighting affluenza epidemic in america
Fighting affluenza epidemic in americaFighting affluenza epidemic in america
Fighting affluenza epidemic in america
 
«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»
«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»
«Актуальність Батишевських ідей, щодо комп’ютеризації навчання»
 
NYAPE-5 Steps to Create Sustainable Change
NYAPE-5 Steps to Create Sustainable ChangeNYAPE-5 Steps to Create Sustainable Change
NYAPE-5 Steps to Create Sustainable Change
 
Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...
Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...
Los procesos de colaboración público/privada en sanidad en Europa: ¿una moda ...
 
Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...
Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...
Inking a Harmonious Career: Technical Writers who want to to enter, survive, ...
 
Aboriginal Law Update, May 2015
Aboriginal Law Update, May 2015Aboriginal Law Update, May 2015
Aboriginal Law Update, May 2015
 
UK brands proximity marketing survey
UK brands proximity marketing surveyUK brands proximity marketing survey
UK brands proximity marketing survey
 
Fighting affluenza epidemic in america
Fighting affluenza epidemic in americaFighting affluenza epidemic in america
Fighting affluenza epidemic in america
 
Mem consultora habilitada-eia_dgaam
Mem   consultora habilitada-eia_dgaamMem   consultora habilitada-eia_dgaam
Mem consultora habilitada-eia_dgaam
 
Lake tana finance initiative
Lake tana finance initiativeLake tana finance initiative
Lake tana finance initiative
 
A&GS Newsletter2007Final
A&GS Newsletter2007FinalA&GS Newsletter2007Final
A&GS Newsletter2007Final
 
"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)
"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)
"Эволюция бизнес-модели Prom.ua" Николай Жандоров (Prom.ua)
 
Internet como soporte a una nueva generación de disease management
Internet como soporte a una nueva generación de disease managementInternet como soporte a una nueva generación de disease management
Internet como soporte a una nueva generación de disease management
 
Fast&food restaurant.finishodp
Fast&food restaurant.finishodpFast&food restaurant.finishodp
Fast&food restaurant.finishodp
 
El seguro de salud de empresa
El seguro de salud de empresa El seguro de salud de empresa
El seguro de salud de empresa
 
Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...
Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...
Un nuevo salto para el sector sanitario: del diseño de procesos al BPM (Busin...
 

Similar to Automated Testing of Web Applications

Automation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra SolutionsAutomation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra Solutions
QUONTRASOLUTIONS
 
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Applitools
 
Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)
Andrey Oleynik
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
Stanislav Tiurikov
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
Automated Testing in DevOps
Automated Testing in DevOpsAutomated Testing in DevOps
Automated Testing in DevOps
Haufe-Lexware GmbH & Co KG
 
How to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOpsHow to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOps
Perfecto by Perforce
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
David Funaro
 
Slides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSlides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testing
SwapnilNarayan
 
Continuous integration, delivery & deployment
Continuous integration,  delivery & deploymentContinuous integration,  delivery & deployment
Continuous integration, delivery & deployment
Martijn van der Kamp
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
Amazon Web Services
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
Andreas Grabner
 
Dev ops presentation
Dev ops presentationDev ops presentation
Dev ops presentation
Ahmed Kamel
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
Mihai-Cristian Fratila
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
Matt Eland
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
Mahesh Salaria
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
Aleks Zinevych
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
Abhijeet Vaikar
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Jacinto Limjap
 

Similar to Automated Testing of Web Applications (20)

Automation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra SolutionsAutomation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra Solutions
 
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...Building a Complete Pipeline: The Essential Components of Continuous Testing ...
Building a Complete Pipeline: The Essential Components of Continuous Testing ...
 
Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
 
Automated Testing in DevOps
Automated Testing in DevOpsAutomated Testing in DevOps
Automated Testing in DevOps
 
How to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOpsHow to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOps
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
QAorHighway2016
QAorHighway2016QAorHighway2016
QAorHighway2016
 
Slides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSlides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testing
 
Continuous integration, delivery & deployment
Continuous integration,  delivery & deploymentContinuous integration,  delivery & deployment
Continuous integration, delivery & deployment
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
 
Dev ops presentation
Dev ops presentationDev ops presentation
Dev ops presentation
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
 

Recently uploaded

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 

Automated Testing of Web Applications

  • 1. A U T O M AT E D T E S T I N G O F W E B A P P S +Jonatan Kronqvist @zch
  • 2.
  • 3.
  • 4. }>
  • 5.
  • 6. A G E N D A • Software testing in general • Architecting for testability • Testing web UIs • What should I do?
  • 7. A G E N D A • Software testing in general • Architecting for testability • Testing web UIs • What should I do?
  • 8.
  • 16. Create VALUE for Your Customers
  • 17. – J O H N D O E V E L O P E R “Unit testing is a waste of time, because the tests don't prove that things work correctly”
  • 18.
  • 20. 1. You will ALWAYS have code that worked a minute ago 2. You will have more and more automatic tests that can be run all the time 3. You will have usage examples for all of your code and API 4. All your code will be testable by default
  • 21. Best ROI: • integration • regression • system
  • 22. Most unit tests could be replaced by assertions
  • 23. Focus on continuous integration and system testing
  • 24. B E H AV I O R D R I V E N D E V E L O P M E N T
  • 25. Scenario 1: Account has sufficient funds Given the account balance is $100 And the card is valid And the machine contains enough money When the Account Holder requests $20 Then the ATM should dispense $20 And the account balance should be $80 And the card should be returned
  • 26. 1. Easy to define end-to-end behavior to be tested 2. Business value easily translates to this format 3. You're probably already defining user stories
  • 27. A G E N D A • Software testing in general • Architecting for testability • Testing web UIs • What should I do?
  • 28.
  • 29. • Cross browser differences • Logic that depends on the DOM • Asynchronous execution • Possibly slow execution
  • 31. Avoid new – Dependency Injection
  • 32. A G E N D A • Software testing in general • Architecting for testability • Testing web UIs • What should I do?
  • 33.
  • 39. BDD framework + Selenium or Vaadin TestBench
  • 40.
  • 41. Narrative:
 As a user
 I want to perform calculations
 So that I can easily get the results without calculating in my head
 
 Scenario: Calculate 1+2
 Given I have the calculator open
 When I push 1+2
 Then the result should be 3.0
  • 42. public class CalculatorSteps extends TestBenchTestCase {
 
 private WebDriver driver;
 private CalculatorPageObject calculator;
 
 @BeforeScenario
 public void setUpWebDriver() {
 driver = TestBench.createDriver(new FirefoxDriver());
 calculator = PageFactory.initElements(driver, CalculatorPageObject.class);
 } @AfterScenario
 public void tearDownWebDriver() {
 driver.quit();
 }
  • 43. @Given("I have the calculator open")
 public void theCalculatorIsOpen() {
 calculator.open();
 }
 
 @When("I push $buttons")
 public void enter(String buttons) {
 calculator.enter(buttons);
 }
 
 @Then("the result should be $result")
 public void assertResult(String result) {
 assertEquals(result, calculator.getResult());
 }
 }
  • 44. public class SimpleCalculation extends JUnitStory {
 @Override
 public Configuration configuration() {
 return new MostUsefulConfiguration()
 .useStoryLoader(new LoadFromClasspath(this.getClass()))
 .useStoryReporterBuilder(new StoryReporterBuilder() .withDefaultFormats() .withFormats(Format.CONSOLE, Format.TXT));
 }
 
 @Override
 public InjectableStepsFactory stepsFactory() {
 return new InstanceStepsFactory(configuration(), new CalculatorSteps());
 }
 }
  • 45.
  • 48. A G E N D A • Software testing in general • Architecting for testability • Testing web UIs • What should I do?
  • 50. Architect for testability and flexibility
  • 51. Focus on Integration, End-to-end and System Tests
  • 52. Try TDD, but don't sweat it
  • 54. Don't forget to load test!
  • 55. ENSURE VALUE IS CREATED FOR YOUR CUSTOMERS
  • 56. Q & A Please rate the presentation at gwtcreate.com/agenda
  • 57. I M A G E S U S E D • https://flic.kr/p/671Z4A • https://flic.kr/p/bsozXc • https://flic.kr/p/hRfBC • https://flic.kr/p/nQ7ac5 • https://flic.kr/p/8sf5Xt • https://flic.kr/p/4LH5Eo • https://flic.kr/p/7Lx9Kk • https://flic.kr/p/nAi4GZ • https://flic.kr/p/eguHX8 • https://flic.kr/p/4fmu9E • https://flic.kr/p/dtSHid • https://flic.kr/p/bwpVQ7 • https://flic.kr/p/fGyo6Q