Testing Automaton - CFSummit 2016

Ortus Solutions, Corp
Ortus Solutions, CorpOrtus Solutions, Corp
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!
Testing Automaton - CFSummit 2016
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
Testing Automaton - CFSummit 2016
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!
1 of 33

Recommended

RESTFul Tools For Lazy Experts - CFSummit 2016 by
RESTFul Tools For Lazy Experts - CFSummit 2016RESTFul Tools For Lazy Experts - CFSummit 2016
RESTFul Tools For Lazy Experts - CFSummit 2016Ortus Solutions, Corp
5.5K views38 slides
Cfml features modern_coding by
Cfml features modern_codingCfml features modern_coding
Cfml features modern_codingColdFusionConference
716 views74 slides
Keep Applications Online by
Keep Applications OnlineKeep Applications Online
Keep Applications OnlineColdFusionConference
258 views19 slides
Instant ColdFusion with Vagrant by
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with VagrantColdFusionConference
328 views15 slides
Perl-Critic by
Perl-CriticPerl-Critic
Perl-CriticJonas Brømsø
2K views16 slides
2021.laravelconf.tw.slides1 by
2021.laravelconf.tw.slides12021.laravelconf.tw.slides1
2021.laravelconf.tw.slides1LiviaLiaoFontech
396 views65 slides

More Related Content

What's hot

In The Trenches With Tomster, Upgrading Ember.js & Ember Data by
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 DataStacy London
6.4K views53 slides
Load Balancing, Failover and Scalability with ColdFusion by
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionColdFusionConference
2.1K views52 slides
Command box by
Command boxCommand box
Command boxColdFusionConference
494 views44 slides
ITB2015 - Go Commando with CommandBox CLI by
ITB2015 - Go Commando with CommandBox CLIITB2015 - Go Commando with CommandBox CLI
ITB2015 - Go Commando with CommandBox CLIOrtus Solutions, Corp
837 views44 slides
Tuenti Release Workflow by
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release WorkflowTuenti
944 views30 slides
Command box, Package Manager, Automation, REPL by
Command box, Package Manager, Automation, REPLCommand box, Package Manager, Automation, REPL
Command box, Package Manager, Automation, REPLColdFusionConference
753 views44 slides

What's hot(19)

In The Trenches With Tomster, Upgrading Ember.js & Ember Data by Stacy London
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
Stacy London6.4K views
Load Balancing, Failover and Scalability with ColdFusion by ColdFusionConference
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
Tuenti Release Workflow by Tuenti
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
Tuenti944 views
CommandBox REPL, CLI, and Package Manager by bdw429s
CommandBox REPL, CLI, and Package ManagerCommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package Manager
bdw429s348 views
How to Supercharge your PHP Web API by Aurimas Niekis
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web API
Aurimas Niekis56 views
They why behind php frameworks by Kirk Madera
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
Kirk Madera254 views
The Many Ways to Test Your React App by All Things Open
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
All Things Open2.1K views
Serverless Media Workflow by MooYeol Lee
Serverless Media WorkflowServerless Media Workflow
Serverless Media Workflow
MooYeol Lee30.9K views
Robotframework by Ella Sun
RobotframeworkRobotframework
Robotframework
Ella Sun519 views
Ruby on Rails All Hands Meeting by Dan Davis
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands Meeting
Dan Davis465 views

Viewers also liked

Coldbox developer training – session 5 by
Coldbox developer training – session 5Coldbox developer training – session 5
Coldbox developer training – session 5Billie Berzinskas
845 views38 slides
Физика и техника. by
Физика и техника.Физика и техника.
Физика и техника.Alex_Shutova
258 views8 slides
Day 2 filming by
Day 2 filmingDay 2 filming
Day 2 filmingLucyAnne97
505 views4 slides
Office administrative assistant by
Office administrative assistantOffice administrative assistant
Office administrative assistantdersonsaman
602 views6 slides
Q2 how does your media product represent particular social by
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 socialLucyAnne97
394 views4 slides
Conceptos de información-1 by
Conceptos de información-1Conceptos de información-1
Conceptos de información-1Leonardo Melo
545 views28 slides

Viewers also liked(20)

