TESTING IN PRODUCTION
Fun* times getting your application tested
Testing for fun in production Into The Box 2018
PREVIOUSLY ON THIS
PRESENTATION…
QUICK RECAP…
CMDdevelop • deploy • deliver
@markdrew
mark@cmdhq.io
http://cmdhq.io
WHAT WE ARE COVERING
➤ Background
➤ Workflow
➤ Unit Testing
➤ QA Testing
➤ Testing in Production
➤ Q&A (not QA)
BACKGROUND
BACKGROUND
➤ Complex Application
➤ Owned actual hardware at ISP
➤ Disaster Recovery (DR)
➤ WIDE range of platforms
➤ Range of usage patterns
➤ Lots of assets and data
➤ Issues with getting code to
production
➤ 💩 code constipation
➤ 💥 Actual Disaster - ISP needs
to move.
Web app
Image Conv
Meta indexing
Image Conv
Log
PLATFORM BEHAVIOUR
A
B
siteA.domain.com
siteB.domain.com
WORKFLOW
TIMETABLE
Week1 Mon Tue Wed Thurs Fri
Dev Dev Dev Dev Dev Dev
QA
Infra
Week2 Mon Tue Wed Thurs Fri
Dev Dev Dev Release Estimate Train/Est
QA Test Test Test
Infra
Week3 Mon Tue Wed Thurs Fri
Dev Dev Dev Dev Dev …
QA Test Test
Infra Prep Deploy
ENVIRONMENTS
Development Unit Test QA Live
ENVIRONMENTS
Development Unit Test QA Live
Testing for fun in production Into The Box 2018
UNIT TESTING
Testing for fun in production Into The Box 2018
TESTBOX
➤ Unit testing framework
➤ Not just for Coldbox apps!
➤ Also includes Mockbox
➤ Test individual logic of your
code.
➤ Just had two sessions of it!
BASIC TEST
component extends="testbox.system.BaseSpec" {
function run() {
describe( "Has a commentGateway", function() {
beforeEach( function() {
commentService = new core.objects.platform.comment.commentService();
entityId = 3078;
} );
it( "should have a function called `getCommentGateway`", function() {
makePublic(commentService, "getCommentGateway");
expect(commentService).toHaveKey("getCommentGateway");
} );
it( "should call `getCommentGateway` function and return a new instance", function()
{
makePublic(commentService, "getCommentGateway");
var commentGateway = commentService.getCommentGateway();
expect(commentGateway).toBeTypeOf("component");
} );
} );
}
MOCKBOX
component extends="testbox.system.BaseSpec" {
function run() {
describe( "Can delete comments", function() {
beforeEach( function() {
commentService = new core.objects.platform.comment.commentService();
} );
it( "should return a error object", function() {
var responseData = {
"data": "Sorry, something went wrong.",
"statusCode": "500",
"statusText": "Internal server error"
};
var commentService = prepareMock(new core.objects.platform.comment.commentService());
var commentGateway = prepareMock(new core.objects.platform.comment.commentGateway());
commentService.$("getCommentGateway", commentGateway);
commentGateway.$("deleteComment");
var response = commentService.post(testData);
expect(response).toBe(responseData)
});
});
}
}
TEST RESULTS
TEST INDEX
AUTOMATED TESTING (IN JENKINS)
#!/usr/bin/env bash
echo "Building the Unit Test image"
container_name="unittests"
image_name="unittests"
docker build -t ${image_name} -f Dockerfile-UnitTests
.
mkdir -p reports
echo "Starting..."
docker run --rm --name ${container_name} 
-v "${PWD}/reports:/reports" 
${image_name}
😗
❤
UNIT TESTING DOCKER IMAGE
FROM ortussolutions/commandbox
COPY . /app
ENV IMAGE_TESTING_IN_PROGRESS true
CMD cd $APP_DIR && $BUILD_DIR/run.sh 
&& box testbox run runner=docker outputFile=/reports/
testresults.txt reporter=Text verbose=no
&& box server stop
ENVIRONMENTS
Development Unit Test QA Live
QA TESTING
QA TESTING
➤ Manual testing
➤ Automated testing
➤ What cannot be automated?
MEET BOB…*
* He’s a real person!
Testing for fun in production Into The Box 2018
MANUAL TESTING
STANDARD PERFORMANCE AND FUNCTIONALITY TESTS
TICKETS BEING TESTED
AUTOMATED UI TESTING
CodeceptJS
INSTALLATION
➤ NPM
➤ Node (obviously)
➤ Selenium Server
➤ CodeceptJS
@markdrew
> npm install -g selenium-standalone
> selenium-standalone install
> selenium-standalone start
Selenium
BUT
@markdrew
{
"tests": "./*_test.js",
"timeout": 10000,
"output": "./output",
"helpers": {
"WebDriverIO": {
"url": "https://www.google.com",
"browser": "chrome"
}
},
"include": {
"I": "./steps_file.js"
},
"bootstrap": false,
"mocha": {},
"name": "codecept"
}
codecept.json
@markdrew
Feature('MainTest');
Scenario('test something', (I) => {
I.amOnPage('/');
I.fillField('#lst-ib', 'Into The Box');
I.click('#tsf > div.tsf-p > div.jsb > center > input[type="submit"]:nth-child(1)');
I.see('Into the Box is a yearly web technologies and software craftsmanship conference');
I.click('Into The Box 2018');
I.see('April 25-27, 2018 | Texas')
});
maintest_test.js
Testing for fun in production Into The Box 2018
AUTOMATED TESTING
➤ Pros
➤ Can automate a lot of the
work
➤ Takes pictures of failures
➤ Nice logs and results
➤ Cons
➤ Doesn’t support everything
➤ File uploads
➤ File Downloads
➤ Drag and Drop events
ENVIRONMENTS
Development Unit Test QA Live
TESTING IN PRODUCTION
TESTING IN PRODUCTION
➤Can be done.
➤Don’t do load testing
though 😂
➤Critical Paths
PLATFORM BEHAVIOUR
A
B
siteA.domain.com
siteB.domain.com
GUIDELINES
➤ Create your own test data.
➤ The naming convention of test data should be realistic.
➤ Do not play with other existing user’s data.
➤ Create your credentials to access the application.
➤ Never try load test on a production environment.
➤ Test only if there is less load on the application.
➤ Change emails/mail provider if you can
➤ Add to the logs / tagged output
BENEFITS
➤ Monitor behaviour realtime
➤ Run edge cases (network failure? Interrupted
calls)
➤ API responses are … real
➤ More bugs are detected
ENVIRONMENTS
Development
Development
Unit Test
Unit Test
QA
QA
Live
Live
Tests
Q&A (NOT QA)
IN SUMMARY
➤ Put unit tests in place
➤ Jon Clausen is a 🌟
➤ Make space for QA Testing
➤ Automate what you can
➤ Manually test what you can
➤ Performance Check
➤ Live testing
➤ with your own data
➤ Against metrics
➤ Log “invisible” actions
CMDdevelop • deploy • deliver
@markdrew
mark@cmdhq.io
http://cmdhq.io
Testing for fun in production Into The Box 2018

More Related Content

PDF
Integration testing - A&BP CC
PDF
Unit testing - A&BP CC
PDF
Testing Web Applications
PDF
Introducing Playwright's New Test Runner
PDF
Create an architecture for web test automation
PDF
vJUG - The JavaFX Ecosystem
PDF
Using Selenium to Improve a Teams Development Cycle
ODP
Integration Testing in Python
Integration testing - A&BP CC
Unit testing - A&BP CC
Testing Web Applications
Introducing Playwright's New Test Runner
Create an architecture for web test automation
vJUG - The JavaFX Ecosystem
Using Selenium to Improve a Teams Development Cycle
Integration Testing in Python

What's hot (20)

PPTX
JavaLand - Integration Testing How-to
PDF
Automated Testing in Angular Slides
PDF
Jenkins Pipelines Advanced
PDF
Jenkins Pipeline meets Oracle
PDF
Fullstack End-to-end test automation with Node.js, one year later
PDF
Node.js and Selenium Webdriver, a journey from the Java side
PDF
Web ui tests examples with selenide, nselene, selene & capybara
PPT
Testing Java Web Apps With Selenium
PDF
Rspec and Capybara Intro Tutorial at RailsConf 2013
PDF
Easy tests with Selenide and Easyb
PDF
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
PDF
Никита Галкин "Testing in Frontend World"
PPT
Testing in AngularJS
PPT
BDD with JBehave and Selenium
PDF
Codeception introduction and use in Yii
PDF
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
PDF
Enhance react app with patterns - part 1: higher order component
ZIP
Automated Frontend Testing
PDF
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
PPTX
CI / CD w/ Codeception
JavaLand - Integration Testing How-to
Automated Testing in Angular Slides
Jenkins Pipelines Advanced
Jenkins Pipeline meets Oracle
Fullstack End-to-end test automation with Node.js, one year later
Node.js and Selenium Webdriver, a journey from the Java side
Web ui tests examples with selenide, nselene, selene & capybara
Testing Java Web Apps With Selenium
Rspec and Capybara Intro Tutorial at RailsConf 2013
Easy tests with Selenide and Easyb
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Никита Галкин "Testing in Frontend World"
Testing in AngularJS
BDD with JBehave and Selenium
Codeception introduction and use in Yii
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Enhance react app with patterns - part 1: higher order component
Automated Frontend Testing
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
CI / CD w/ Codeception
Ad

Similar to Testing for fun in production Into The Box 2018 (20)

PDF
BDD Testing and Automating from the trenches - Presented at Into The Box June...
PDF
ITB2016 -BDD testing and automation from the trenches
PDF
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
PDF
Automated acceptance test
PDF
Agile Testing Pasadena JUG Aug2009
PDF
UPC Plone Testing Talk
PDF
Test & behavior driven development
PDF
Testing in FrontEnd World by Nikita Galkin
PDF
Intro To JavaScript Unit Testing - Ran Mizrahi
PPTX
Reality-Driven Testing using TestContainers
PPTX
Techorama 2017 - Testing the unit, and beyond.
PPTX
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
PPTX
Testing 101
PPTX
Test automation expert days
PDF
3 WAYS TO TEST YOUR COLDFUSION API
PDF
3 WAYS TO TEST YOUR COLDFUSION API -
PDF
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
PDF
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
PDF
Functional Testing - A Detailed Guide.pdf
PPT
Automated testing 101
BDD Testing and Automating from the trenches - Presented at Into The Box June...
ITB2016 -BDD testing and automation from the trenches
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Automated acceptance test
Agile Testing Pasadena JUG Aug2009
UPC Plone Testing Talk
Test & behavior driven development
Testing in FrontEnd World by Nikita Galkin
Intro To JavaScript Unit Testing - Ran Mizrahi
Reality-Driven Testing using TestContainers
Techorama 2017 - Testing the unit, and beyond.
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Testing 101
Test automation expert days
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API -
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
Functional Testing - A Detailed Guide.pdf
Automated testing 101
Ad

More from Ortus Solutions, Corp (20)

PDF
BoxLang in Japan - The Future is Dynamic.pdf
PDF
BoxLang Dynamic AWS Lambda - Japan Edition
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
PDF
June Webinar: BoxLang-Dynamic-AWS-Lambda
PDF
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
PDF
What's-New-with-BoxLang-Brad Wood.pptx.pdf
PDF
Getting Started with BoxLang - CFCamp 2025.pdf
PDF
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
PDF
What's New with BoxLang Led by Brad Wood.pdf
PDF
Vector Databases and the BoxLangCFML Developer.pdf
PDF
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
PDF
Use JSON to Slash Your Database Performance.pdf
PDF
Portable CI wGitLab and Github led by Gavin Pickin.pdf
PDF
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
PDF
Supercharging CommandBox with Let's Encrypt.pdf
PDF
Spice up your site with cool animations using GSAP..pdf
PDF
Passkeys and cbSecurity Led by Eric Peterson.pdf
PDF
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
PDF
Integrating the OpenAI API in Your Coldfusion Apps.pdf
PDF
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
BoxLang in Japan - The Future is Dynamic.pdf
BoxLang Dynamic AWS Lambda - Japan Edition
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
June Webinar: BoxLang-Dynamic-AWS-Lambda
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Getting Started with BoxLang - CFCamp 2025.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
What's New with BoxLang Led by Brad Wood.pdf
Vector Databases and the BoxLangCFML Developer.pdf
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Use JSON to Slash Your Database Performance.pdf
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Supercharging CommandBox with Let's Encrypt.pdf
Spice up your site with cool animations using GSAP..pdf
Passkeys and cbSecurity Led by Eric Peterson.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf

Recently uploaded (20)

PPT
Geologic Time for studying geology for geologist
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PPTX
Build Your First AI Agent with UiPath.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
Training Program for knowledge in solar cell and solar industry
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
STKI Israel Market Study 2025 version august
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Geologic Time for studying geology for geologist
OpenACC and Open Hackathons Monthly Highlights July 2025
NewMind AI Weekly Chronicles – August ’25 Week IV
sustainability-14-14877-v2.pddhzftheheeeee
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Build Your First AI Agent with UiPath.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Training Program for knowledge in solar cell and solar industry
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Early detection and classification of bone marrow changes in lumbar vertebrae...
STKI Israel Market Study 2025 version august
4 layer Arch & Reference Arch of IoT.pdf
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Basics of Cloud Computing - Cloud Ecosystem
Microsoft Excel 365/2024 Beginner's training
Enhancing plagiarism detection using data pre-processing and machine learning...
The influence of sentiment analysis in enhancing early warning system model f...
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf

Testing for fun in production Into The Box 2018