SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Containerize
your Blackbox
tests
Slides are Available on SlideShare
2
About Me
Software testing since 2005
● Desktop Applications
● Mobile Applications
● (Mobile) Device Drivers
● 802.11 B/G/WMM/WMM-PS
● Networking Devices (Routers/Switches)
● Load Balancing Appliances
● Software Defined Radios
● Web Applications
● Security Testing
3
The
Fine Print
Everything in this slide deck is either my own opinion coming from my own
personal experiences, or maybe Stack Overflow. In no way should anything from
this presentation be taken as how things are actually done at my current, former, or
future employers. All information is provided on an “AS IS” basis, without
warranties, and you the viewer accept all risks associated with the material herein.
4
Containers will not solve all of
your problems
› But they will solve some some of them
5
Testing Triangle
6
Basic Regression Topology
7
Regression
Node
Device/System
Under Test
We can’t update package X
because we don’t know if
package Y will still work.
Do our tests work with the
updated package X?
8
So, we updated package X, and
it doesn’t work anymore.
Also, we don’t actually know
what version package X was at
before...
9
Manually Created Test Executors
› Time consuming to create
› Often out of date.
› Apply security patches? It’s in the
lab, who cares?
› We should back it up but we don’t...
› We backed it up when we created it,
but haven’t updated the backup in years.
10
Solutions
› Robust backup strategy
› Move from physical systems to VM’s
› Robust snapshot strategy.
› Use Ansible/Puppet/Chef
› Containers
11
A new team member is starting,
how do we quickly get their
environment setup?
12
A Developer just did a large
refactor, the unit tests pass, but
they want to run the regression
suite before they merge their
branch...
13
Solutions
› Build a new System
› Clone a VM
› Use Ansible/Puppet/Chef
› Containers
14
Developer
Writes production code
Cares (hopefully) about
memory usage
Uses the best toolset for the
problem at hand, or the
toolset the rest of the team
is using
Developers and Testers are Different
Test Automator
Writes code to test other
code/systems
Not generally concerned about
efficiency/memory usage
(unless it becomes a problem)
Uses the best toolset to test
the system/device under test,
or the toolset the rest of the
team is using
15
Automated system tests
don’t often find problems.
Writing automated system
tests can find problems.
Typical Workflow
Running automation
afterwards usually makes
sure things don’t break after
being fixed.
Problems found are often
due to interactions between
components, and are
relatively straightforward.
16
Atypical Flow
1.
Developer writes new
code, commits it, plays a
game of foosball while CI
“works”
2.
Regression test suite runs,
and fails. DevTest
investigates to make sure
it isn’t an issue with the
automation.
3.
DevTest reviews logs,
determines its a legitimate
failure, tells Developer
about the problem.
4.
Developer can’t reproduce.
5.
Devtest can’t either
outside of the regression
suite, its some interaction
between a previous test
and the failing test.
6.
Developer is forced to
push changes and let CI
run to see if issues are
fixed. No one likes to see
the ❌next to their build.
17
Why Can’t Developers Just Run the Tests locally?
› Different environments that may not
play well together.
› Time consuming to spin up another
resource
› Expensive to have a dedicated test
environment for developers
› One more system to have to keep in
sync with the others.
› Tribal knowledge needed to run tests
18
Docker
Containers
Package your blackbox tests so
that they will run anywhere, and
by anyone.
No special tools, no secret
commands.
19
Why Containers?
› Images are Immutable.
› Images contain all dependencies
› Images are easy to share
› Dockerhub or Private Registry
› Easier then Ansible/Puppet/Chef
› Easy to integrate into CI/CD Pipelines
› Agents only need Docker installed
20
VM
● Clone an existing
devtest VM
● Resync from last clone
● Running VM’s take
resources
● Developers have to
know how to run the
tests
Developers running Regression Test Suites
Container
● Docker pull to get up to
date image
● Docker run to run tests
● Resources only being used
when tests are running
● Developers may still need
to know arguments for
how to run the tests.
21
Remedial Containers 0001
22
Remedial Containers 0001
Dockerfile
Text file that defines
how to create a
docker image.
Starts with a base
image
Add your secret
sauce
Entrypoint
Command (or script)
that gets run by
default when the
container is ran.
For containerized
blackbox tests, this
should be the
command needed to
run the tests.
Image
Contains the read-
only layers of the
container. When you
run a container, a
writeable layer is
added, which makes
the image itself
immutable.
23
>cat regression_test.py
#!/usr/bin/env python3
print(“Running Tests...”)
Containerize your blackbox tests
24
>ls
regression_test.py
Dockerfile
Containerize your blackbox tests
25
>cat Dockerfile
FROM python:3.6.8-slim-stretch
WORKDIR /tests
COPY . .
ENTRYPOINT python3 regression_test.py
Containerize your blackbox tests
26
>docker build -t regression -f Dockerfile .
Sending build context to Docker daemon 81.92kB
Step 1/3 : FROM python:3.6.9-slim-stretch
---> d4a811fcaf6a
Step 2/3 : COPY . .
---> 7573353bcfb1
Step 3/3 : ENTRYPOINT python3 regression_test.py
---> Running in 8c7563d2c6e6
Removing intermediate container 8c7563d2c6e6
---> 082942a6359c
Successfully built 082942a6359c
Successfully tagged regression:latest
Containerize your blackbox tests
27
>docker run regression
Running tests…
>docker run --entrypoint=pwd
/tests
>docker run --entrypoint=ls regression
Dockerfile
regression_test.py
Containerize your blackbox tests
28
#Start a container with an interactive bash shell
>docker run -it --entrypoint=/bin/bash regression
Debugging your Containerized
blackbox tests
29
Tag and Push docker
images to a registry to
allow others to be
able to use the image
without rebuilding
Docker Registry
Host your Own
Dockerhub
AWS
GCP
Azure
30
>docker build -t kjbeeman/regression:latest -f Dockerfile .
OR
>docker tag regression:latest kjbeeman/regression:latest
>docker push kjbeeman/regression:latest
Containerize your blackbox tests
31
What does this really give us?
32
Developers can run the tests by just
typing:
docker run kjbeeman/regression args
33
Regression environments only need
docker and Pipeline scripts just need...
docker run kjbeeman/regression args
34
>cat Dockerfile
FROM python:3.6.8-slim-stretch
COPY . .
ENTRYPOINT python3 regression_test.py
Upgrading Dependencies
35
>cat Dockerfile
FROM python:3.6.9-slim-stretch
COPY . .
ENTRYPOINT python3 regression_test.py
>cat Dockerfile
FROM python:3.6.8-slim-stretch
RUN apt-get update 
&& apt-get install -y gparted=0.16.1-1
COPY . .
RUN pipenv install --system
ENTRYPOINT python3 hello_world.py
Upgrading Dependencies
36
FROM python:3.6.8-slim-stretch
#Install Nmap
RUN apt-get update 
&& apt-get install -y libpcap-dev autoconf git wget build-essential checkinstall libpcre3-dev libssl-dev 
&& git clone https://github.com/nmap/nmap.git 
&& cd nmap 
&& ./configure 
&& make 
&& make install
WORKDIR /test
COPY . .
ENTRYPOINT python3 hello_world.py
Upgrading Dependencies
37
Dependencies Live with the Code
The regression tests prior to
Product Version 1.0.4 require
OpenSSL 1.0.X, but OpenSSL
1.1.x is required starting with
version 1.1.0
If you need to go back and
run regressions, you can pull
the specific git commit and
rebuild the image.
Much easier than
maintaining separate
regression environments for
the two product versions.
38
Containers make it easier to
what you need to do without
worrying about managing the
infrastructure that is running it.
39
Review
Less Frustration
Anyone can run the tests
without having to worry
about dependencies
Immutable
A working image is a
working image, you can’t
break it without creating a
new image.
Change is Safe
Dockerfile should be
version controlled. Easy to
make changes and revert if
needed.
Resources
Other than disk space,
containers use no
resources when they aren’t
being used
Scale
Easier to expand
regression environments.
Buzzwords
Container is the hip word
right now. Even Financial
Analyst on CNBC are
talking about it.
40
Next
Stop?
Serverless...
Maybe not today...
41
THANKS!
Any questions?
You can find me at:
kevinbeeman@gmail.com
Linked In: https://www.linkedin.com/in/kevinbeeman
GitHub: https://github.com/kjbeeman/regression
42
Credits
Special thanks to all the people who made
and released these awesome resources for
free:
› Presentation template by SlidesCarnival
› Photographs by Startupstockphotos
43

