SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
ELIAS NOGUEIRA TATIANE NOGUEIRA
@eliasnogueira @tatianeaguirres
TATIANE NOGUEIRA
Consultant Developer @ Thoughtworks
@tatianeaguirres
linkedin.com/tatianeaguirres
ELIAS NOGUEIRA
Software Engineer in Test @ Sicredi
@eliasnogueira
linkedin.com/eliasnogueira
THE STACK
LANGUAGE TESTING INFRADATA GENERATION
javafaker
LOG & REPORTS
ExtentReports
PAGE OBJECT MODEL
• Page Objects
• Page Factory
• Abstraction
• Waiting Strategy
PARALLEL EXECUTION
• Infrastructure
• Containers
LOGS AND REPORTS
• Exception logs
• General reports
• Evidence
DATA GENERATION
• Fake
• Static creation
• Dynamic creation
PIPELINE
• Execution strategy
BASE ARCHITECTURE
• Clean Architecture
• Design Patters
• Testing Patterns
BASIC ITEMS FOR A TEST ARCHITECTURE
with focus on web automation
an abstract class that will take
care of commons actions in
your automated tests
FACTORY
the Design Pattern to create,
in our case, browser instances
LISTENER
a non-intrusive way to know
what is happening during the
test execution
BASE TEST
BASE ARCHITECTURE
to apply DRY and KISS
Smart use of inheritance
• test inherit common test actions
One test case per class
• provide an easy way to add more tests
• ease division of tests in suites
BASE TEST
CLASS
TEST 1
TEST 2
TEST N
• browser initialization/close
• open/close database, logs …
• connect/disconnect servers
• login/logout app
BASE TEST CLASS
Apply Factory Design Pattern will help us to create a browser instance and make easy the
parallel execution against many environments.
BROWSER
FACTORY
chrome firefox edge
FACTORY CLASS
safari
Using TestNG we can use some listeners that allow modifying (or just watch)
the test behaviors. Helpful o watch test lifecycle and do something.
LISTENERS
MY TEST
LISTENER
• test start
• test finish
• on test fail
• on test skipped
• on start
• on finish
• on success
TEST 1
@MyTestListener
TEST 2
@MyTestListener
TEST N
@MyTestListener
way to create more
readability service class
LOAD
STRATEGY
making the code wait for
async executions
FLUENT
INTERFACE
create tests in a fluent
way
PAGE
FACTORY
PAGE OBJECTS MODEL
more maintainability and readability
TESTSPAGE OBJECTSAPP PAGES
PAGE OBJECTS
Page Object is a class that serves as an interface to a page of your web page.
The class provides methods to do the page actions.
Tests will use these methods.
PAGE OBJECT
FLIGHT SELECTION
PAGE OBJECT
SEARCH
PAGE OBJECT
PAYMENT
SUCCESSFUL BOOK
INVALID DATES
SEARCH PAGE
FLIGHT SELECTION
PAGE
PAYMENT PAGE PAYMENT PROBLEM
LOAD STRATEGY
A Load Strategy is responsible for wait for a certain time by any event on the
web page, most of the time related to async requests (Ajax).
PAUSE
IMPLICITLY
any type of sleep that will
pause the execution
you’ll won’t know, in your
code witch action will wait
EXPLICITLY
AJAX LOCATORthe best choice to use with
Page Factory strategy
with this strategy you can see, in the
code, witch element will take time
FLUENT INTERFACE
Creates a method chaining to perform a series of actions to make the code
more readable and easy to use.
@Test
public void testWithoutFluentInterface() {
GeneralMenuPage menu = new GeneralMenuPage();
menu.clickinExperience();
menu.clickInOurFleet();
menu.clickInSeatingCharts();
}
@Test
public void testWithFluentInterface() {
GeneralMenuPage menu = new GeneralMenuPage();
menu.clickinExperience().clickInOurFleet().clickInSeatingCharts();
}
know all the exceptions to
solve the problems root-cause
GENERAL
REPORTS
evidence and
executive reports
EXCEPTION
LOGS
LOGS AND REPORTS
because we need to know about any error
By using any log strategy, saving a log file, we can understand the common
errors occurred during the test execution.
These errors can be of:
• assertion errors
• timeout exceptions
• locator exception
• an exception on your architecture
If you want to analyze test errors across teams a good way is using
Elasticsearch with Grafana/Kibana.
EXCEPTION LOGS
Generate xUnit reports to attach on your
CI/CD and, rapidly, see the test status.
GENERAL REPORTS
Create an executive report to provide
information and evidence about the test
execution.
This report may contain screenshots when
an error occurs to help to analyze the root
cause of a problem.
pass the responsibility of
non-sensitive data
generation to a framework
STATIC/DYNAMIC
GENERATION
create the sensitive data
and put under your control
FAKES
DATA GENERATION
solve one of the biggest problems
Ability to create an approach to generate non-sensitive data for your test
without the necessity to manually change the test data in each execution.
There’re a lot of tools to create these type of data.
FAKE GENERATION
Example with javafaker
Faker faker = new Faker(new Locale("pt-BR"));
faker.name().fullName();
faker.address().fullAddress();
faker.internet().emailAddress();
faker.business().creditCardNumber();
faker.date().birthday();
When the data cause different behaviors in your application.
STATIC / DYNAMIC GENERATION
A Static approach can be implemented with any kind of solution, like:
• Files
• CSV | JSON | TXT | YML
• Database
• Mock
A Dynamic approach can be created according to your context.
Used for remove the maintenance of test data
• Queries in a database
• Consume data from a static poll
run many tests at the same
time in a chosen target
GRID AND
AUTO-SCALE
using the proper containers,
we can speed up the test
execution
PARALLELISM
PARALLEL EXECUTION
to speed up your test execution
maven-surefire-
plugin
Have an ability to
control how many
threads we need
inside the pom.xml
Junit 4
Has an experimental
class called
ParallelComputer
TestNG
Control the
parallelism thought
the suites in any level
of tests (class,
methods, etc..)
Parallelism, under test, is the ability to perform the same test in different
conditions (browser, devices, etc...) or different tests at the same time.
PARALLELISM
GRID SCHEMA
Node Windows Node MacOSX Node Linux
Test Script Hub
send
capabilities
understands the capabilities
and send to proper node
WAYS TO CREATE A GRID
LOCAL
Uses machines inside an
infrastructure.
Can be a bare-metal desktop
or a virtual machine
CLOUD
Uses a cloud infrastructure
platform to create virtual
machines
CONTAINERS
Uses containers (locally or
cloud-based) to create the
infrastructure and support
orchestration
CONTAINERS TO AUTO-SCALE
• has containers for each aspect of the grid
• selenium-hub
• selenium-node-chrome
• selenium-node-firefox
• auto-scale based on hardware utilization
or with some in-house solution
• Uses a custom container
elgalu/selenium that provides:
• live Preview with VNC
• video recording
• dashboard
• automatic auto-scale containers
based on the number of tests
SELENIUM
create a pipeline for any
type of test execution
DIVIDE ALL TYPES
OF EXECUTION
PIPELINE
make the execution process clear
FUNCTIONAL TESTACCEPTANCE TESTSMOKE TEST
DIVIDE ALL TYPES OF EXECUTION
WEB PART IN THE PIPELINE
Most important tests
in a business
perspective
Most used user
scenarios
Assure that critical
functionalities
works
each build
your determination
e.g.: release
Your determination
e.g.: release
THANK YOU!
TATIANE NOGUEIRA
Consultant Developer @ Thoughtworks
@tatianeaguirres
linkedin.com/tatianeaguirres
ELIAS NOGUEIRA
Software Engineer in Test @ Sicredi
@eliasnogueira
linkedin.com/eliasnogueira
https://github.com/eliasnogueira/public-speaking

