SlideShare une entreprise Scribd logo
1  sur  29
CODE COVERAGE FOR
TOTAL SECURITY IN
APPLICATION MIGRATIONS
How to prepare for and confirm with confidence that your application is
working as intended after a major migration.
https://joind.in/talk/e386f
SR. WEB APPLICATION ARCHITECT
DANA H LUTHER
@danaluther
dluther@envisageinternational.com
https://www.linkedin.com/in/danaluther/
WHAT IS ENVISAGE?
Envisage International Corporation is an international education marketing
company serving students and schools around the world. Our student-
focused sites offer relevant information, targeted tools, unique resources and
valuable products for international students and educators.
ESLdirectory
THE AGE OLD QUESTION….
When do we upgrade?!
OMG … PHP7 is
OUT!!
Did you see the
new Bootstrap?!
Ooh .. Look a
MySQL update!
Uh, guys, this site is
behind by 2 full Bootstrap
versions…
Look at all the
new features in
Yii2!
Ugh – have you seen
this? It’s still in
columnal…
Wow, look at these
includes…with more
includes in them…
THE TIPPING POINT
As long as the risks outweigh the rewards, you’ll never upgrade. All things
being equal … you probably won’t upgrade. You have to tip the scales.
LETS DO IT!
Don’t wait until the balance tips because you’ve added
‘threat of impending doom’
to the reward side of the equation!
Eh, I don’t
know…
Risk Reward
Increase your reward … or minimize your risk? Which is easier??
Cost
HOW DO WE MAKE IT LESS RISKY?
Testing suites with Code Coverage!
Our test suites can answer the following questions:
How will we make things better?
• What was the performance improvement?
• What do we tell ‘the boss’ when s/he asks what the
potential risks are?
Will we BREAK anything?
• Infrequently used features?
• Custom JavaScript or CSS?
• All previous functionality should be present and
working as intended!
OK SO WE NEED TO TEST …
HOW DO WE DO THAT?
Codeception has supported modules for the following frameworks, to
name a few, built in:
• Symfony
• Laravel
• WordPress
• Joomla
• Yii
• Zend Framework
Codeception Tests with --coverage
http://codeception.com/
WHAT ARE WE GOING TO
COVER?
• No, not all the things … but close!
• 80-100% coverage is the goal!
START WITH A CLEAN SLATE
The biggest job is actually going to come *before* you do your migration.
Before we upgrade, we need 80-100% Coverage with (ideally) all tests in the Green!
Have something you know isn’t working? Document it!
DOWNLOAD CODECEPTION
Add the composer requirement, and run composer update (if you do not have Codeception globally
installed).
http://codeception.com/quickstart
./vendor/bin/yiic webapp ./
INSTALL CODECEPTION> ./vendor/bin/codecept bootstrap
Default codeception.yml
SAMPLE
CODECEPTION.YML
Mileage may vary :p
SAMPLE UNIT.YML FILE
Using the modules, this unit test is updated to use the Yii2 module, and enable the orm, email and fixture
elements of that model.
SAMPLE FUNCTIONAL.YML FILE
For the functional test suite, you will probably need some additional modules and helpers.
Ensure that your configuration files are pointing to the proper test server locations.
SAMPLE
ACCEPTANCE.YML
FILE
Using the WebDriver module for the
acceptance tests allows us to test the
pages with JavaScript enabled.
Need help getting your configuration
right for your framework? Check the
‘Case Study’ section of the
Codeception website for specifics on
your framework.
http://codeception.com/for/yii
RUN THE SUITE!
> ./vendor/bin/codecept run
… Meh … but it works!
Move the existing PHPUnit tests to the
new tests/unit/ folder and try again…
> php –S localhost:8080
Make sure your local webserver is running before you try to run the suite!
FIXTURE DATA
Your tests are only as good as the data that
you’re using!
False Sense of Security:
• Using ”1” as the ID for everything (No!!)
• Checking for a result without checking the
details of the result (Also No!!)
Use Fixtures specific to your Needs:
• Alternate fixtures for detailed scenarios
• Fixtures take time to load!! Large fixture data
sets should only be included where
necessary.
FAKED FIXTURE DATA https://github.com/fzaninotto/Faker
composer require fzaninotto/faker
ORGANIZE
• The @group tag:
• Modules
• Client/API Systems
• Issue based
• Filesystem Structure
> codecept run --group=EGI-1125
> codecept run --group=newsletter
> codecept run --skip-group=api
> codecept run unit pax/
> codecept run unit pax/:FindAll
RUN YOUR TEST SUITE WITH
COVERAGE
>codecept run unit --coverage --coverage-html
DON’T OVERDO IT
The @covers tag is a love/hate relationship.
http://codeception.com/docs/11-Codecoverage
😀😡😭😍
REVIEW COVERAGE OUTPUT
GOT IT ALL COVERED? SWEET, LET’S DO THIS!
WHAT’S OUR DEV. BOX SETUP?
Docker
If you’re running in a Docker
environment, and you want to test
against various versions of PHP or
MySQL, then your job is easy!
Just swap out your Docker images for
PHP or MySQL for the version you
want to test. Relaunch your image
and run your tests.
Virtual Machine
If you are using a VM for your testing
environment, without Docker, then
your upgrade process is going to be
a little trickier, and it’s a good idea to
get a solid snapshot of your VM state
before you start apt-get upgrading
your PHP, MySQL or whatever.
Dev Machine
If your dev machine is your localhost,
you don’t really have much room for
going backward if things don’t
proceed well, unless you’re happy to
play with restoring nightly backups.
Aaand… go!
Whether it’s an apt-get update, a composer update, or whatever the case may be, this is the point at which the actual
system migration should occur – then we’re back to testing!
THE UPGRADE / REVIEW LIFECYCLE
Refactor/
Update
Test
Refactor/
Update
Test
Refactor/
Update
Test
Upgrade
underlying system
Test for green!
TEST SUITE STATUS CHECK
Errors and Failures?
• Cycle back through unit by unit to
focus on addressing the issues
revealed by the tests.
• Leverage the @group tags to
narrow your focus down to specific
test groups
All Green?
• Go for the –coverage-html check,
and if you’re still all green with 80-
100% coverage, then you can give
the green light to releasing the
upgrade to production!
👍 GOOD TO GO!
Once all your tests are showing green across the board and coverage is
confirmed at 80-100%, you're ready to deploy your upgrade to production
and can say with CERTAINTY that your new system is compatible and ready to
go!
• You’ve had a dry run of the upgrade process
• All features are covered and passing:
• No nasty surprises at launch.
• Everyone goes home on time!
• Clients are all happy! (or not, is there such a thing?)
QUESTIONS?
DANA H LUTHER
@danaluther
dluther@envisageinternational.com
https://www.linkedin.com/in/danaluther/
https://joind.in/talk/e386f