Weitere ähnliche Inhalte

Was ist angesagt?

ScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency InjectionScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency Injection7mind
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG Greg.Helton
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++TestEngineering Software Lab
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated TestingNick Pruehs
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
Testing in a microcontroller world
Testing in a microcontroller worldTesting in a microcontroller world
Testing in a microcontroller worldangelocompagnucci
 
You can now use PVS-Studio with Visual Studio absent; just give it the prepro...
You can now use PVS-Studio with Visual Studio absent; just give it the prepro...You can now use PVS-Studio with Visual Studio absent; just give it the prepro...
You can now use PVS-Studio with Visual Studio absent; just give it the prepro...Andrey Karpov
 
Automated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAutomated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAANDTech
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkArulalan T
 
Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTestRaihan Masud
 
Automated testing in Python and beyond
Automated testing in Python and beyondAutomated testing in Python and beyond
Automated testing in Python and beyonddn
 
New Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingNew Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingClever Moe
 
2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudsonShreeniwas Iyer
 
OpenDaylight Developer Experience 2.0
 OpenDaylight Developer Experience 2.0 OpenDaylight Developer Experience 2.0
OpenDaylight Developer Experience 2.0Michael Vorburger
 
Python Testing Fundamentals
Python Testing FundamentalsPython Testing Fundamentals
Python Testing Fundamentalscbcunc
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management toolRenato Primavera
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshotsClemens Reijnen
 
