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.
Beaker 
Cloud Enabled Acceptance Testing
Life is Hard
About Me 
Alice Nodelman 
alice@puppetlabs.com 
anode (freenode #puppet-dev) 
alicenode (twitter) 
anodelman (github)
Beaker, The Onramp to Easy Street 
Flexible Test Construction 
Cloud Enabled 
Pretty Reports
The Tests
Tests in Ruby and Bash 
The value of using a non-proprietary 
programming language.
The Beaker DSL 
It’s a Domain Specific Language!
A Few Carefully Selected Examples 
on host, “echo hello” 
install_pe 
install_puppet 
scp_to host, “s.txt”, “d.txt”, :igno...
Test Structure DSL Methods 
test_name “I’m a descriptive test name” 
step “This is a step in a test” 
teardown do 
puts “e...
Put It all Together
beaker-rspec 
beaker DSL 
+ 
RSpec 
+ 
Serverspec 
= 
beaker-rspec
The Cloud 
Who delivers your boxes?
Beaker’s Virtualization Options 
● Amazon Elastic Compute Cloud 
● Google Compute Engine 
● OpenStack 
● Docker 
● Vsphere...
Quick Network Overview 
Beaker Coordinator 
Agent 1 
Agent 3 
Agent 2 
Master 
The Cloud 
Home Network
How we use it at Puppet 
Let’s divide up the pie.
The Report 
Card
The Noisy Scroll 
centos-6-64-1 15:41:59$ env PATH="/opt/puppet/bin:${PATH}" RUBYLIB="${RUBYLIB}" puppet agent --configpri...
Not So Pretty 
- Host Configuration Summary - 
- Test Case Summary for suite 'tests' - 
Total Suite Time: 571.58 seconds 
...
Links of Interest 
● Beaker on GitHub 
● Beaker Wiki 
● Beaker Yard Docs at RubyDoc 
● FOSS Puppet Acceptance Tests 
● Exa...
Questions Questions
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Upcoming SlideShare
Loading in …5
×

Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014

15,456 views

Published on

Beaker: Automated, Cloud-Based Acceptance Testing - Alice Nodelman, Puppet Labs

Published in: Technology

Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014

  1. 1. Beaker Cloud Enabled Acceptance Testing
  2. 2. Life is Hard
  3. 3. About Me Alice Nodelman alice@puppetlabs.com anode (freenode #puppet-dev) alicenode (twitter) anodelman (github)
  4. 4. Beaker, The Onramp to Easy Street Flexible Test Construction Cloud Enabled Pretty Reports
  5. 5. The Tests
  6. 6. Tests in Ruby and Bash The value of using a non-proprietary programming language.
  7. 7. The Beaker DSL It’s a Domain Specific Language!
  8. 8. A Few Carefully Selected Examples on host, “echo hello” install_pe install_puppet scp_to host, “s.txt”, “d.txt”, :ignore => [‘.git’]
  9. 9. Test Structure DSL Methods test_name “I’m a descriptive test name” step “This is a step in a test” teardown do puts “execute this code on test completion” end fail_test “Uh oh. This test failed” pass_test “Woo! This test passed”
  10. 10. Put It all Together
  11. 11. beaker-rspec beaker DSL + RSpec + Serverspec = beaker-rspec
  12. 12. The Cloud Who delivers your boxes?
  13. 13. Beaker’s Virtualization Options ● Amazon Elastic Compute Cloud ● Google Compute Engine ● OpenStack ● Docker ● Vsphere ● Fusion ● Vagrant
  14. 14. Quick Network Overview Beaker Coordinator Agent 1 Agent 3 Agent 2 Master The Cloud Home Network
  15. 15. How we use it at Puppet Let’s divide up the pie.
  16. 16. The Report Card
  17. 17. The Noisy Scroll centos-6-64-1 15:41:59$ env PATH="/opt/puppet/bin:${PATH}" RUBYLIB="${RUBYLIB}" puppet agent --configprint vardir /var/opt/lib/pe-puppet centos-6-64-1 executed in 1.26 seconds centos-6-64-1 15:42:01$ [ -e '/var/opt/lib/pe-puppet/state/agent_catalog_run.lock' ] centos-6-64-1 executed in 0.04 seconds Exited: 1 centos-6-64-1 15:42:03$ [ -e /etc/init.d/pe-puppet-agent ] centos-6-64-1 executed in 0.04 seconds Exited: 1 centos-6-64-1 15:42:03$ env PATH="/opt/puppet/bin:${PATH}" RUBYLIB="${RUBYLIB}" puppet resource service pe-puppet ensure=stopped Notice: /Service[pe-puppet]/ensure: ensure changed 'running' to 'stopped' service { 'pe-puppet': ensure => 'stopped', }
  18. 18. Not So Pretty - Host Configuration Summary - - Test Case Summary for suite 'tests' - Total Suite Time: 571.58 seconds Average Test Time: 4.40 seconds Attempted: 130 Passed: 70 Failed: 0 Errored: 0 Skipped: 60 Pending: 0 Total: 130
  19. 19. Links of Interest ● Beaker on GitHub ● Beaker Wiki ● Beaker Yard Docs at RubyDoc ● FOSS Puppet Acceptance Tests ● Example Beaker Report
  20. 20. Questions Questions

×