Weitere ähnliche Inhalte

Was ist angesagt?

Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testingdidev
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
TestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaTestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaEdureka!
 
Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNetHai Tran Son
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionGanuka Yashantha
 
Functional Tests Automation with Robot Framework
Functional Tests Automation with Robot FrameworkFunctional Tests Automation with Robot Framework
Functional Tests Automation with Robot Frameworklaurent bristiel
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Test automation
Test automationTest automation
Test automationXavier Yin
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Edureka!
 

Was ist angesagt? (20)

Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
API Testing for everyone.pptx
API Testing for everyone.pptxAPI Testing for everyone.pptx
API Testing for everyone.pptx
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
 
Manual testing
Manual testingManual testing
Manual testing
 
Automation testing
Automation testingAutomation testing
Automation testing
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
 
TestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaTestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | Edureka
 
Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNet
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Postman
PostmanPostman
Postman
 
Functional Tests Automation with Robot Framework
Functional Tests Automation with Robot FrameworkFunctional Tests Automation with Robot Framework
Functional Tests Automation with Robot Framework
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Test automation
Test automationTest automation
Test automation
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
 
Robot framework and selenium2 library
Robot framework and selenium2 libraryRobot framework and selenium2 library
Robot framework and selenium2 library
 

Ähnlich wie Create an architecture for web test automation

