SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Testing Automaton
Luis Majano @lmajano
Who am I
• Luis Majano
• Computer Engineer
• Imported from El Salvador
• CEO of Ortus Solutions
• Creator of all things Box
Why people don’t test
Why we need to test
How to test
How to automate
Where to start?
Write Tests
WHY PEOPLE DON’T TEST
COMFORT
WHY PEOPLE DON’T TEST
New Methodology
New Learned Behavior
It is a leap….
BIGGEST LIE IN SOFTWARE DEV


Don’t worry, we will create the
tests and refactor it later!
Bugs cost money
Cost To Fix Time detected
Requirements Design Building Testing Post-Release
Time
Introduced
Requirements 1x 3x 5-10x 10x 10-100x
Design --- 1x 10x 15x 25-100x
Building -- -- 1x 10x 10-25x
^ Kaner, Cem; James Bach, Bret Pettichord (2001). Lessons Learned in Software Testing: A Context-Driven Approach. Wiley. p. 4. ISBN 0-471-08112-4.
• Just do it!
• You will get dirty
• It can hurt (a little)
• Learned behavior
NO MORE EXCUSES
IT WILL ACCELERATE YOUR
DEVELOPMENT
TDD/BDD	=	Process	
Continuous	Integration	
Continuous	Delivery	
Continuous	Improvement
AUTOMATION
TestBox : What you get
API Docs
Core
Test Browser
Test Harness
Test Runner
Samples
install testbox —saveDev
install testbox@be —saveDev
Test Harness
Automated test
results!
xUnit/BDDTest
Bundles
Harness bootstrap
HTML Runner
ANT Runner
Test Bundle CFCs
• Inherits from testbox.system.BaseSpec

• TesBox will then execute all tests/specs/suites within 1 or more bundles
RUN TESTS
• Execute bundles via the URL
• http://localhost/tests/bundle.cfc?method=runRemote
• SOAP Runner
• HTTP/REST Runner
• ANT Runner
• NodeJS Runner
• CommandBox Runner
• Custom Runner
TESTBOX REPORTERS
•ANTJunit :Variant of JUnit for Jenkins
•Codexwiki : Mediawiki syntax
•Console : Server console
•Doc : Semantic HTML
•Dot :Awesome Dots
•JSON
•JUnit
•Raw : CFML Struct
•Simple :A basic HTML reporter
•Text : Back to the 80’s,Text
•MinText : Great for CommandBox Runners
•XML 
•Tap :A test anything protocol reporter
•Min : Minimalistic Report
MANUAL TESTING
Bundle	CFC Runner
CommandBox Runner
package set testbox.runner = "http://127.0.0.1:57538/tests/runner.cfm"
testbox run
1
2
{
"runner": "http://127.0.0.1:57538/tests/runner.cfm",
"directory": "/tests/specs",
"recurse": true
}
NodeJS Test Runner
npm install -g testbox-runner
create .testbox-runnerrc
1
2
Run it : testbox-runner2
ANT TESTING
DEVELOPER AUTOMATION
1.Grunt Watchers + LiveReload
2.Grunt Watchers + testbox-runner
3.Grunt Watchers + commanbox
4.ColdBox Elixir
CONTINOUS INTEGRATION
CI SERVERS
Jenkins + CommandBox
wget http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war
box server start warpath=jenkins.war
1
2
Travis CI - Sign Up
https://travis-ci.org/
Sign Up
1
2
Accounts
Activate For Repositories
1
2
Create .travis.yml3
Commit to repository4
Travis CI - Getting Started
TRAVIS + ANTlanguage: java
branches:
only:
- development
sudo: required
dist: trusty
before_install:
- sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622
- sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a
/etc/apt/sources.list.d/commandbox.list
install:
- sudo apt-get update && sudo apt-get --assume-yes install commandbox
- box install
- box server start
before_script:
# Startup the app
- curl http://localhost:49616/
script:
- ant -f workbench/build.xml
TRAVIS + COMMANDBOXlanguage: java
sudo: required
dist: trusty
before_install:
- sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622
- sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a
/etc/apt/sources.list.d/commandbox.list
install:
- sudo apt-get update && sudo apt-get --assume-yes install commandbox
- cd tests
- box install
- box server start
before_script:
# Startup the app
- curl http://localhost:49615/
script: >
testResults="echo $(box testbox run)";
echo "$testResults";
if grep -i "[Failures: [1-9][0-9]?[0-9]?]|[Errors: [1-9][0-9]?[0-9]?]|
<t[^>]*>|<b[^>]*>" <<< $testResults; then exit 1; fi
MULTIPLE VERSIONS
MULTIPLE ENGINES
TRAVIS + MULTIPLE ENGINESlanguage: java
sudo: required
jdk:
- oraclejdk8
env:
matrix:
- ENGINE=lucee@4.5
- ENGINE=lucee@5
- ENGINE=adobe@2016
- ENGINE=adobe@11
- ENGINE=adobe@10
before_install:
- sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622
- sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a
/etc/apt/sources.list.d/commandbox.list
install:
- sudo apt-get update && sudo apt-get --assume-yes install commandbox
- box install
before_script:
- box server start cfengine=$ENGINE port=8500
script: >
testResults="$(box testbox run runner='http://127.0.0.1:8500/tests/runner.cfm' )";
echo "$testResults";
if grep -i "[(Failures|Errors): [1-9][0-9]?[0-9]?]|[Errors: [1-9][0-9]?[0-9]?]|<t[^>]*>|
<b[^>]*>" <<< $testResults; then exit 1; fi
notifications:
email: false
Resources
• TestBox : ortussolutions.com/products/testbox
• CommandBox: ortussolutions.com/products/commandbox
• Slack: boxteam.herokuapp.com
• CFML Slack: #box-products
• travis-ci.org
• jenkins.io
Thank
you!

