Continuous Testing


Published on

A talk around continuous feedback using continuous integration and continuous testing (aka continuous deployment)

Published in: Software, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Continuous Testing

  1. 1. Continuous Testing J a r e d R i c h a r d s o n A g i l e A r t i s a n s 1 Who are you? 2 Jared Richardson CoAuthored Ship It! and Career 2.0 Screencast editor for Started AgileRTP in 2007 2nd public signatory of the Agile Manifesto Agile coach 3 What Is Agile? 4
  2. 2. 5 Feedback Loops 6 Feedback Loops are Fractal 7 8
  3. 3. Pairing Test First Daily Meetings Demos ??? Feedback Loops Inside Feedback Loops 9 Different Levels Good at the bottom Great at the top Ignore the middle 10 Continuous Feedback Continuous Integration Continuous Delivery Continuous Testing 11 Continuous Integration Watch Code Build product Run tests Publish results 12
  4. 4. Continuous Testing Watch CI Deploy product Integration tests Publish results 13 Continuous Testing Build in CI (compile & unit tests) Deploy to dev (staging) Run integration tests 14 What does this tell us? If it works 15 Continuous deployment is controversial. 
 Most people ... think I’m advocating 
 low-quality code 
 or an undisciplined 
 development process. ERIC RIES 16
  5. 5. Language is a Tool Use it 17 What's this look like? 18 Java Tooling Publish results 19 Example Publish results javac (Oracle & IBM) message broker etc ws ejb deploy message broker tools sshexec (to scripts) JUnit HP's UFT Selenium Web page RSS Email 20
  6. 6. Continuous Testing CI CT Compile & unit test Deploy & integration test 21 Multiplatform Deploys CI CD Win7 CD Linux CD AIX 22 Binaries Nuke & Pave Delete Recompile Deploy Use 23 23 Data Nuke & Pave Delete schema Drop tables Recreate Restock Rails Liquibase 24 24
  7. 7. Rails ActiveRecord CREATE  TABLE  products  (        id  int(11)  NOT  NULL  auto_increment,        name  varchar(255),        PRIMARY  KEY    (id)   ); 25 25 Rails ActiveRecord change_table :card_deck do |t|
 t.remove :description, :name 
 t.string :first_name
 t.index :part_number
 t.rename :list_name, :last_name
 end 26 26 Rails ActiveRecord rake db:migrate rake db:migrate VERSION=0 rake db:reset 27 27 Operating System Nuke & Pave Virtualize Recreate 28 28
  8. 8. Vagrant vagrant init lnx http://lnx/ vagrant up vagrant ssh vagrant reload --provision 29 29 Vagrant Vagrant.configure("2") do |config| = "lnx" config.vm.provision :shell, :path => "" end 30 30 Benefits Reproducible environment Solid results Fast results Repeatable results 31 Fast feedback leads to fast fixes 32
  9. 9. Minimize Dark Times Code Change Validation 33 When? Day one Easiest 34 Easy? No Difficult Necessary Code 35 Alternatives 36
  10. 10. Work in a vacuum 37 Ruthlessly Automate! Builds Deploys Tests 38 Steps Automate builds Continuous Integration Add unit tests Automate deployments Continuous Delivery Add integration tests 39 Your move 40
  11. 11. Exercise Two 3x5 cards 3 reasons for Continuous Testing 3 barriers to adoption Pass cards to the next table Brainstorm on solutions 41 Tips Open standards... Junit or Junit compatible Avoid vendor lock in Glue tools Time matters.... Fast servers Incremental change 42 Resources JUnit Jenkins BDD Cucumber Continuous Deployment 43 Devops Resources 44
  12. 12. Data Resources 45 46