1,2,3 … Testing : Is this thing on(line)? with Mike Martin
1,2,3 … Testing : Is this thing on(line)? with Mike Martin1,2,3 … Testing : Is this thing on(line)? with Mike Martin
1,2,3 … Testing : Is this thing on(line)? with Mike MartinNETUserGroupBern
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)CIVEL Benoit
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1CIVEL Benoit
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lessonSadaaki Emura
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIwajrcs
 
Writing Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of JelloWriting Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of JelloDan Cuellar
 
QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER Piyush Prakash
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...seleniumconf
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersGrace Jansen
 
How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?Dmitry Buzdin
 
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Neotys_Partner
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsOrtus Solutions, Corp
 
Managing Millions of Tests Using Databricks
Managing Millions of Tests Using DatabricksManaging Millions of Tests Using Databricks
Managing Millions of Tests Using DatabricksDatabricks
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Niels Frydenholm
 
Working Software Over Comprehensive Documentation
Working Software Over Comprehensive DocumentationWorking Software Over Comprehensive Documentation
Working Software Over Comprehensive DocumentationAndrii Dzynia
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_ContainersGrace Jansen
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
Automate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAutomate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAnand Bagmar
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Martin Spier
 

Ähnlich wie Create an architecture for web test automation (20)

1,2,3 … Testing : Is this thing on(line)? with Mike Martin
1,2,3 … Testing : Is this thing on(line)? with Mike Martin1,2,3 … Testing : Is this thing on(line)? with Mike Martin
1,2,3 … Testing : Is this thing on(line)? with Mike Martin
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lesson
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CI
 
Writing Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of JelloWriting Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of Jello
 
QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containers
 
jDriver Presentation
jDriver PresentationjDriver Presentation
jDriver Presentation
 
How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?
 
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
 
Managing Millions of Tests Using Databricks
Managing Millions of Tests Using DatabricksManaging Millions of Tests Using Databricks
Managing Millions of Tests Using Databricks
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Working Software Over Comprehensive Documentation
Working Software Over Comprehensive DocumentationWorking Software Over Comprehensive Documentation
Working Software Over Comprehensive Documentation
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_Containers
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Automate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAutomate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaS
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
 

Mehr von Elias Nogueira

Criando uma arquitetura para seus testes de API com RestAssured
Criando uma arquitetura para seus testes de API com RestAssuredCriando uma arquitetura para seus testes de API com RestAssured
Criando uma arquitetura para seus testes de API com RestAssuredElias Nogueira
 