Weitere ähnliche Inhalte

Was ist angesagt?

Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
Bachkoutou Toutou
 

Was ist angesagt? (19)

In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
 
Command box
Command boxCommand box
Command box
 
ITB2015 - Go Commando with CommandBox CLI
ITB2015 - Go Commando with CommandBox CLIITB2015 - Go Commando with CommandBox CLI
ITB2015 - Go Commando with CommandBox CLI
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
 
Command box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPLCommand box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPL
 
CommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package ManagerCommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package Manager
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web API
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
 
Serverless Media Workflow
Serverless Media WorkflowServerless Media Workflow
Serverless Media Workflow
 
Robotframework
RobotframeworkRobotframework
Robotframework
 
CommandBox at CFCamp 2014
CommandBox at CFCamp 2014CommandBox at CFCamp 2014
CommandBox at CFCamp 2014
 
CommandBox : Free CFML
CommandBox : Free CFMLCommandBox : Free CFML
CommandBox : Free CFML
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
Dev objective2015 lets git together
Dev objective2015 lets git togetherDev objective2015 lets git together
Dev objective2015 lets git together
 
Ruby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands Meeting
 
美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术沙龙08 - 分布式监控系统实践美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术沙龙08 - 分布式监控系统实践
 

Andere mochten auch

Coldbox developer training – session 5
Coldbox developer training – session 5Coldbox developer training – session 5
Coldbox developer training – session 5
Billie Berzinskas
 
Q2 how does your media product represent particular social
Q2 how does your media product represent particular socialQ2 how does your media product represent particular social
Q2 how does your media product represent particular social
LucyAnne97
 
TESIS JORDI FEO
TESIS JORDI FEOTESIS JORDI FEO
TESIS JORDI FEO
Jordi Feo
 

Andere mochten auch (20)

Coldbox developer training – session 5
Coldbox developer training – session 5Coldbox developer training – session 5
Coldbox developer training – session 5
 
Физика и техника.
Физика и техника.Физика и техника.
Физика и техника.
 