Coldbox developer training – session 5 by Billie Berzinskas
Coldbox developer training – session 5Coldbox developer training – session 5
Coldbox developer training – session 5
Billie Berzinskas845 views
Физика и техника. by Alex_Shutova
Физика и техника.Физика и техника.
Физика и техника.
Alex_Shutova258 views
Day 2 filming by LucyAnne97
Day 2 filmingDay 2 filming
Day 2 filming
LucyAnne97505 views
Office administrative assistant by dersonsaman
Office administrative assistantOffice administrative assistant
Office administrative assistant
dersonsaman602 views
Q2 how does your media product represent particular social by LucyAnne97
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
LucyAnne97394 views
Conceptos de información-1 by Leonardo Melo
Conceptos de información-1Conceptos de información-1
Conceptos de información-1
Leonardo Melo545 views
TESIS JORDI FEO by Jordi Feo
TESIS JORDI FEOTESIS JORDI FEO
TESIS JORDI FEO
Jordi Feo220 views
Michael Jackson by LucyAnne97
Michael JacksonMichael Jackson
Michael Jackson
LucyAnne97418 views
Administrative director by dersonsaman
Administrative directorAdministrative director
Administrative director
dersonsaman300 views
Customer service director by prattchris734
Customer service directorCustomer service director
Customer service director
prattchris734269 views
Atvidade powerpoint anapaulakremer by 0879
Atvidade powerpoint anapaulakremerAtvidade powerpoint anapaulakremer
Atvidade powerpoint anapaulakremer
0879404 views
Storyboard (day 1 of filming) by LucyAnne97
Storyboard (day 1 of filming)Storyboard (day 1 of filming)
Storyboard (day 1 of filming)
LucyAnne97411 views

Similar to Testing Automaton - CFSummit 2016

Automate Thyself by
Automate ThyselfAutomate Thyself
Automate ThyselfOrtus Solutions, Corp
1.3K views42 slides
Continuous Integration Testing in Django by
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in DjangoKevin Harvey
13.6K views109 slides
Stop Being Lazy and Test Your Software by
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareLaura Frank Tacho
15.8K views75 slides
Test parallelization using Jenkins by
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using JenkinsRogue Wave Software
926 views58 slides
Containerize your Blackbox tests by
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox testsKevin Beeman
51 views43 slides
Testing and DevOps Culture: Lessons Learned by
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedLB Denker
2.6K views50 slides

Similar to Testing Automaton - CFSummit 2016(20)

Continuous Integration Testing in Django by Kevin Harvey
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in Django
Kevin Harvey13.6K views
Stop Being Lazy and Test Your Software by Laura Frank Tacho
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your Software
Laura Frank Tacho15.8K views
Containerize your Blackbox tests by Kevin Beeman
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox tests
Kevin Beeman51 views
Testing and DevOps Culture: Lessons Learned by LB Denker
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
LB Denker2.6K views
Test driven development_continuous_integration by haochenglee
Test driven development_continuous_integrationTest driven development_continuous_integration
Test driven development_continuous_integration
haochenglee3.6K views
Unit testing for Cocoa developers by Graham Lee
Unit testing for Cocoa developersUnit testing for Cocoa developers
Unit testing for Cocoa developers
Graham Lee1.2K views
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B... by CloudBees
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...
CloudBees262 views
Continuous Delivery, Continuous Integration by Amazon Web Services
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
Amazon Web Services3.6K views
Introduction to Automated Testing by Lars Thorup
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
Lars Thorup1.6K views
Introduction to-automated-testing by BestBrains
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains366 views
Continuous Delivery - Automate & Build Better Software with Travis CI by wajrcs
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
wajrcs538 views
DevOps - Boldly Go for Distro by Paul Boos
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
Paul Boos118 views
Unit Testing in R with Testthat - HRUG by egoodwintx
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
egoodwintx1.4K views
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a... by Lean IT Consulting
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...

More from Ortus Solutions, Corp

Luis Majano The Battlefield ORM by
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORMOrtus Solutions, Corp
28 views74 slides
Brad Wood - CommandBox CLI by
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Ortus Solutions, Corp
59 views55 slides
Secure your Secrets and Settings in ColdFusion by
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
72 views97 slides
Daniel Garcia ContentBox: CFSummit 2023 by
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
41 views40 slides
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf by
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus Solutions, Corp
14 views21 slides
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf by
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_.pdfOrtus Solutions, Corp
14 views51 slides

More from Ortus Solutions, Corp(20)

ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf by Ortus Solutions, Corp
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 by Ortus Solutions, Corp
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_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf by Ortus Solutions, Corp
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

Recently uploaded

Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
27 views43 slides
From chaos to control: Managing migrations and Microsoft 365 with ShareGate! by
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!sammart93
9 views39 slides
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院IttrainingIttraining
34 views8 slides
Empathic Computing: Delivering the Potential of the Metaverse by
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the MetaverseMark Billinghurst
470 views80 slides
DALI Basics Course 2023 by
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023Ivory Egg
14 views12 slides
STPI OctaNE CoE Brochure.pdf by
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdfmadhurjyapb
12 views1 slide

Recently uploaded(20)

Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman27 views
From chaos to control: Managing migrations and Microsoft 365 with ShareGate! by sammart93
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
sammart939 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst470 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2216 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi120 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn19 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10209 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec11 views
Spesifikasi Lengkap ASUS Vivobook Go 14 by Dot Semarang
Spesifikasi Lengkap ASUS Vivobook Go 14Spesifikasi Lengkap ASUS Vivobook Go 14
Spesifikasi Lengkap ASUS Vivobook Go 14
Dot Semarang35 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada121 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex9 views

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!
  • 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
  • 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