De a máxima cobertura nos seus testes de API
De a máxima cobertura nos seus testes de APIDe a máxima cobertura nos seus testes de API
De a máxima cobertura nos seus testes de APIElias Nogueira
 
Automação e virtualização de serviços
Automação e virtualização de serviçosAutomação e virtualização de serviços
Automação e virtualização de serviçosElias Nogueira
 
Usando containers com auto-escala de testes
Usando containers com auto-escala de testesUsando containers com auto-escala de testes
Usando containers com auto-escala de testesElias Nogueira
 
Coach por Imersão - Buscando a excelência técnica com o time
Coach por Imersão - Buscando a excelência técnica com o timeCoach por Imersão - Buscando a excelência técnica com o time
Coach por Imersão - Buscando a excelência técnica com o timeElias Nogueira
 
O Agile Coach pode (e muitas vezes deve) ser técnico
O Agile Coach pode (e muitas vezes deve) ser técnicoO Agile Coach pode (e muitas vezes deve) ser técnico
O Agile Coach pode (e muitas vezes deve) ser técnicoElias Nogueira
 
Paralelize seus testes web e mobile para ter feedbacks mais rápidos
Paralelize seus testes web e mobile para ter feedbacks mais rápidosParalelize seus testes web e mobile para ter feedbacks mais rápidos
Paralelize seus testes web e mobile para ter feedbacks mais rápidosElias Nogueira
 
Como 4 Agile Coaches trabalham em uma Transformação Ágil
Como 4 Agile Coaches trabalham em uma Transformação Ágil Como 4 Agile Coaches trabalham em uma Transformação Ágil
Como 4 Agile Coaches trabalham em uma Transformação Ágil Elias Nogueira
 
Papel do QA na Transformação Ágil
Papel do QA na Transformação ÁgilPapel do QA na Transformação Ágil
Papel do QA na Transformação ÁgilElias Nogueira
 
BDD não é automação de teste - Scrum Gathering
BDD não é automação de teste - Scrum GatheringBDD não é automação de teste - Scrum Gathering
BDD não é automação de teste - Scrum GatheringElias Nogueira
 
Como criar e executar testes paralelos web usando Selenium e containers
Como criar e executar testes paralelos web usando Selenium e containersComo criar e executar testes paralelos web usando Selenium e containers
Como criar e executar testes paralelos web usando Selenium e containersElias Nogueira
 
Improve Yourself -- Learn the Skills, Join the Community - Tests
Improve Yourself -- Learn the Skills, Join the Community - TestsImprove Yourself -- Learn the Skills, Join the Community - Tests
Improve Yourself -- Learn the Skills, Join the Community - TestsElias Nogueira
 
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...Elias Nogueira
 
BDD não é Automação de Testes
BDD não é Automação de TestesBDD não é Automação de Testes
BDD não é Automação de TestesElias Nogueira
 
Criando uma grid para execução de testes paralelo com Appium
Criando uma grid para execução de testes paralelo com AppiumCriando uma grid para execução de testes paralelo com Appium
Criando uma grid para execução de testes paralelo com AppiumElias Nogueira
 
Como ter sucesso ministrando uma palestra técnica
Como ter sucesso ministrando uma palestra técnicaComo ter sucesso ministrando uma palestra técnica
Como ter sucesso ministrando uma palestra técnicaElias Nogueira
 
Quais são os steps de que deve conter na sua pipeline?
Quais são os steps de que deve conter na sua pipeline?Quais são os steps de que deve conter na sua pipeline?
Quais são os steps de que deve conter na sua pipeline?Elias Nogueira
 
Testes em todos os niveis de planejamento
Testes em todos os niveis de planejamentoTestes em todos os niveis de planejamento
Testes em todos os niveis de planejamentoElias Nogueira
 
Coaching the Agile Coach
Coaching the Agile CoachCoaching the Agile Coach
Coaching the Agile CoachElias Nogueira
 