Day 2 filming
Day 2 filmingDay 2 filming
Day 2 filming
 
Office administrative assistant
Office administrative assistantOffice administrative assistant
Office administrative assistant
 
Q2 how does your media product represent particular social
Q2 how does your media product represent particular socialQ2 how does your media product represent particular social
Q2 how does your media product represent particular social
 
Conceptos de información-1
Conceptos de información-1Conceptos de información-1
Conceptos de información-1
 
CBDW2014 - This is ColdBox 4
CBDW2014 - This is ColdBox 4CBDW2014 - This is ColdBox 4
CBDW2014 - This is ColdBox 4
 
Presentation1
Presentation1Presentation1
Presentation1
 
Into The Box 2015 Keynote
Into The Box 2015 KeynoteInto The Box 2015 Keynote
Into The Box 2015 Keynote
 
TESIS JORDI FEO
TESIS JORDI FEOTESIS JORDI FEO
TESIS JORDI FEO
 
Costumes
CostumesCostumes
Costumes
 
Michael Jackson
Michael JacksonMichael Jackson
Michael Jackson
 
Administrative director
Administrative directorAdministrative director
Administrative director
 
Customer service director
Customer service directorCustomer service director
Customer service director
 
Atvidade powerpoint anapaulakremer
Atvidade powerpoint anapaulakremerAtvidade powerpoint anapaulakremer
Atvidade powerpoint anapaulakremer
 
Planning booklet
Planning bookletPlanning booklet
Planning booklet
 
Storyboard (day 1 of filming)
Storyboard (day 1 of filming)Storyboard (day 1 of filming)
Storyboard (day 1 of filming)
 
CBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and BeyondCBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and Beyond
 
Андрію Благому
Андрію БлагомуАндрію Благому
Андрію Благому
 
Fc, cp, dps
Fc, cp, dpsFc, cp, dps
Fc, cp, dps
 

Ähnlich wie Testing Automaton - CFSummit 2016

Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
LB Denker
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 

Ähnlich wie Testing Automaton - CFSummit 2016 (20)

Automate Thyself
Automate ThyselfAutomate Thyself
Automate Thyself
 
Continuous Integration Testing in Django
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in Django
 
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
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
 
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox tests
 
Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
 
Test driven development_continuous_integration
Test driven development_continuous_integrationTest driven development_continuous_integration
Test driven development_continuous_integration
 
Unit testing for Cocoa developers
Unit testing for Cocoa developersUnit testing for Cocoa developers
Unit testing for Cocoa developers
 
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CI
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Rentv
RentvRentv
Rentv
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 

Mehr von Ortus Solutions, Corp