Contenu connexe

Tendances

Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciAtlassian
 
Unikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computingUnikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computingMotiejus Jakštys
 
Beyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsBeyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsSauce Labs
 
Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...
Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...
Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...Windows Developer
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conferenceIsaac Murchie
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
Continuous Testing in the Cloud
Continuous Testing in the CloudContinuous Testing in the Cloud
Continuous Testing in the CloudSauce Labs
 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StorySauce Labs
 
Sauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Sauce Labs
 
Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingAustin Marie Gay
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable productJulian Simpson
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingKatie Chin
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestOnur Baskirt
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, UkraineJustin Ison
 
How to Get Started with Cypress
How to Get Started with CypressHow to Get Started with Cypress
How to Get Started with CypressApplitools
 
Selenium conference, 2016
Selenium conference, 2016Selenium conference, 2016
Selenium conference, 2016Pooja Shah
 
Cross browser testing
Cross browser testingCross browser testing
Cross browser testingSauce Labs
 
Automatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabsAutomatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabsJoseph Chiang
 

Tendances (20)

Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
 
Unikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computingUnikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computing
 
Beyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsBeyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms Organizations
 
Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...
Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...
Build 2017 - B8093 - Nextgen UWP app distribution: Building extensible, strea...
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conference
 
Async webdriverjs
Async webdriverjsAsync webdriverjs
Async webdriverjs
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Continuous Testing in the Cloud
Continuous Testing in the CloudContinuous Testing in the Cloud
Continuous Testing in the Cloud
 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life Story
 
Sauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFS
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced Testing
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End Testing
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
 
How to Get Started with Cypress
How to Get Started with CypressHow to Get Started with Cypress
How to Get Started with Cypress
 
Selenium conference, 2016
Selenium conference, 2016Selenium conference, 2016
Selenium conference, 2016
 
Cross browser testing
Cross browser testingCross browser testing
Cross browser testing
 
Automatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabsAutomatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabs
 

En vedette

SunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQLSunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQLGabriela Ferrara
 
Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017Colin O'Dell
 
Dip Your Toes in the Sea of Security
Dip Your Toes in the Sea of SecurityDip Your Toes in the Sea of Security
Dip Your Toes in the Sea of SecurityJames Titcumb
 
A World Without PHP
A World Without PHPA World Without PHP
A World Without PHPBen Marks
 
Learn To Test Like A Grumpy Programmer - 3 hour workshop
Learn To Test Like A Grumpy Programmer - 3 hour workshopLearn To Test Like A Grumpy Programmer - 3 hour workshop
Learn To Test Like A Grumpy Programmer - 3 hour workshopchartjes
 
Amp your site: An intro to accelerated mobile pages
Amp your site: An intro to accelerated mobile pagesAmp your site: An intro to accelerated mobile pages
Amp your site: An intro to accelerated mobile pagesRobert McFrazier
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
JWT - To authentication and beyond!
JWT - To authentication and beyond!JWT - To authentication and beyond!
JWT - To authentication and beyond!Luís Cobucci
 
A recommendation engine for your php application
A recommendation engine for your php applicationA recommendation engine for your php application
A recommendation engine for your php applicationMichele Orselli
 
PHP UK 2017 - Don't Lose Sleep - Secure Your REST
PHP UK 2017 - Don't Lose Sleep - Secure Your RESTPHP UK 2017 - Don't Lose Sleep - Secure Your REST
PHP UK 2017 - Don't Lose Sleep - Secure Your RESTAdam Englander
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPChris Tankersley
 
PHP Benelux 2017 - Caching The Right Way
PHP Benelux 2017 -  Caching The Right WayPHP Benelux 2017 -  Caching The Right Way
PHP Benelux 2017 - Caching The Right WayAndré Rømcke
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...
Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...
Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...James Titcumb
 
Amp your site an intro to accelerated mobile pages
Amp your site  an intro to accelerated mobile pagesAmp your site  an intro to accelerated mobile pages
Amp your site an intro to accelerated mobile pagesRobert McFrazier
 
Zend Framework Foundations
Zend Framework FoundationsZend Framework Foundations
Zend Framework FoundationsChuck Reeves
 