Mehr von Elias Nogueira (20)

Criando uma arquitetura para seus testes de API com RestAssured
Criando uma arquitetura para seus testes de API com RestAssuredCriando uma arquitetura para seus testes de API com RestAssured
Criando uma arquitetura para seus testes de API com RestAssured
 
De a máxima cobertura nos seus testes de API
De a máxima cobertura nos seus testes de APIDe a máxima cobertura nos seus testes de API
De a máxima cobertura nos seus testes de API
 
Automação e virtualização de serviços
Automação e virtualização de serviçosAutomação e virtualização de serviços
Automação e virtualização de serviços
 
Usando containers com auto-escala de testes
Usando containers com auto-escala de testesUsando containers com auto-escala de testes
Usando containers com auto-escala de testes
 
Coach por Imersão - Buscando a excelência técnica com o time
Coach por Imersão - Buscando a excelência técnica com o timeCoach por Imersão - Buscando a excelência técnica com o time
Coach por Imersão - Buscando a excelência técnica com o time
 
O Agile Coach pode (e muitas vezes deve) ser técnico
O Agile Coach pode (e muitas vezes deve) ser técnicoO Agile Coach pode (e muitas vezes deve) ser técnico
O Agile Coach pode (e muitas vezes deve) ser técnico
 
Paralelize seus testes web e mobile para ter feedbacks mais rápidos
Paralelize seus testes web e mobile para ter feedbacks mais rápidosParalelize seus testes web e mobile para ter feedbacks mais rápidos
Paralelize seus testes web e mobile para ter feedbacks mais rápidos
 
Como 4 Agile Coaches trabalham em uma Transformação Ágil
Como 4 Agile Coaches trabalham em uma Transformação Ágil Como 4 Agile Coaches trabalham em uma Transformação Ágil
Como 4 Agile Coaches trabalham em uma Transformação Ágil
 
Papel do QA na Transformação Ágil
Papel do QA na Transformação ÁgilPapel do QA na Transformação Ágil
Papel do QA na Transformação Ágil
 
BDD não é automação de teste - Scrum Gathering
BDD não é automação de teste - Scrum GatheringBDD não é automação de teste - Scrum Gathering
BDD não é automação de teste - Scrum Gathering
 
Como criar e executar testes paralelos web usando Selenium e containers
Como criar e executar testes paralelos web usando Selenium e containersComo criar e executar testes paralelos web usando Selenium e containers
Como criar e executar testes paralelos web usando Selenium e containers
 
Improve Yourself -- Learn the Skills, Join the Community - Tests
Improve Yourself -- Learn the Skills, Join the Community - TestsImprove Yourself -- Learn the Skills, Join the Community - Tests
Improve Yourself -- Learn the Skills, Join the Community - Tests
 
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
 
BDD não é Automação de Testes
BDD não é Automação de TestesBDD não é Automação de Testes
BDD não é Automação de Testes
 
Criando uma grid para execução de testes paralelo com Appium
Criando uma grid para execução de testes paralelo com AppiumCriando uma grid para execução de testes paralelo com Appium
Criando uma grid para execução de testes paralelo com Appium
 
Como ter sucesso ministrando uma palestra técnica
Como ter sucesso ministrando uma palestra técnicaComo ter sucesso ministrando uma palestra técnica
Como ter sucesso ministrando uma palestra técnica
 
Quais são os steps de que deve conter na sua pipeline?
Quais são os steps de que deve conter na sua pipeline?Quais são os steps de que deve conter na sua pipeline?
Quais são os steps de que deve conter na sua pipeline?
 
Tem que testar mesmo?
Tem que testar mesmo?Tem que testar mesmo?
Tem que testar mesmo?
 
Testes em todos os niveis de planejamento
Testes em todos os niveis de planejamentoTestes em todos os niveis de planejamento
Testes em todos os niveis de planejamento
 
