Please enable JavaScript.
Coggle requires JavaScript to display documents.
LIL - Test Automation Foundations (Adopt Test Automation (Best practice…
LIL - Test Automation Foundations
Intro
Sample written in Node.js
Manuel testing vs automated testing
manual testing is time consuming
same steps but one is quicker
automated testing requires maitenance
automated testing standardizes the testing steps
automated testing can be done on multiple platforms, devices, OS
Test Types
Examples of automated tests
Unit tests
Integration tests
Component tests
Functional tests
UI tests
...
Testing models
Agile Testing Quadrants
Axes
Business facing vs technology facing
Guide development vs critique product
Quadrants
Technology facing, guiding dev (Q1)
Characteristics
Automated tests
Test functionality
Build a good fondation
Examples
Unit
Integration
Component
When?
Written alongside development
Why?
To confirm functionnalities
Remark
most number of tests in Q1
Business facing, guiding dev (Q2)
Characteristics
Automated OR manual
Help answering questions & discover info
Validate app features
Examples
Functional
UI
Prototype
When?
During and after dev
How?
Should be included in the definition of done
Why?
To uncover bugs quickly
Business facing, critique product (Q3)
Characteristics
Mostly manual
Feedback on current state of the app
Help understand user experience
Examples
Exploratory
Usability
A/B
Why?
To uncover bugs and other issues
When?
After dev
Technology facing, critique product (Q4)
Characteristics
Automated
Provide info about app
Examples
Performance
Security
Reliability
How?
Implemented based on prio
What
Classify tests
Helpful for planning
Identify resources early
By Brian Marick
Test Pyramid
What?
Ideal way to structure tests
Visual recommendation of test coverage
By Mike Cohn in Succeeding with Agile
Characteristics
Unit -> UI
Isolated -> Integrated
Faster -> slower
Other version
How to Approach Automation
Get the whole team involved
Who?
Developers
Testers
Business
...
Input from stakeholders
What types of tests to implement
What tools to choose
Who will be responsible for what
How to collaborate
Typical ownership
Unit tests -> developers
Integration tests -> dev + testers
UI tests -> testers
How?
Prep work : gather everyone's perspective
Retrospectives
Make a strategy
Priorities
Scenarios
Automated/not
Test cases
Test environments
Test tools
Select test tools
Baseline requirement
Type of test to be implemented
Language the test will be written in
Determine development
TDD = Test Driven Development
Follow test design patterns
DRY = Don't Repeat Yourself
DSL = Domain Specific Language
Testing tools
Framework
What?
Allows you to easily write and structure tests; has reusable test functions for common actions
Examples
Mocha
great for writing/structuring tests
Node.js apps
browser support async testing and build-in test runner
Jasmine
any JavaScript flavor
no DOM required (?)
obvious syntax
customizable test runner
Jest
by Facebook
to test React
zero config
build-in test runner
mocking library
Selenium
UI testing
can be combined with most frameworks
Cucumber
BDD UI testing Framework (Behavior Driven Development)
Executes specs
Cypress
UI testing Framework
fast, easy, reliable
runs in any browser
Decide what to Automate
Identify scenarios to automate
Give each scenario a value
Factors
Importance of the feature
Probability of the feature being fixed if broken
Distinctness of the scenario
Identify risk of automation
Impact and probablity of use
Identify cost of automation
Select what to automate
Adopt Test Automation
Best practice
Start with a strong foundation
Build steadily over time
Team invested in testing
Valuable tests
Have a test retrospective
Quality over quantity
Treat test code like production code
Reliable tests
Have a mitigation plan
Make independent tests
Use a dedicated environment
Fast tests
Parallelize tests
Limit UI testing
Maintenance
Adding tests
Updating tests
Fixing failures
Use Continuous Integration
Factors to consider when picking a tool
Cost
Ease of use
Maintenance
Support
Measure code coverage
Warning
Decouple coverage from purpose
Write tests that provide value
Never just automate to increase coverage