Google test training
Google test trainingGoogle test training
Google test trainingThierry Gayet
 

Was ist angesagt? (20)

ScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency InjectionScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency Injection
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++Test
 
Database Management Assignment Help
Database Management Assignment Help Database Management Assignment Help
Database Management Assignment Help
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Testing in a microcontroller world
Testing in a microcontroller worldTesting in a microcontroller world
Testing in a microcontroller world
 
You can now use PVS-Studio with Visual Studio absent; just give it the prepro...
You can now use PVS-Studio with Visual Studio absent; just give it the prepro...You can now use PVS-Studio with Visual Studio absent; just give it the prepro...
You can now use PVS-Studio with Visual Studio absent; just give it the prepro...
 
Automated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAutomated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in Action
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-framework
 
Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTest
 
Automated testing in Python and beyond
Automated testing in Python and beyondAutomated testing in Python and beyond
Automated testing in Python and beyond
 
New Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingNew Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX Testing
 
Qtp
QtpQtp
Qtp
 
2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson
 
OpenDaylight Developer Experience 2.0
 OpenDaylight Developer Experience 2.0 OpenDaylight Developer Experience 2.0
OpenDaylight Developer Experience 2.0
 
Python Testing Fundamentals
Python Testing FundamentalsPython Testing Fundamentals
Python Testing Fundamentals
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshots
 
Google test training
Google test trainingGoogle test training
Google test training
 

Ähnlich wie Containerize your Blackbox tests

Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareLaura Frank Tacho
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarGiel Tettelaar
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Controlelliando dias
 
Continuous Integration Testing in Django
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in DjangoKevin Harvey
 
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...OW2
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleArnaud LEMAIRE
 
"Docker best practice", Станислав Коленкин (senior devops, DataArt)
"Docker best practice", Станислав Коленкин (senior devops, DataArt)"Docker best practice", Станислав Коленкин (senior devops, DataArt)
"Docker best practice", Станислав Коленкин (senior devops, DataArt)DataArt
 
DockerCon EU 2015: Stop Being Lazy and Test Your Software!
DockerCon EU 2015: Stop Being Lazy and Test Your Software!DockerCon EU 2015: Stop Being Lazy and Test Your Software!
DockerCon EU 2015: Stop Being Lazy and Test Your Software!Docker, Inc.
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldDevOps.com
 
CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)Borislav Traykov
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Richard Bullington-McGuire
 
Resilience Testing
Resilience Testing Resilience Testing
Resilience Testing Ran Levy
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)Jérôme Petazzoni
 
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil KumarXP Conference India
 
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdfDifferent Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdfpCloudy
 

Ähnlich wie Containerize your Blackbox tests (20)

Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your Software
 
Automating the Quality
Automating the QualityAutomating the Quality
Automating the Quality
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel Tettelar
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Control
 
Continuous Integration Testing in Django
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in Django
 
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
 
"Docker best practice", Станислав Коленкин (senior devops, DataArt)
"Docker best practice", Станислав Коленкин (senior devops, DataArt)"Docker best practice", Станислав Коленкин (senior devops, DataArt)
"Docker best practice", Станислав Коленкин (senior devops, DataArt)
 
