TESTING
TESTING
EVERYWHERE
KEV MCCABE
14TH MAY 2014
CF OBJECTIVE 2014
http://nud.gr/QIZntJ
INTRODUCTION
http://nud.gr/QIZntJ
SLIDES LINK
http://nud.gr/QIZntJ
http://nud.gr/QIZntJ
TESTING PYRAMID
Exploratory
Acceptance*
Integration*
Unit Tests*
* Automated Testshttp://nud.gr/QIZntJ
INVERTED TESTING
PYRAMID
E x p l o r a t o r y
Acceptance*
Integration*
Unit
Tests** Automated Tests
http://nud.gr/QIZntJ
AUTOMATED TESTS
Comment from my Unit Testing Session @
CF Summit:
This one I liked the least. Seems like overkill to
write...
YOUR APPLICATION
STACK
HTML
JavaScript
CFML
Database
http://nud.gr/QIZntJ
AUTOMATION
CFML Code
• Beans
• Services
• Handlers
JavaScript
• Plain Javascript
• jQuery
• AngularJS etc
Database
UI
http...
DATABASE TESTING
To be honest – not found a good one
So test using TestBox
This is actually good!
You need a DB Instance j...
CFML
Testing of Beans
• Make sure they hold the data you intended
• Have any special functions?
Services
• SRP
• Right cal...
JAVASCRIPT
Yes you can test your JavaScript
Test Plain JavaScript
jQuery calls
AngularJS applications
http://nud.gr/QIZntJ
FULL INTEGRATION
TESTS
Testing in different browsers
Create a Framework
Make it interesting for the business
• They will r...
TESTING TYPES
TDD
POUT
BDD
Automated
Exploratory
http://nud.gr/QIZntJ
TDD
Why do we do TDD? We do TDD for one overriding reason
and several less important reasons. The less important
reasons a...
TDD
If you have a test suite that you trust
so much that you are willing to deploy
the system based solely on those
tests ...
http://nud.gr/QIZntJ
http://nud.gr/QIZntJ
OTHER SESSIONS @
CF OBJECTIVE
Thursday @ 10:15am
Stop Making Excuses And Start Testing Your JavaScript! - Ryan Anklam
Thur...
THANK YOU &
QUESTIONS?
http://nud.gr/QIZntJ
SLIDES LINK
http://nud.gr/QIZntJ
http://nud.gr/QIZntJ
ABOUT ME
Software Craftsmanship Mentor
@ General Electric
• ColdFusion since 1996 (v2)
• London CFML & Web
Community Leade...
Upcoming SlideShare
Loading in...5
×

Cf objective2014 testing-testingeverywhere

198

Published on

Published in: Software, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
198
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Cf objective2014 testing-testingeverywhere

  1. 1. TESTING TESTING EVERYWHERE KEV MCCABE 14TH MAY 2014 CF OBJECTIVE 2014 http://nud.gr/QIZntJ
  2. 2. INTRODUCTION http://nud.gr/QIZntJ
  3. 3. SLIDES LINK http://nud.gr/QIZntJ http://nud.gr/QIZntJ
  4. 4. TESTING PYRAMID Exploratory Acceptance* Integration* Unit Tests* * Automated Testshttp://nud.gr/QIZntJ
  5. 5. INVERTED TESTING PYRAMID E x p l o r a t o r y Acceptance* Integration* Unit Tests** Automated Tests http://nud.gr/QIZntJ
  6. 6. AUTOMATED TESTS Comment from my Unit Testing Session @ CF Summit: This one I liked the least. Seems like overkill to write 10 times more code just to test one tiny piece of the application. I can understand how it would be helpful for large teams where the work is split among multiple developers, but for a small team and a rapid dev cycle, this just seems like unnecessary overhead. I wasn't convinced of the real-world applicability. If this was you I hope I can convince you  http://nud.gr/QIZntJ
  7. 7. YOUR APPLICATION STACK HTML JavaScript CFML Database http://nud.gr/QIZntJ
  8. 8. AUTOMATION CFML Code • Beans • Services • Handlers JavaScript • Plain Javascript • jQuery • AngularJS etc Database UI http://nud.gr/QIZntJ
  9. 9. DATABASE TESTING To be honest – not found a good one So test using TestBox This is actually good! You need a DB Instance just for this. So you can tear it down and refresh as needed http://nud.gr/QIZntJ
  10. 10. CFML Testing of Beans • Make sure they hold the data you intended • Have any special functions? Services • SRP • Right calls Handlers • If using a MVC framework make sure it’s doing what you wanted http://nud.gr/QIZntJ
  11. 11. JAVASCRIPT Yes you can test your JavaScript Test Plain JavaScript jQuery calls AngularJS applications http://nud.gr/QIZntJ
  12. 12. FULL INTEGRATION TESTS Testing in different browsers Create a Framework Make it interesting for the business • They will really care about this level! • Once you show them it working http://nud.gr/QIZntJ
  13. 13. TESTING TYPES TDD POUT BDD Automated Exploratory http://nud.gr/QIZntJ
  14. 14. TDD Why do we do TDD? We do TDD for one overriding reason and several less important reasons. The less important reasons are: • We spend less time debugging. • The tests act as accurate, precise, and unambiguous documentation at the lowest level of the system. • Writing tests first requires decoupling that other testing strategies do not; and we believe that such decoupling is beneficial. Those are ancillary benefits of TDD; and they are debatable. There is, however, one benefit that, given certain conditions are met, cannot be debated: Robert “Uncle Bob” Martin http://blog.8thlight.com/uncle-bob/2014/04/25/MonogamousTDD.html http://nud.gr/QIZntJ
  15. 15. TDD If you have a test suite that you trust so much that you are willing to deploy the system based solely on those tests passing; and if that test suite can be executed in seconds, or minutes, then you can quickly and easily clean the code without fear. Robert “Uncle Bob” Martin http://blog.8thlight.com/uncle-bob/2014/04/25/MonogamousTDD.html http://nud.gr/QIZntJ
  16. 16. http://nud.gr/QIZntJ
  17. 17. http://nud.gr/QIZntJ
  18. 18. OTHER SESSIONS @ CF OBJECTIVE Thursday @ 10:15am Stop Making Excuses And Start Testing Your JavaScript! - Ryan Anklam Thursday @ 11:30am BDD - Change the way you code - Luis Majano Thursday @ 4:15pm Updating/Hotfixing ColdFusion 10, 9 and 8: Tips and Traps - Charlie Arehart Friday @ 11:30am Leveling-Up at Javascript: Organization, Performance & Testing - Raymond Camden Friday @ 1:45pm Real World Selenium Testing - Mary Jo Sminkey http://nud.gr/QIZntJ
  19. 19. THANK YOU & QUESTIONS? http://nud.gr/QIZntJ
  20. 20. SLIDES LINK http://nud.gr/QIZntJ http://nud.gr/QIZntJ
  21. 21. ABOUT ME Software Craftsmanship Mentor @ General Electric • ColdFusion since 1996 (v2) • London CFML & Web Community Leader • Scrum Master • Kanban Practitioner • Agile Coach T: @bigmadkev W: BigMadKev.com http://nud.gr/QIZntJ
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×