Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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 1...
• Just do it!
• You will get dirty
• It can hurt (a little)
• Learned behavior
NO MORE EXCUSES
IT WILL ACCELERATE YOUR
DEV...
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 testbo...
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 mo...
RUN TESTS
• Execute bundles via the URL
• http://localhost/tests/bundle.cfc?method=runRemote
• SOAP Runner
• HTTP/REST Run...
TESTBOX REPORTERS
•ANTJunit :Variant of JUnit for Jenkins
•Codexwiki : Mediawiki syntax
•Console : Server console
•Doc : S...
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
n...
ANT TESTING
DEVELOPER AUTOMATION
1.Grunt Watchers + LiveReload
2.Grunt Watchers + testbox-runner
3.Grunt Watchers + commanbox
4.ColdBo...
CONTINOUS INTEGRATION
CI SERVERS
Jenkins + CommandBox
wget http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war
box server start warpath=jenkins.war...
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 --...
TRAVIS + COMMANDBOXlanguage: java
sudo: required
dist: trusty
before_install:
- sudo apt-key adv --keyserver keys.gnupg.ne...
MULTIPLE VERSIONS
MULTIPLE ENGINES
TRAVIS + MULTIPLE ENGINESlanguage: java
sudo: required
jdk:
- oraclejdk8
env:
matrix:
- ENGINE=lucee@4.5
- ENGINE=lucee@5
...
Resources
• TestBox : ortussolutions.com/products/testbox
• CommandBox: ortussolutions.com/products/commandbox
• Slack: bo...
Thank
you!
Testing Automaton - CFSummit 2016
Testing Automaton - CFSummit 2016
Upcoming SlideShare
Loading in …5
×

of

Testing Automaton - CFSummit 2016 Slide 1 Testing Automaton - CFSummit 2016 Slide 2 Testing Automaton - CFSummit 2016 Slide 3 Testing Automaton - CFSummit 2016 Slide 4 Testing Automaton - CFSummit 2016 Slide 5 Testing Automaton - CFSummit 2016 Slide 6 Testing Automaton - CFSummit 2016 Slide 7 Testing Automaton - CFSummit 2016 Slide 8 Testing Automaton - CFSummit 2016 Slide 9 Testing Automaton - CFSummit 2016 Slide 10 Testing Automaton - CFSummit 2016 Slide 11 Testing Automaton - CFSummit 2016 Slide 12 Testing Automaton - CFSummit 2016 Slide 13 Testing Automaton - CFSummit 2016 Slide 14 Testing Automaton - CFSummit 2016 Slide 15 Testing Automaton - CFSummit 2016 Slide 16 Testing Automaton - CFSummit 2016 Slide 17 Testing Automaton - CFSummit 2016 Slide 18 Testing Automaton - CFSummit 2016 Slide 19 Testing Automaton - CFSummit 2016 Slide 20 Testing Automaton - CFSummit 2016 Slide 21 Testing Automaton - CFSummit 2016 Slide 22 Testing Automaton - CFSummit 2016 Slide 23 Testing Automaton - CFSummit 2016 Slide 24 Testing Automaton - CFSummit 2016 Slide 25 Testing Automaton - CFSummit 2016 Slide 26 Testing Automaton - CFSummit 2016 Slide 27 Testing Automaton - CFSummit 2016 Slide 28 Testing Automaton - CFSummit 2016 Slide 29 Testing Automaton - CFSummit 2016 Slide 30 Testing Automaton - CFSummit 2016 Slide 31 Testing Automaton - CFSummit 2016 Slide 32 Testing Automaton - CFSummit 2016 Slide 33
Upcoming SlideShare
RESTFul Tools For Lazy Experts - CFSummit 2016
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Testing Automaton - CFSummit 2016

Download to read offline

In this advanced session, we will investigate all the ways that you can automate your testing processes with TestBox and many CI and automation tools. From Jenkins integration, Travis CI, Node runners, Grunt watchers and much more. This session will show you the value of continuous integration and how to apply it with modern tools and technologies.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Testing Automaton - CFSummit 2016

  1. 1. Testing Automaton Luis Majano @lmajano
  2. 2. Who am I • Luis Majano • Computer Engineer • Imported from El Salvador • CEO of Ortus Solutions • Creator of all things Box
  3. 3. Why people don’t test Why we need to test How to test How to automate
  4. 4. Where to start? Write Tests
  5. 5. WHY PEOPLE DON’T TEST COMFORT
  6. 6. WHY PEOPLE DON’T TEST New Methodology New Learned Behavior It is a leap….
  7. 7. BIGGEST LIE IN SOFTWARE DEV 
 Don’t worry, we will create the tests and refactor it later!
  8. 8. 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.
  9. 9. • Just do it! • You will get dirty • It can hurt (a little) • Learned behavior NO MORE EXCUSES IT WILL ACCELERATE YOUR DEVELOPMENT
  10. 10. TDD/BDD = Process Continuous Integration Continuous Delivery Continuous Improvement AUTOMATION
  11. 11. TestBox : What you get API Docs Core Test Browser Test Harness Test Runner Samples install testbox —saveDev install testbox@be —saveDev
  12. 12. Test Harness Automated test results! xUnit/BDDTest Bundles Harness bootstrap HTML Runner ANT Runner
  13. 13. Test Bundle CFCs • Inherits from testbox.system.BaseSpec
 • TesBox will then execute all tests/specs/suites within 1 or more bundles
  14. 14. 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
  15. 15. 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
  16. 16. MANUAL TESTING Bundle CFC Runner
  17. 17. CommandBox Runner package set testbox.runner = "http://127.0.0.1:57538/tests/runner.cfm" testbox run 1 2
  18. 18. { "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
  19. 19. ANT TESTING
  20. 20. DEVELOPER AUTOMATION 1.Grunt Watchers + LiveReload 2.Grunt Watchers + testbox-runner 3.Grunt Watchers + commanbox 4.ColdBox Elixir
  21. 21. CONTINOUS INTEGRATION
  22. 22. CI SERVERS
  23. 23. Jenkins + CommandBox wget http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war box server start warpath=jenkins.war 1 2
  24. 24. Travis CI - Sign Up https://travis-ci.org/ Sign Up 1 2
  25. 25. Accounts Activate For Repositories 1 2 Create .travis.yml3 Commit to repository4 Travis CI - Getting Started
  26. 26. 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
  27. 27. 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
  28. 28. MULTIPLE VERSIONS MULTIPLE ENGINES
  29. 29. 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
  30. 30. Resources • TestBox : ortussolutions.com/products/testbox • CommandBox: ortussolutions.com/products/commandbox • Slack: boxteam.herokuapp.com • CFML Slack: #box-products • travis-ci.org • jenkins.io
  31. 31. Thank you!

In this advanced session, we will investigate all the ways that you can automate your testing processes with TestBox and many CI and automation tools. From Jenkins integration, Travis CI, Node runners, Grunt watchers and much more. This session will show you the value of continuous integration and how to apply it with modern tools and technologies.

Views

Total views

4,018

On Slideshare

0

From embeds

0

Number of embeds

2,540

Actions

Downloads

14

Shares

0

Comments

0

Likes

0

×