SlideShare a Scribd company logo
Acceptance Tests as Monitors
Phill Barber
In this talk
Why the need to do this?
How can you do it?
Live Demo
Conclusions
About me
Java Dev
● Media Companies
● Small Startup
● Finance (Investment Bank)
DevOps and Monitoring has been a focus
Why?
Why run Acceptance Tests in Production?
Incident
Response
Failure
Detection
Capacity
Planning
Performance
Analysis
Business
Metrics /
Insight
Monitoring
Signing off your build
Monitoring your environment
CC BY 2.0, https://commons.wikimedia.org/w/index.php?curid=587238
Monitoring: “Standard” health checks
Your
App
Upstream
App A
Upstream
App B
Your
App’s DB
Monitoring/
Alerting
GET /healthcheck
GET /ping
GET /ping
select * from dual;
Prometheus
Dashing,
Nagios etc etc
See Dropwizard:
https://github.com/dropwizard/dropwizard/blob/master/dropwizard-core/src/main/java/io/dropwizard/setup/AdminEnvironment.java
Monitor User/Client Activity
This is one of the best things you can do.
● If you can see actual events - you know it’s ok.
● Low cost - High Benefit
But… can you alert?
● Pretty Graph - Does it alert?
Low traffic apps
Is it broken - or is it Christmas Day?
Anomaly Detection can’t be responsive with low volumes
Maybe you can’t Alert?
Instead of alerting that build is broken, alert that prod is broken
They:
● pass or fail - simple!
● descriptive names - helpful!
● Can have helpful errors - helps incident response
Tests can lend themselves well to asserting the health of a system.
Build time tests can be used as monitoring
REDUCE
By Juergen Rosskamp, wiki+spam@eindruckschinderdomain.de - digital still picture, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=1877742
Know the Impact of an issue
Your
App
App 1
App 2
Your
App’s DB
Monitoring/
Alerting
GET /healthcheck GET /ping
select * from dual;
Search Results Test
Product Summary Test
Product Details Test
Supplementing a Canary release
Real Clients/Users
Load
Balancer
Old Version
New Version
Acceptance
Tests as
Monitors
Real Availability stats
Check the production site’s homepage?
Check the functionality!
Real Availability stats
Your
App
Acceptance
Tests as
Monitors
Search Results Test
Product Summary Test
Product Details Test
Pingdom
Background
Website for a media company with login. Java code and Java tests.
Very concerned about site availability
We were sold. How do we do it?
1. Login with correct username/password creates a session
2. Login with incorrect username/password gives error
user.for.test.monitoring.membership-team@thecompany.com
What to test?
First thought
“Let’s run (some of) our acceptance tests from Jenkins against production”
Not good:
● Does your CI Server get as much love as production in your org?
How do we do it?
Second thought
“Let’s run our tests from Nagios (monitoring server) in production”
Not good:
● Nagios (and it’s many forks/variants) rely on quick simple checks.
○ We ended with chaos!
● Harder to deploy
How do we do it?
Third thought
“Let’s just treat our acceptance tests as another microservice in production”
Great:
● Treated like any other service.
○ Development
○ Deployment
○ Monitoring
How do we do it?
atam4j
Acceptance Tests As Monitors 4 Java
Anurag Kapur @anuragkapur and myself created atam4j
https://github.com/atam4j
Your
App
Monitoring/
Alerting
GET /tests
atam4j
Dropwizard Microservice
Run Your
Tests
atam4j
Prometheus
Dashing,
Nagios etc etc
Three big issues
Data
● Does it pollute?
Events
● How significant is the action?
Technically
● Where and how will they run?
Demo time
What could possibly go wrong?
Solving the Test Data & Event issues
Data
● Can you hide it?
● Mark it as test data
○ Sometimes you might need to add extra fields “testData”: true
Events
● How far should events propagate ?
○ You might want to cut them short
○ Talk to your downstream systems consuming the data
● Always exclude from monitoring real transactions
Atam4j - New Features
● Prometheus Support? - Not yet, but it is on a branch… WIP
● Atam4Node? - Considering it!
Conclusion
It can have benefits
Cost Benefit will depend on your domain
If you do it:
● treat the tests as similar as possible to other tests
● treat the deployment and monitoring as similar as possible to other apps
Tools will help, but....
Hardest problems are specific to your domain

More Related Content

ODP
Automating good coding practices
PDF
Continuous Integration JUG Hannover
PPT
Effective specifications for agile teams
PPTX
KraQA#39 - Jak testowac tool do testow
PDF
Shift left-testing
PPT
How to Build and Maintain Quality Drupal Sites with Automated Testing
PPTX
Testing Legacy Apps
PPT
Specification by example and agile acceptance testing
Automating good coding practices
Continuous Integration JUG Hannover
Effective specifications for agile teams
KraQA#39 - Jak testowac tool do testow
Shift left-testing
How to Build and Maintain Quality Drupal Sites with Automated Testing
Testing Legacy Apps
Specification by example and agile acceptance testing