php[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Upphp[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground UpJoe Ferguson
 
Presentation Bulgaria PHP
Presentation Bulgaria PHPPresentation Bulgaria PHP
Presentation Bulgaria PHPAlena Holligan
 

En vedette (20)

SunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQLSunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQL
 
Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017
 
Engineer - Mastering the Art of Software
Engineer - Mastering the Art of SoftwareEngineer - Mastering the Art of Software
Engineer - Mastering the Art of Software
 
Dip Your Toes in the Sea of Security
Dip Your Toes in the Sea of SecurityDip Your Toes in the Sea of Security
Dip Your Toes in the Sea of Security
 
A World Without PHP
A World Without PHPA World Without PHP
A World Without PHP
 
Learn To Test Like A Grumpy Programmer - 3 hour workshop
Learn To Test Like A Grumpy Programmer - 3 hour workshopLearn To Test Like A Grumpy Programmer - 3 hour workshop
Learn To Test Like A Grumpy Programmer - 3 hour workshop
 
Amp your site: An intro to accelerated mobile pages
Amp your site: An intro to accelerated mobile pagesAmp your site: An intro to accelerated mobile pages
Amp your site: An intro to accelerated mobile pages
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
JWT - To authentication and beyond!
JWT - To authentication and beyond!JWT - To authentication and beyond!
JWT - To authentication and beyond!
 
A recommendation engine for your php application
A recommendation engine for your php applicationA recommendation engine for your php application
A recommendation engine for your php application
 
PHP UK 2017 - Don't Lose Sleep - Secure Your REST
PHP UK 2017 - Don't Lose Sleep - Secure Your RESTPHP UK 2017 - Don't Lose Sleep - Secure Your REST
PHP UK 2017 - Don't Lose Sleep - Secure Your REST
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHP
 
PHP Benelux 2017 - Caching The Right Way
PHP Benelux 2017 -  Caching The Right WayPHP Benelux 2017 -  Caching The Right Way
PHP Benelux 2017 - Caching The Right Way
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...
Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...
Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...
 
Hack the Future
Hack the FutureHack the Future
Hack the Future
 
Amp your site an intro to accelerated mobile pages
Amp your site  an intro to accelerated mobile pagesAmp your site  an intro to accelerated mobile pages
Amp your site an intro to accelerated mobile pages
 
Zend Framework Foundations
Zend Framework FoundationsZend Framework Foundations
Zend Framework Foundations
 
php[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Upphp[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Up
 
Create, test, secure, repeat
Create, test, secure, repeatCreate, test, secure, repeat
Create, test, secure, repeat
 
Presentation Bulgaria PHP
Presentation Bulgaria PHPPresentation Bulgaria PHP
Presentation Bulgaria PHP
 

Similaire à Code Coverage for Total Security in Application Migrations

SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal infoSynapseindiappsdevelopment
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]Dynatrace
 
Adrian marinica continuous integration in the visual studio world
Adrian marinica   continuous integration in the visual studio worldAdrian marinica   continuous integration in the visual studio world
Adrian marinica continuous integration in the visual studio worldCodecamp Romania
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaAmazon Web Services
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings10n Software, LLC
 
Best practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on SalesforceBest practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on SalesforceAIMDek Technologies
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeConfoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeSteve Mercier
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated DeploymentMichael Peacock
 
Automated Deployment
Automated DeploymentAutomated Deployment
Automated Deploymentphpne
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)danielputerman
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Ivo Jansch
 
Frontend testing of (legacy) websites
Frontend testing of (legacy) websitesFrontend testing of (legacy) websites
Frontend testing of (legacy) websitesMichael Kubovic
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroSteven Pignataro
 
Prescriptive System Security with InSpec
Prescriptive System Security with InSpecPrescriptive System Security with InSpec
Prescriptive System Security with InSpecAll Things Open
 
Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019Mandi Walls
 
Harman deepak v - agile on steriod - dev ops led transformation
Harman  deepak v - agile on steriod - dev ops led transformationHarman  deepak v - agile on steriod - dev ops led transformation
Harman deepak v - agile on steriod - dev ops led transformationXebia India
 

Similaire à Code Coverage for Total Security in Application Migrations (20)

SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
 
Adrian marinica continuous integration in the visual studio world
Adrian marinica   continuous integration in the visual studio worldAdrian marinica   continuous integration in the visual studio world
Adrian marinica continuous integration in the visual studio world
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings
 
Best practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on SalesforceBest practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on Salesforce
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeConfoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
 
Automated Deployment
Automated DeploymentAutomated Deployment
Automated Deployment
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
Frontend testing of (legacy) websites
Frontend testing of (legacy) websitesFrontend testing of (legacy) websites
Frontend testing of (legacy) websites
 
Agility Requires Safety
Agility Requires SafetyAgility Requires Safety
Agility Requires Safety
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
 
Prescriptive System Security with InSpec
Prescriptive System Security with InSpecPrescriptive System Security with InSpec
Prescriptive System Security with InSpec
 
Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019
 
Harman deepak v - agile on steriod - dev ops led transformation
Harman  deepak v - agile on steriod - dev ops led transformationHarman  deepak v - agile on steriod - dev ops led transformation
Harman deepak v - agile on steriod - dev ops led transformation
 

Plus de Dana Luther

Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
How to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHPHow to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHPDana Luther
 
Keep it Secret, Keep it Safe - Docker Secrets and DI
Keep it Secret, Keep it Safe - Docker Secrets and DIKeep it Secret, Keep it Safe - Docker Secrets and DI
Keep it Secret, Keep it Safe - Docker Secrets and DIDana Luther
 
Integrated Feature Management - Using Feature Flags - PHPSerbia
Integrated Feature Management - Using Feature Flags - PHPSerbiaIntegrated Feature Management - Using Feature Flags - PHPSerbia
Integrated Feature Management - Using Feature Flags - PHPSerbiaDana Luther
 
Integrated Feature Management - Using Feature Flags - MidwestPHP
Integrated Feature Management - Using Feature Flags - MidwestPHPIntegrated Feature Management - Using Feature Flags - MidwestPHP
Integrated Feature Management - Using Feature Flags - MidwestPHPDana Luther
 
Integrated Feature Management - Using Feature Flags - SunshinePHP
Integrated Feature Management - Using Feature Flags - SunshinePHPIntegrated Feature Management - Using Feature Flags - SunshinePHP
Integrated Feature Management - Using Feature Flags - SunshinePHPDana Luther
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPDana Luther
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stackDana Luther
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Dana Luther
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaDana Luther
 
Converting your DEV Environment to a Docker Stack - ZCOE18
Converting your DEV Environment to a Docker Stack - ZCOE18Converting your DEV Environment to a Docker Stack - ZCOE18
Converting your DEV Environment to a Docker Stack - ZCOE18Dana Luther
 
Converting Your DEV Environment to a Docker Stack
Converting Your DEV Environment to a Docker StackConverting Your DEV Environment to a Docker Stack
Converting Your DEV Environment to a Docker StackDana Luther
 

Plus de Dana Luther (12)

Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
How to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHPHow to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHP
 
Keep it Secret, Keep it Safe - Docker Secrets and DI
Keep it Secret, Keep it Safe - Docker Secrets and DIKeep it Secret, Keep it Safe - Docker Secrets and DI
Keep it Secret, Keep it Safe - Docker Secrets and DI
 
Integrated Feature Management - Using Feature Flags - PHPSerbia
Integrated Feature Management - Using Feature Flags - PHPSerbiaIntegrated Feature Management - Using Feature Flags - PHPSerbia
Integrated Feature Management - Using Feature Flags - PHPSerbia
 
Integrated Feature Management - Using Feature Flags - MidwestPHP
Integrated Feature Management - Using Feature Flags - MidwestPHPIntegrated Feature Management - Using Feature Flags - MidwestPHP
Integrated Feature Management - Using Feature Flags - MidwestPHP
 
Integrated Feature Management - Using Feature Flags - SunshinePHP
Integrated Feature Management - Using Feature Flags - SunshinePHPIntegrated Feature Management - Using Feature Flags - SunshinePHP
Integrated Feature Management - Using Feature Flags - SunshinePHP
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - Cascadia
 
Converting your DEV Environment to a Docker Stack - ZCOE18
Converting your DEV Environment to a Docker Stack - ZCOE18Converting your DEV Environment to a Docker Stack - ZCOE18
Converting your DEV Environment to a Docker Stack - ZCOE18
 
Converting Your DEV Environment to a Docker Stack
Converting Your DEV Environment to a Docker StackConverting Your DEV Environment to a Docker Stack
Converting Your DEV Environment to a Docker Stack
 

Dernier

S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxNadaHaitham1
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 

Dernier (20)

S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 

Code Coverage for Total Security in Application Migrations

  • 1. CODE COVERAGE FOR TOTAL SECURITY IN APPLICATION MIGRATIONS How to prepare for and confirm with confidence that your application is working as intended after a major migration. https://joind.in/talk/e386f
  • 2. SR. WEB APPLICATION ARCHITECT DANA H LUTHER @danaluther dluther@envisageinternational.com https://www.linkedin.com/in/danaluther/
  • 3. WHAT IS ENVISAGE? Envisage International Corporation is an international education marketing company serving students and schools around the world. Our student- focused sites offer relevant information, targeted tools, unique resources and valuable products for international students and educators. ESLdirectory
  • 4. THE AGE OLD QUESTION…. When do we upgrade?! OMG … PHP7 is OUT!! Did you see the new Bootstrap?! Ooh .. Look a MySQL update! Uh, guys, this site is behind by 2 full Bootstrap versions… Look at all the new features in Yii2! Ugh – have you seen this? It’s still in columnal… Wow, look at these includes…with more includes in them…
  • 5. THE TIPPING POINT As long as the risks outweigh the rewards, you’ll never upgrade. All things being equal … you probably won’t upgrade. You have to tip the scales. LETS DO IT! Don’t wait until the balance tips because you’ve added ‘threat of impending doom’ to the reward side of the equation! Eh, I don’t know… Risk Reward Increase your reward … or minimize your risk? Which is easier?? Cost
  • 6. HOW DO WE MAKE IT LESS RISKY? Testing suites with Code Coverage! Our test suites can answer the following questions: How will we make things better? • What was the performance improvement? • What do we tell ‘the boss’ when s/he asks what the potential risks are? Will we BREAK anything? • Infrequently used features? • Custom JavaScript or CSS? • All previous functionality should be present and working as intended!
  • 7. OK SO WE NEED TO TEST … HOW DO WE DO THAT? Codeception has supported modules for the following frameworks, to name a few, built in: • Symfony • Laravel • WordPress • Joomla • Yii • Zend Framework Codeception Tests with --coverage http://codeception.com/
  • 8. WHAT ARE WE GOING TO COVER? • No, not all the things … but close! • 80-100% coverage is the goal!
  • 9. START WITH A CLEAN SLATE The biggest job is actually going to come *before* you do your migration. Before we upgrade, we need 80-100% Coverage with (ideally) all tests in the Green! Have something you know isn’t working? Document it!
  • 10. DOWNLOAD CODECEPTION Add the composer requirement, and run composer update (if you do not have Codeception globally installed). http://codeception.com/quickstart ./vendor/bin/yiic webapp ./
  • 11. INSTALL CODECEPTION> ./vendor/bin/codecept bootstrap Default codeception.yml
  • 13. SAMPLE UNIT.YML FILE Using the modules, this unit test is updated to use the Yii2 module, and enable the orm, email and fixture elements of that model.
  • 14. SAMPLE FUNCTIONAL.YML FILE For the functional test suite, you will probably need some additional modules and helpers. Ensure that your configuration files are pointing to the proper test server locations.
  • 15. SAMPLE ACCEPTANCE.YML FILE Using the WebDriver module for the acceptance tests allows us to test the pages with JavaScript enabled. Need help getting your configuration right for your framework? Check the ‘Case Study’ section of the Codeception website for specifics on your framework. http://codeception.com/for/yii
  • 16. RUN THE SUITE! > ./vendor/bin/codecept run … Meh … but it works! Move the existing PHPUnit tests to the new tests/unit/ folder and try again… > php –S localhost:8080 Make sure your local webserver is running before you try to run the suite!
  • 17. FIXTURE DATA Your tests are only as good as the data that you’re using! False Sense of Security: • Using ”1” as the ID for everything (No!!) • Checking for a result without checking the details of the result (Also No!!) Use Fixtures specific to your Needs: • Alternate fixtures for detailed scenarios • Fixtures take time to load!! Large fixture data sets should only be included where necessary.
  • 18. FAKED FIXTURE DATA https://github.com/fzaninotto/Faker composer require fzaninotto/faker
  • 19. ORGANIZE • The @group tag: • Modules • Client/API Systems • Issue based • Filesystem Structure > codecept run --group=EGI-1125 > codecept run --group=newsletter > codecept run --skip-group=api > codecept run unit pax/ > codecept run unit pax/:FindAll
  • 20. RUN YOUR TEST SUITE WITH COVERAGE >codecept run unit --coverage --coverage-html
  • 21. DON’T OVERDO IT The @covers tag is a love/hate relationship. http://codeception.com/docs/11-Codecoverage 😀😡😭😍
  • 23. GOT IT ALL COVERED? SWEET, LET’S DO THIS!
  • 24. WHAT’S OUR DEV. BOX SETUP? Docker If you’re running in a Docker environment, and you want to test against various versions of PHP or MySQL, then your job is easy! Just swap out your Docker images for PHP or MySQL for the version you want to test. Relaunch your image and run your tests. Virtual Machine If you are using a VM for your testing environment, without Docker, then your upgrade process is going to be a little trickier, and it’s a good idea to get a solid snapshot of your VM state before you start apt-get upgrading your PHP, MySQL or whatever. Dev Machine If your dev machine is your localhost, you don’t really have much room for going backward if things don’t proceed well, unless you’re happy to play with restoring nightly backups. Aaand… go! Whether it’s an apt-get update, a composer update, or whatever the case may be, this is the point at which the actual system migration should occur – then we’re back to testing!
  • 25. THE UPGRADE / REVIEW LIFECYCLE Refactor/ Update Test Refactor/ Update Test Refactor/ Update Test Upgrade underlying system Test for green!
  • 26. TEST SUITE STATUS CHECK Errors and Failures? • Cycle back through unit by unit to focus on addressing the issues revealed by the tests. • Leverage the @group tags to narrow your focus down to specific test groups All Green? • Go for the –coverage-html check, and if you’re still all green with 80- 100% coverage, then you can give the green light to releasing the upgrade to production!
  • 27. 👍 GOOD TO GO! Once all your tests are showing green across the board and coverage is confirmed at 80-100%, you're ready to deploy your upgrade to production and can say with CERTAINTY that your new system is compatible and ready to go! • You’ve had a dry run of the upgrade process • All features are covered and passing: • No nasty surprises at launch. • Everyone goes home on time! • Clients are all happy! (or not, is there such a thing?)