DockerCon EU 2015: Stop Being Lazy and Test Your Software!
DockerCon EU 2015: Stop Being Lazy and Test Your Software!DockerCon EU 2015: Stop Being Lazy and Test Your Software!
DockerCon EU 2015: Stop Being Lazy and Test Your Software!
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Resilience Testing
Resilience Testing Resilience Testing
Resilience Testing
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)
 
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
 
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdfDifferent Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
 

Kürzlich hochgeladen

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

Containerize your Blackbox tests

  • 2. Slides are Available on SlideShare 2
  • 3. About Me Software testing since 2005 ● Desktop Applications ● Mobile Applications ● (Mobile) Device Drivers ● 802.11 B/G/WMM/WMM-PS ● Networking Devices (Routers/Switches) ● Load Balancing Appliances ● Software Defined Radios ● Web Applications ● Security Testing 3
  • 4. The Fine Print Everything in this slide deck is either my own opinion coming from my own personal experiences, or maybe Stack Overflow. In no way should anything from this presentation be taken as how things are actually done at my current, former, or future employers. All information is provided on an “AS IS” basis, without warranties, and you the viewer accept all risks associated with the material herein. 4
  • 5. Containers will not solve all of your problems › But they will solve some some of them 5
  • 8. We can’t update package X because we don’t know if package Y will still work. Do our tests work with the updated package X? 8
  • 9. So, we updated package X, and it doesn’t work anymore. Also, we don’t actually know what version package X was at before... 9
  • 10. Manually Created Test Executors › Time consuming to create › Often out of date. › Apply security patches? It’s in the lab, who cares? › We should back it up but we don’t... › We backed it up when we created it, but haven’t updated the backup in years. 10
  • 11. Solutions › Robust backup strategy › Move from physical systems to VM’s › Robust snapshot strategy. › Use Ansible/Puppet/Chef › Containers 11
  • 12. A new team member is starting, how do we quickly get their environment setup? 12
  • 13. A Developer just did a large refactor, the unit tests pass, but they want to run the regression suite before they merge their branch... 13
  • 14. Solutions › Build a new System › Clone a VM › Use Ansible/Puppet/Chef › Containers 14
  • 15. Developer Writes production code Cares (hopefully) about memory usage Uses the best toolset for the problem at hand, or the toolset the rest of the team is using Developers and Testers are Different Test Automator Writes code to test other code/systems Not generally concerned about efficiency/memory usage (unless it becomes a problem) Uses the best toolset to test the system/device under test, or the toolset the rest of the team is using 15
  • 16. Automated system tests don’t often find problems. Writing automated system tests can find problems. Typical Workflow Running automation afterwards usually makes sure things don’t break after being fixed. Problems found are often due to interactions between components, and are relatively straightforward. 16
  • 17. Atypical Flow 1. Developer writes new code, commits it, plays a game of foosball while CI “works” 2. Regression test suite runs, and fails. DevTest investigates to make sure it isn’t an issue with the automation. 3. DevTest reviews logs, determines its a legitimate failure, tells Developer about the problem. 4. Developer can’t reproduce. 5. Devtest can’t either outside of the regression suite, its some interaction between a previous test and the failing test. 6. Developer is forced to push changes and let CI run to see if issues are fixed. No one likes to see the ❌next to their build. 17
  • 18. Why Can’t Developers Just Run the Tests locally? › Different environments that may not play well together. › Time consuming to spin up another resource › Expensive to have a dedicated test environment for developers › One more system to have to keep in sync with the others. › Tribal knowledge needed to run tests 18
  • 19. Docker Containers Package your blackbox tests so that they will run anywhere, and by anyone. No special tools, no secret commands. 19
  • 20. Why Containers? › Images are Immutable. › Images contain all dependencies › Images are easy to share › Dockerhub or Private Registry › Easier then Ansible/Puppet/Chef › Easy to integrate into CI/CD Pipelines › Agents only need Docker installed 20
  • 21. VM ● Clone an existing devtest VM ● Resync from last clone ● Running VM’s take resources ● Developers have to know how to run the tests Developers running Regression Test Suites Container ● Docker pull to get up to date image ● Docker run to run tests ● Resources only being used when tests are running ● Developers may still need to know arguments for how to run the tests. 21
  • 23. Remedial Containers 0001 Dockerfile Text file that defines how to create a docker image. Starts with a base image Add your secret sauce Entrypoint Command (or script) that gets run by default when the container is ran. For containerized blackbox tests, this should be the command needed to run the tests. Image Contains the read- only layers of the container. When you run a container, a writeable layer is added, which makes the image itself immutable. 23
  • 24. >cat regression_test.py #!/usr/bin/env python3 print(“Running Tests...”) Containerize your blackbox tests 24
  • 26. >cat Dockerfile FROM python:3.6.8-slim-stretch WORKDIR /tests COPY . . ENTRYPOINT python3 regression_test.py Containerize your blackbox tests 26
  • 27. >docker build -t regression -f Dockerfile . Sending build context to Docker daemon 81.92kB Step 1/3 : FROM python:3.6.9-slim-stretch ---> d4a811fcaf6a Step 2/3 : COPY . . ---> 7573353bcfb1 Step 3/3 : ENTRYPOINT python3 regression_test.py ---> Running in 8c7563d2c6e6 Removing intermediate container 8c7563d2c6e6 ---> 082942a6359c Successfully built 082942a6359c Successfully tagged regression:latest Containerize your blackbox tests 27
  • 28. >docker run regression Running tests… >docker run --entrypoint=pwd /tests >docker run --entrypoint=ls regression Dockerfile regression_test.py Containerize your blackbox tests 28
  • 29. #Start a container with an interactive bash shell >docker run -it --entrypoint=/bin/bash regression Debugging your Containerized blackbox tests 29
  • 30. Tag and Push docker images to a registry to allow others to be able to use the image without rebuilding Docker Registry Host your Own Dockerhub AWS GCP Azure 30
  • 31. >docker build -t kjbeeman/regression:latest -f Dockerfile . OR >docker tag regression:latest kjbeeman/regression:latest >docker push kjbeeman/regression:latest Containerize your blackbox tests 31
  • 32. What does this really give us? 32
  • 33. Developers can run the tests by just typing: docker run kjbeeman/regression args 33
  • 34. Regression environments only need docker and Pipeline scripts just need... docker run kjbeeman/regression args 34
  • 35. >cat Dockerfile FROM python:3.6.8-slim-stretch COPY . . ENTRYPOINT python3 regression_test.py Upgrading Dependencies 35 >cat Dockerfile FROM python:3.6.9-slim-stretch COPY . . ENTRYPOINT python3 regression_test.py
  • 36. >cat Dockerfile FROM python:3.6.8-slim-stretch RUN apt-get update && apt-get install -y gparted=0.16.1-1 COPY . . RUN pipenv install --system ENTRYPOINT python3 hello_world.py Upgrading Dependencies 36
  • 37. FROM python:3.6.8-slim-stretch #Install Nmap RUN apt-get update && apt-get install -y libpcap-dev autoconf git wget build-essential checkinstall libpcre3-dev libssl-dev && git clone https://github.com/nmap/nmap.git && cd nmap && ./configure && make && make install WORKDIR /test COPY . . ENTRYPOINT python3 hello_world.py Upgrading Dependencies 37
  • 38. Dependencies Live with the Code The regression tests prior to Product Version 1.0.4 require OpenSSL 1.0.X, but OpenSSL 1.1.x is required starting with version 1.1.0 If you need to go back and run regressions, you can pull the specific git commit and rebuild the image. Much easier than maintaining separate regression environments for the two product versions. 38
  • 39. Containers make it easier to what you need to do without worrying about managing the infrastructure that is running it. 39
  • 40. Review Less Frustration Anyone can run the tests without having to worry about dependencies Immutable A working image is a working image, you can’t break it without creating a new image. Change is Safe Dockerfile should be version controlled. Easy to make changes and revert if needed. Resources Other than disk space, containers use no resources when they aren’t being used Scale Easier to expand regression environments. Buzzwords Container is the hip word right now. Even Financial Analyst on CNBC are talking about it. 40
  • 42. THANKS! Any questions? You can find me at: kevinbeeman@gmail.com Linked In: https://www.linkedin.com/in/kevinbeeman GitHub: https://github.com/kjbeeman/regression 42
  • 43. Credits Special thanks to all the people who made and released these awesome resources for free: › Presentation template by SlidesCarnival › Photographs by Startupstockphotos 43

Hinweis der Redaktion

  1. I made this version of the triangle in ms paint, but we’ve all seen this before.
  2. I made this version of the triangle in ms paint, but we’ve all seen this before.