What's hot (18)

PPTX
Lean UX и дизайн-спринты: как построить ведущий продукт на рынке за пять дней
PDF
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
PDF
Auditing Drupal Sites
PPTX
Test management struggles and challenges in SDLC
PPTX
DevOps - Understanding Core Concepts
PDF
Agile Testers: Becoming a key asset for your team
PDF
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
PDF
Page Objects - You're Doing it Wrong by Titus Fortner
PPTX
Cross browser testing with browser stack
PPTX
Cf objective2014 testing-testingeverywhere
PDF
Agile testing overview
PDF
A Software Tester's Travels from the Land of the Waterfall to the Land of Agi...
PDF
Sustainable development of an organization -- LKFR14
PPTX
Iterating In the Open
PDF
Ship quality mobile apps with speed [Webinar]
PPTX
Security, Policy & Drift - Getting Database Risk Under Control in Release Aut...
PDF
Work with Developers for Fun and Progress - AppSec California
PPTX
Dot all 2019 | Testing with Craft | Giel Tettelar
Lean UX и дизайн-спринты: как построить ведущий продукт на рынке за пять дней
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Auditing Drupal Sites
Test management struggles and challenges in SDLC
DevOps - Understanding Core Concepts
Agile Testers: Becoming a key asset for your team
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
Page Objects - You're Doing it Wrong by Titus Fortner
Cross browser testing with browser stack
Cf objective2014 testing-testingeverywhere
Agile testing overview
A Software Tester's Travels from the Land of the Waterfall to the Land of Agi...
Sustainable development of an organization -- LKFR14
Iterating In the Open
Ship quality mobile apps with speed [Webinar]
Security, Policy & Drift - Getting Database Risk Under Control in Release Aut...
Work with Developers for Fun and Progress - AppSec California
Dot all 2019 | Testing with Craft | Giel Tettelar
Ad

Similar to CLL19 - Acceptance Tests as Monitors (20)

KEY
Continuous Delivery
PPTX
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
PPTX
What does "monitoring" mean? (FOSDEM 2017)
PPTX
Mickiel Vroon - Test Environment, The Future Achilles’ Heel
PDF
Exploratory Testing As Code Eurostar23
PDF
Exploratory Testing As Code
PDF
DevSecCon London 2017: Shift happens ... by Colin Domoney
PDF
Devoxx 2014 michael_neale
PDF
Acceptance test plan_4-24-07
PPTX
Perforce on Tour 2015 - Grab Testing By the Horns and Move
PPTX
Evolution of Monitoring and Prometheus (Dublin 2018)
PDF
Impact Analysis - LoopConf
PDF
Impactanalysis 150507054758-lva1-app6891
PPTX
Bringing Continuous Delivery to the Department of Defense
PDF
CNIT 125 7. Security Assessment and Testing
PDF
CISSP Prep: Ch 7. Security Assessment and Testing
PPTX
Testable requirements
PDF
Including security in devops
PDF
6. Security Assessment and Testing
Continuous Delivery
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
What does "monitoring" mean? (FOSDEM 2017)
Mickiel Vroon - Test Environment, The Future Achilles’ Heel
Exploratory Testing As Code Eurostar23
Exploratory Testing As Code
DevSecCon London 2017: Shift happens ... by Colin Domoney
Devoxx 2014 michael_neale
Acceptance test plan_4-24-07
Perforce on Tour 2015 - Grab Testing By the Horns and Move
Evolution of Monitoring and Prometheus (Dublin 2018)
Impact Analysis - LoopConf
Impactanalysis 150507054758-lva1-app6891
Bringing Continuous Delivery to the Department of Defense
CNIT 125 7. Security Assessment and Testing
CISSP Prep: Ch 7. Security Assessment and Testing
Testable requirements
Including security in devops
6. Security Assessment and Testing
Ad

Recently uploaded (20)

PPTX
Modernising the Digital Integration Hub
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPT
What is a Computer? Input Devices /output devices
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
project resource management chapter-09.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Modernising the Digital Integration Hub
NewMind AI Weekly Chronicles - August'25-Week II
1 - Historical Antecedents, Social Consideration.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Chapter 5: Probability Theory and Statistics
O2C Customer Invoices to Receipt V15A.pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
What is a Computer? Input Devices /output devices
Web App vs Mobile App What Should You Build First.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
observCloud-Native Containerability and monitoring.pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Tartificialntelligence_presentation.pptx
Getting Started with Data Integration: FME Form 101
Group 1 Presentation -Planning and Decision Making .pptx
project resource management chapter-09.pdf
Hybrid model detection and classification of lung cancer
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game

CLL19 - Acceptance Tests as Monitors