Coaching the Agile Coach
Coaching the Agile CoachCoaching the Agile Coach
Coaching the Agile Coach
 

Kürzlich hochgeladen

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 

Kürzlich hochgeladen (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 

Create an architecture for web test automation

  • 1. ELIAS NOGUEIRA TATIANE NOGUEIRA @eliasnogueira @tatianeaguirres
  • 2. TATIANE NOGUEIRA Consultant Developer @ Thoughtworks @tatianeaguirres linkedin.com/tatianeaguirres ELIAS NOGUEIRA Software Engineer in Test @ Sicredi @eliasnogueira linkedin.com/eliasnogueira
  • 3. THE STACK LANGUAGE TESTING INFRADATA GENERATION javafaker LOG & REPORTS ExtentReports
  • 4. PAGE OBJECT MODEL • Page Objects • Page Factory • Abstraction • Waiting Strategy PARALLEL EXECUTION • Infrastructure • Containers LOGS AND REPORTS • Exception logs • General reports • Evidence DATA GENERATION • Fake • Static creation • Dynamic creation PIPELINE • Execution strategy BASE ARCHITECTURE • Clean Architecture • Design Patters • Testing Patterns BASIC ITEMS FOR A TEST ARCHITECTURE with focus on web automation
  • 5. an abstract class that will take care of commons actions in your automated tests FACTORY the Design Pattern to create, in our case, browser instances LISTENER a non-intrusive way to know what is happening during the test execution BASE TEST BASE ARCHITECTURE to apply DRY and KISS
  • 6. Smart use of inheritance • test inherit common test actions One test case per class • provide an easy way to add more tests • ease division of tests in suites BASE TEST CLASS TEST 1 TEST 2 TEST N • browser initialization/close • open/close database, logs … • connect/disconnect servers • login/logout app BASE TEST CLASS
  • 7. Apply Factory Design Pattern will help us to create a browser instance and make easy the parallel execution against many environments. BROWSER FACTORY chrome firefox edge FACTORY CLASS safari
  • 8. Using TestNG we can use some listeners that allow modifying (or just watch) the test behaviors. Helpful o watch test lifecycle and do something. LISTENERS MY TEST LISTENER • test start • test finish • on test fail • on test skipped • on start • on finish • on success TEST 1 @MyTestListener TEST 2 @MyTestListener TEST N @MyTestListener
  • 9. way to create more readability service class LOAD STRATEGY making the code wait for async executions FLUENT INTERFACE create tests in a fluent way PAGE FACTORY PAGE OBJECTS MODEL more maintainability and readability
  • 10. TESTSPAGE OBJECTSAPP PAGES PAGE OBJECTS Page Object is a class that serves as an interface to a page of your web page. The class provides methods to do the page actions. Tests will use these methods. PAGE OBJECT FLIGHT SELECTION PAGE OBJECT SEARCH PAGE OBJECT PAYMENT SUCCESSFUL BOOK INVALID DATES SEARCH PAGE FLIGHT SELECTION PAGE PAYMENT PAGE PAYMENT PROBLEM
  • 11. LOAD STRATEGY A Load Strategy is responsible for wait for a certain time by any event on the web page, most of the time related to async requests (Ajax). PAUSE IMPLICITLY any type of sleep that will pause the execution you’ll won’t know, in your code witch action will wait EXPLICITLY AJAX LOCATORthe best choice to use with Page Factory strategy with this strategy you can see, in the code, witch element will take time
  • 12. FLUENT INTERFACE Creates a method chaining to perform a series of actions to make the code more readable and easy to use. @Test public void testWithoutFluentInterface() { GeneralMenuPage menu = new GeneralMenuPage(); menu.clickinExperience(); menu.clickInOurFleet(); menu.clickInSeatingCharts(); } @Test public void testWithFluentInterface() { GeneralMenuPage menu = new GeneralMenuPage(); menu.clickinExperience().clickInOurFleet().clickInSeatingCharts(); }
  • 13. know all the exceptions to solve the problems root-cause GENERAL REPORTS evidence and executive reports EXCEPTION LOGS LOGS AND REPORTS because we need to know about any error
  • 14. By using any log strategy, saving a log file, we can understand the common errors occurred during the test execution. These errors can be of: • assertion errors • timeout exceptions • locator exception • an exception on your architecture If you want to analyze test errors across teams a good way is using Elasticsearch with Grafana/Kibana. EXCEPTION LOGS
  • 15. Generate xUnit reports to attach on your CI/CD and, rapidly, see the test status. GENERAL REPORTS Create an executive report to provide information and evidence about the test execution. This report may contain screenshots when an error occurs to help to analyze the root cause of a problem.
  • 16. pass the responsibility of non-sensitive data generation to a framework STATIC/DYNAMIC GENERATION create the sensitive data and put under your control FAKES DATA GENERATION solve one of the biggest problems
  • 17. Ability to create an approach to generate non-sensitive data for your test without the necessity to manually change the test data in each execution. There’re a lot of tools to create these type of data. FAKE GENERATION Example with javafaker Faker faker = new Faker(new Locale("pt-BR")); faker.name().fullName(); faker.address().fullAddress(); faker.internet().emailAddress(); faker.business().creditCardNumber(); faker.date().birthday();
  • 18. When the data cause different behaviors in your application. STATIC / DYNAMIC GENERATION A Static approach can be implemented with any kind of solution, like: • Files • CSV | JSON | TXT | YML • Database • Mock A Dynamic approach can be created according to your context. Used for remove the maintenance of test data • Queries in a database • Consume data from a static poll
  • 19. run many tests at the same time in a chosen target GRID AND AUTO-SCALE using the proper containers, we can speed up the test execution PARALLELISM PARALLEL EXECUTION to speed up your test execution
  • 20. maven-surefire- plugin Have an ability to control how many threads we need inside the pom.xml Junit 4 Has an experimental class called ParallelComputer TestNG Control the parallelism thought the suites in any level of tests (class, methods, etc..) Parallelism, under test, is the ability to perform the same test in different conditions (browser, devices, etc...) or different tests at the same time. PARALLELISM
  • 21. GRID SCHEMA Node Windows Node MacOSX Node Linux Test Script Hub send capabilities understands the capabilities and send to proper node
  • 22. WAYS TO CREATE A GRID LOCAL Uses machines inside an infrastructure. Can be a bare-metal desktop or a virtual machine CLOUD Uses a cloud infrastructure platform to create virtual machines CONTAINERS Uses containers (locally or cloud-based) to create the infrastructure and support orchestration
  • 23. CONTAINERS TO AUTO-SCALE • has containers for each aspect of the grid • selenium-hub • selenium-node-chrome • selenium-node-firefox • auto-scale based on hardware utilization or with some in-house solution • Uses a custom container elgalu/selenium that provides: • live Preview with VNC • video recording • dashboard • automatic auto-scale containers based on the number of tests SELENIUM
  • 24. create a pipeline for any type of test execution DIVIDE ALL TYPES OF EXECUTION PIPELINE make the execution process clear
  • 25. FUNCTIONAL TESTACCEPTANCE TESTSMOKE TEST DIVIDE ALL TYPES OF EXECUTION WEB PART IN THE PIPELINE Most important tests in a business perspective Most used user scenarios Assure that critical functionalities works each build your determination e.g.: release Your determination e.g.: release
  • 26. THANK YOU! TATIANE NOGUEIRA Consultant Developer @ Thoughtworks @tatianeaguirres linkedin.com/tatianeaguirres ELIAS NOGUEIRA Software Engineer in Test @ Sicredi @eliasnogueira linkedin.com/eliasnogueira https://github.com/eliasnogueira/public-speaking