Test Automation with Vagrant

6b6afbaea3bf1de98975dedc5cd083c1?s=47 stevenjackson
September 17, 2013

Test Automation with Vagrant

What happens when you get started on a new project? Ever start with a voyage of exciting discovery and end up slogging through two hours chasing down dependencies, watching installers, and decrypting error messages? Vagrant might be the solution you're looking for.

More interestingly, what sort of things can we start to do if setting up a new environment doesn't suck? What would you do if you could instantiate a new project environment at a whim?

6b6afbaea3bf1de98975dedc5cd083c1?s=128

stevenjackson

September 17, 2013
Tweet

Transcript

  1. TEST AUTOMATION WITH VAGRANT Steve Jackson @stevejxsn steve.jackson@leandog.com Wednesday, September

    18, 13
  2. 2 Wednesday, September 18, 13

  3. I GOT TEH CODEZ 3 Wednesday, September 18, 13

  4. WHAT’S MISSING? 4 Wednesday, September 18, 13

  5. WHAT’S MISSING? 4 Environment + Source Code + Build Process

    = Application Wednesday, September 18, 13
  6. VAGRANT = MAGIC 5 Wednesday, September 18, 13

  7. VAGRANT = MAGIC  Vagrant = How do I build

    my development environment? 5 Wednesday, September 18, 13
  8. VAGRANT = MAGIC  Vagrant = How do I build

    my development environment?  Vagrant = Executable README 5 Wednesday, September 18, 13
  9. VAGRANT = MAGIC  Vagrant = How do I build

    my development environment?  Vagrant = Executable README  Vagrant = Multi-platform setup script 5 Wednesday, September 18, 13
  10. VAGRANT = MAGIC  Vagrant = How do I build

    my development environment?  Vagrant = Executable README  Vagrant = Multi-platform setup script 5 Wednesday, September 18, 13
  11. VAGRANT = MAGIC  Vagrant = How do I build

    my development environment?  Vagrant = Executable README  Vagrant = Multi-platform setup script  Vagrant = Environment as Code 5 Wednesday, September 18, 13
  12. VAGRANTFILE 6  Committed to Source Control  Work identically

    on any system Wednesday, September 18, 13
  13. RUNNING APPLICATION!  Repeatable  Reliable  Ready to Rock!

    7 Wednesday, September 18, 13
  14. PRODUCTION CLONE Wednesday, September 18, 13

  15. 9 You Vagrant Wednesday, September 18, 13

  16. 9 You Vagrant Providers $ vagrant up Wednesday, September 18,

    13
  17. PROVIDERS  VirtualBox (virtualbox.es, vagrantup.com)  VMWare  AWS 

    DigitalOcean  Rackspace  MORE: https://github.com/mitchellh/vagrant/wiki/Available- Vagrant-Plugins 10 Wednesday, September 18, 13
  18. 11 You Vagrant Providers $ vagrant up Wednesday, September 18,

    13
  19. 11 You Vagrant Providers Virtual Machine $ vagrant up Wednesday,

    September 18, 13
  20. 11 You Vagrant Providers Provisioners Virtual Machine $ vagrant up

    Wednesday, September 18, 13
  21. PROVISIONERS 12  Chef, Puppet, Shell  MORE: https://github.com/mitchellh/vagrant/wiki/Available- Vagrant-Plugins

    Wednesday, September 18, 13
  22. 13 You Vagrant Providers Provisioners Virtual Machine $ vagrant up

    Wednesday, September 18, 13
  23. 13 You Vagrant Providers Provisioners Virtual Machine $ vagrant ssh

    $ vagrant up Wednesday, September 18, 13
  24. PRODUCTION EVALS Wednesday, September 18, 13

  25. PERFORMANCE TESTING Wednesday, September 18, 13

  26. NEW CI SERVER Wednesday, September 18, 13

  27. HATE INSTALLING STUFF Wednesday, September 18, 13

  28. MULTI-PROJECT DEVELOPER OR DESIGNER Wednesday, September 18, 13

  29. TEST ISOLATION Wednesday, September 18, 13

  30. BUG HUNTING Wednesday, September 18, 13

  31. NEW HIRE Wednesday, September 18, 13

  32. RUBY INSTALLS 22 Wednesday, September 18, 13

  33. RUBY INSTALLS 22 Wednesday, September 18, 13

  34. SHARED RESOURCES 23 Wednesday, September 18, 13

  35. VAGRANT TO THE RESCUE 24 mysql play2 JVM VM IDE/vim/emacs

    vagrant Host browser Wednesday, September 18, 13
  36. VAGRANT TO THE RESCUE 24 mysql play2 JVM VM IDE/vim/emacs

    vagrant Host browser ruby cucumber Wednesday, September 18, 13
  37. VAGRANT TO THE RESCUE 24 mysql play2 JVM VM IDE/vim/emacs

    vagrant Host browser ruby cucumber JVM selenium server Wednesday, September 18, 13
  38. RECAP  Install Virtualbox  Install Vagrant  Install Vagrant

    plugins  Install Java  Clone project  Start selenium server  Vagrant up  Vagrant ssh  cd /vagrant  cucumber 25 Wednesday, September 18, 13
  39. DRAWBACKS  Slower  Disk space  No UI by

    default  Minimal provisioning support for Windows VMs 26 Wednesday, September 18, 13
  40. THE FUTURE 27 Wednesday, September 18, 13

  41. THAT’S A WRAP! Steve Jackson @stevejxsn steve.jackson@leandog.com Wednesday, September 18,

    13
  42. RESOURCES  https://github.com/stevenjackson/vagrant-test- automation  https://github.com/mitchellh/vagrant/wiki/Available- Vagrant-Plugins  https://github.com/mitchellh/vagrant/wiki/Available- Vagrant-Boxes

     http://www.vagrantbox.es  http://cloud-images.ubuntu.com/  https://github.com/jedi4ever/veewee  http://community.opscode.com/cookbooks  http://berkshelf.com/ 29 Wednesday, September 18, 13
  43. DEMO SYSTEM Wednesday, September 18, 13