Mehr von Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Testing Automaton - CFSummit 2016

  • 2. Who am I • Luis Majano • Computer Engineer • Imported from El Salvador • CEO of Ortus Solutions • Creator of all things Box
  • 3. Why people don’t test Why we need to test How to test How to automate
  • 5. WHY PEOPLE DON’T TEST COMFORT
  • 6. WHY PEOPLE DON’T TEST New Methodology New Learned Behavior It is a leap….
  • 7. BIGGEST LIE IN SOFTWARE DEV 
 Don’t worry, we will create the tests and refactor it later!
  • 8.
  • 9. Bugs cost money Cost To Fix Time detected Requirements Design Building Testing Post-Release Time Introduced Requirements 1x 3x 5-10x 10x 10-100x Design --- 1x 10x 15x 25-100x Building -- -- 1x 10x 10-25x ^ Kaner, Cem; James Bach, Bret Pettichord (2001). Lessons Learned in Software Testing: A Context-Driven Approach. Wiley. p. 4. ISBN 0-471-08112-4.
  • 10. • Just do it! • You will get dirty • It can hurt (a little) • Learned behavior NO MORE EXCUSES IT WILL ACCELERATE YOUR DEVELOPMENT
  • 12.
  • 13. TestBox : What you get API Docs Core Test Browser Test Harness Test Runner Samples install testbox —saveDev install testbox@be —saveDev
  • 15. Test Bundle CFCs • Inherits from testbox.system.BaseSpec
 • TesBox will then execute all tests/specs/suites within 1 or more bundles
  • 16. RUN TESTS • Execute bundles via the URL • http://localhost/tests/bundle.cfc?method=runRemote • SOAP Runner • HTTP/REST Runner • ANT Runner • NodeJS Runner • CommandBox Runner • Custom Runner
  • 17. TESTBOX REPORTERS •ANTJunit :Variant of JUnit for Jenkins •Codexwiki : Mediawiki syntax •Console : Server console •Doc : Semantic HTML •Dot :Awesome Dots •JSON •JUnit •Raw : CFML Struct •Simple :A basic HTML reporter •Text : Back to the 80’s,Text •MinText : Great for CommandBox Runners •XML  •Tap :A test anything protocol reporter •Min : Minimalistic Report
  • 19. CommandBox Runner package set testbox.runner = "http://127.0.0.1:57538/tests/runner.cfm" testbox run 1 2
  • 20. { "runner": "http://127.0.0.1:57538/tests/runner.cfm", "directory": "/tests/specs", "recurse": true } NodeJS Test Runner npm install -g testbox-runner create .testbox-runnerrc 1 2 Run it : testbox-runner2
  • 22. DEVELOPER AUTOMATION 1.Grunt Watchers + LiveReload 2.Grunt Watchers + testbox-runner 3.Grunt Watchers + commanbox 4.ColdBox Elixir
  • 25. Jenkins + CommandBox wget http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war box server start warpath=jenkins.war 1 2
  • 26. Travis CI - Sign Up https://travis-ci.org/ Sign Up 1 2
  • 27. Accounts Activate For Repositories 1 2 Create .travis.yml3 Commit to repository4 Travis CI - Getting Started
  • 28. TRAVIS + ANTlanguage: java branches: only: - development sudo: required dist: trusty before_install: - sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622 - sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a /etc/apt/sources.list.d/commandbox.list install: - sudo apt-get update && sudo apt-get --assume-yes install commandbox - box install - box server start before_script: # Startup the app - curl http://localhost:49616/ script: - ant -f workbench/build.xml
  • 29. TRAVIS + COMMANDBOXlanguage: java sudo: required dist: trusty before_install: - sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622 - sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a /etc/apt/sources.list.d/commandbox.list install: - sudo apt-get update && sudo apt-get --assume-yes install commandbox - cd tests - box install - box server start before_script: # Startup the app - curl http://localhost:49615/ script: > testResults="echo $(box testbox run)"; echo "$testResults"; if grep -i "[Failures: [1-9][0-9]?[0-9]?]|[Errors: [1-9][0-9]?[0-9]?]| <t[^>]*>|<b[^>]*>" <<< $testResults; then exit 1; fi
  • 31. TRAVIS + MULTIPLE ENGINESlanguage: java sudo: required jdk: - oraclejdk8 env: matrix: - ENGINE=lucee@4.5 - ENGINE=lucee@5 - ENGINE=adobe@2016 - ENGINE=adobe@11 - ENGINE=adobe@10 before_install: - sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622 - sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a /etc/apt/sources.list.d/commandbox.list install: - sudo apt-get update && sudo apt-get --assume-yes install commandbox - box install before_script: - box server start cfengine=$ENGINE port=8500 script: > testResults="$(box testbox run runner='http://127.0.0.1:8500/tests/runner.cfm' )"; echo "$testResults"; if grep -i "[(Failures|Errors): [1-9][0-9]?[0-9]?]|[Errors: [1-9][0-9]?[0-9]?]|<t[^>]*>| <b[^>]*>" <<< $testResults; then exit 1; fi notifications: email: false
  • 32. Resources • TestBox : ortussolutions.com/products/testbox • CommandBox: ortussolutions.com/products/commandbox • Slack: boxteam.herokuapp.com • CFML Slack: #box-products • travis-ci.org • jenkins.io