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

More Related Content

PDF
API Testing following the Test Pyramid
PPT
Test Automation Framework Designs
PPTX
Agile Testing Strategy
PPTX
Xray for Jira - How to automate your QA process
PPTX
Agile testing - Testing From Day 1
PDF
Cloud Native Java:GraalVM
PPTX
Testing strategy for agile projects updated
PPT
Test automation process
API Testing following the Test Pyramid
Test Automation Framework Designs
Agile Testing Strategy
Xray for Jira - How to automate your QA process
Agile testing - Testing From Day 1
Cloud Native Java:GraalVM
Testing strategy for agile projects updated
Test automation process

What's hot (20)

PDF
Test Automation - Keytorc Approach
PPTX
Api Testing
PPTX
Test automation proposal
PPTX
Cypress Automation
PDF
Building a Test Automation Strategy for Success
PDF
Test Automation Framework Design | www.idexcel.com
PDF
Test Automation
PPTX
Test your microservices with REST-Assured
PPT
Role Of Qa And Testing In Agile 1225221397167302 8
PDF
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
PPTX
Test Driven Development (TDD) Preso 360|Flex 2010
PPT
Agile testing
PPT
Automation testing
PDF
Web automation using selenium.ppt
PPTX
stlc
PPTX
Jira as a Tool for Test Management
PPTX
Testing Tools with AI
PPTX
Formulating Agile Testing Strategy
PDF
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
PPTX
Test Design and Automation for REST API
Test Automation - Keytorc Approach
Api Testing
Test automation proposal
Cypress Automation
Building a Test Automation Strategy for Success
Test Automation Framework Design | www.idexcel.com
Test Automation
Test your microservices with REST-Assured
Role Of Qa And Testing In Agile 1225221397167302 8
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
Test Driven Development (TDD) Preso 360|Flex 2010
Agile testing
Automation testing
Web automation using selenium.ppt
stlc
Jira as a Tool for Test Management
Testing Tools with AI
Formulating Agile Testing Strategy
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Test Design and Automation for REST API
Ad

Similar to Create an architecture for web test automation (20)

PDF
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
PDF
Strategy-driven Test Generation with Open Source Frameworks
PPTX
Designing for the internet - Page Objects for the Real World
PPTX
Системный взгляд на параллельный запуск Selenium тестов
PPTX
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
PDF
Automated testing
PPTX
Test automation expert days
PPT
Test Automation Framework Designs
PDF
Implementing Test Automation in Agile Projects
PDF
Gabriel carabat a healthy approach for test automation
PPTX
Automation solution using jbehave, selenium and hudson
PPTX
Parallel run selenium tests in a good way
PDF
My Test Automation Journey
PDF
Patterns of Test Automation
PPTX
Automation testing
PPTX
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
PPTX
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
PDF
Agile Software Testing the Agilogy Way
PDF
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
PPTX
Web UI Tests: Introduce UI tests using Selenium
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Strategy-driven Test Generation with Open Source Frameworks
Designing for the internet - Page Objects for the Real World
Системный взгляд на параллельный запуск Selenium тестов
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
Automated testing
Test automation expert days
Test Automation Framework Designs
Implementing Test Automation in Agile Projects
Gabriel carabat a healthy approach for test automation
Automation solution using jbehave, selenium and hudson
Parallel run selenium tests in a good way
My Test Automation Journey
Patterns of Test Automation
Automation testing
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
Agile Software Testing the Agilogy Way
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
Web UI Tests: Introduce UI tests using Selenium
Ad

More from Elias Nogueira (20)

PDF
Criando uma arquitetura para seus testes de API com RestAssured
PDF
De a máxima cobertura nos seus testes de API
PDF
Automação e virtualização de serviços
PDF
Usando containers com auto-escala de testes
PDF
Coach por Imersão - Buscando a excelência técnica com o time
PDF
O Agile Coach pode (e muitas vezes deve) ser técnico
PDF
Paralelize seus testes web e mobile para ter feedbacks mais rápidos
PDF
Como 4 Agile Coaches trabalham em uma Transformação Ágil
PDF
Papel do QA na Transformação Ágil
PDF
BDD não é automação de teste - Scrum Gathering
PDF
Como criar e executar testes paralelos web usando Selenium e containers
PDF
Improve Yourself -- Learn the Skills, Join the Community - Tests
PDF
BDD não é Automação de Testes
PDF
Criando uma grid para execução de testes paralelo com Appium
PDF
Como ter sucesso ministrando uma palestra técnica
PDF
Quais são os steps de que deve conter na sua pipeline?
PDF
Tem que testar mesmo?
PDF
Testes em todos os niveis de planejamento
PDF
Coaching the Agile Coach
PDF
Java Test Automation for REST, Web and Mobile
Criando uma arquitetura para seus testes de API com RestAssured
De a máxima cobertura nos seus testes de API
Automação e virtualização de serviços
Usando containers com auto-escala de testes
Coach por Imersão - Buscando a excelência técnica com o time
O Agile Coach pode (e muitas vezes deve) ser técnico
Paralelize seus testes web e mobile para ter feedbacks mais rápidos
Como 4 Agile Coaches trabalham em uma Transformação Ágil
Papel do QA na Transformação Ágil
BDD não é automação de teste - Scrum Gathering
Como criar e executar testes paralelos web usando Selenium e containers
Improve Yourself -- Learn the Skills, Join the Community - Tests
BDD não é Automação de Testes
Criando uma grid para execução de testes paralelo com Appium
Como ter sucesso ministrando uma palestra técnica
Quais são os steps de que deve conter na sua pipeline?
Tem que testar mesmo?
Testes em todos os niveis de planejamento
Coaching the Agile Coach
Java Test Automation for REST, Web and Mobile

Recently uploaded (20)

PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Ensemble model-based arrhythmia classification with local interpretable model...
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Connector Corner: Transform Unstructured Documents with Agentic Automation
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
A symptom-driven medical diagnosis support model based on machine learning te...
giants, standing on the shoulders of - by Daniel Stenberg
Co-training pseudo-labeling for text classification with support vector machi...
Early detection and classification of bone marrow changes in lumbar vertebrae...
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Ensemble model-based arrhythmia classification with local interpretable model...
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
NewMind AI Weekly Chronicles – August ’25 Week IV
EIS-Webinar-Regulated-Industries-2025-08.pdf
Auditboard EB SOX Playbook 2023 edition.
Build Real-Time ML Apps with Python, Feast & NoSQL
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
Lung cancer patients survival prediction using outlier detection and optimize...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.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