SlideShare a Scribd company logo
1 of 23
Download to read offline
Product development
   with cucumber
 with just enough infrastructure
          Michael Nacos
Intro




what to expect from this talk
● integration tests=important for a tech startup
● cucumber ecosystem is ideal for our stack
  and our product requirements
● cucumber + git + chef = heart
● duck test/typing references

don't expect:
● the definitive cucumber style guide
● plug-and-play solutions
Intro




cucumber as part of a whole




          and too many others...
leemail




leemail for people




bookmarklet
leemail




why
●   to let people share their email fearlessly
●   to shift unsubscribe power back to people
●   to encourage ethical behaviour from vendors
●   to help vendors safeguard their reputation
    and customer data

    it's about connecting, in a way that
    makes everyone happy
leemail




leemail for businesses
● do you collect
  email addresses?
● are you good?
● do you want to
  shout it?

we help you establish
and secure the
relationship against
leaks and bad PR
cukes over time




what do the cukes look like




                     cukes are part of the source tree
cukes over time




stories, branches
cukes over time


                               Cukes or
                               else!




Monday   Tuesday   Wednesday   Thursday   Friday
stack requirements




netbooks
if it can:
  ● run cukes
  ● connect to a vpn
  ● git pull/push


         ... it's a dev machine         OR

                       editors:
                        ● 2 vi users
                        ● 1 emacs
                        ● 1 notepad++
stack requirements




email is different (esp. for leemail)
● mail servers need dns records, you cannot
  send to test@127.0.0.1
● there is an excellent 'mail' gem, but no smtp
  server gem afaik
● gems like 'mailtrap' exist but our smtp
  servers do more than just accept emails
● our daemons feed off rabbitmq queues, they
  shouldn't have to be changed for tests
● ideally, we'd have a lightweight smtp server
  which supports rules and delivers to rabbit
stack requirements




configuration is part of the product
# setup postfix
%w{dynamicmaps.cf mailbox_commands main.cf master.cf sender_canonical
password restricted_destinations sender_relayhosts}.each do |cfg|
  template "/etc/postfix/#{cfg}" do
    source "postfix/#{cfg}.erb"
    owner "root"
    group "root"
    mode cfg == 'password' ? 0640 : 0644
    notifies :restart, resources(:service => "postfix")
  end
end
                                                                Servers

git pull
                                                               Dev env
# ok, you need to satisfy an erlang dependency manually once
stack requirements




rails environments      (taking advnatage of)




               good for interactive tests on your local
               machine, no email infrastructure, run
               mailtrap
development

test           for automated tests, minimum viable test
               environment for email testing available


production     for interactive tests on a server, chef
               dependency and configuration
               management a given
what we test




value
we want to know:
● existing functionality has not been broken
● new functionality is correct
● before deploying to a server

without:
● expensive equipment
● maintaining dev-specific environments
● building internet replicas locally
what we test




RAILS_ENV='test'
if it speaks SMTP and it can follow some rules
and deliver messages to a RabbitMQ queue...

  it's a leemail mailserv

then the cukes can focus on things like:

● are email headers re-written properly?
● do daemons deliver only to 'on' connections?
etc.
how we test




extending our World
in local_env.rb:
   require ...
   World(EmailHelpers)
in email_helpers.rb:
   module EmailHelpers
     # called before each scenario
     def self.extended(base)
     end
   end
   # setting up email environment at cucumber startup
   EmailHelpers.setup_test_email_environment
   # tearing down email environment at cucumber exit
   at_exit do
     EmailHelpers.tear_down_test_email_environment
   end
how we test




postfix_stub              (filesystem mbox)


                             emails           ruby mail

ruby
net/smtp      SMTP
                            leemails          ruby amqp

                            (RabbitMQ)

in email_helpers.rb:
def get_messages_from_mbox(mbox_path)
    # parsing mbox format
    raw_messages = IO.read(mbox_path).split(/nFrom .+n/)
    # returning a list of 'mail' messages
    raw_messages.map { |r| Mail.read_from_string(r) }
end
examples




leemail reply
examples




bandit
tips




i18n
makes your cukes less brittle




you can write:

Then I should see flash message "devise.
sessions.signed_in"
tips




javascript
gem 'capybara-webkit' # requires apt-get install libqt4-dev

in env.rb:

   # use webkit driver in @javascript scenaria
   Capybara.javascript_driver = :webkit

   # setting the test server port to a known value
   Capybara.server_port =AppConfig['test_server_port']

then add @javascript tag to specific cukes
challenges




iframes (well, leemail iframes)
  find iframe        nav in iframe




     js in iframe     nav in parent
Product development with cucumber


     @mnacos                @leemailme


      https://leemail.me/r/CUKEUP




                Thank You

More Related Content

What's hot

Leave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraLeave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraHiroshi SHIBATA
 
Ruby 1.9 Fibers
Ruby 1.9 FibersRuby 1.9 Fibers
Ruby 1.9 FibersKevin Ball
 
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Timothy Appnel
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpOntico
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef
 
Gearman - Job Queue
Gearman - Job QueueGearman - Job Queue
Gearman - Job QueueDiego Lewin
 
Ansible top 10 - 2018
Ansible top 10 -  2018Ansible top 10 -  2018
Ansible top 10 - 2018Viresh Doshi
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swposcon2007
 
CoffeeScript Design Patterns
CoffeeScript Design PatternsCoffeeScript Design Patterns
CoffeeScript Design PatternsTrevorBurnham
 
Using Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresUsing Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresRachel Andrew
 
Introduction to puppet
Introduction to puppetIntroduction to puppet
Introduction to puppetHabeeb Rahman
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleMike Willbanks
 
Concurrent Ruby Application Servers
Concurrent Ruby Application ServersConcurrent Ruby Application Servers
Concurrent Ruby Application ServersLin Jen-Shin
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Michael Lihs
 
DB Replication With Rails
DB Replication With RailsDB Replication With Rails
DB Replication With Railsschoefmax
 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsJonathan Hitchcock
 

What's hot (20)

Gearman and Perl
Gearman and PerlGearman and Perl
Gearman and Perl
 
Leave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraLeave end-to-end testing to Capybara
Leave end-to-end testing to Capybara
 
Ruby 1.9 Fibers
Ruby 1.9 FibersRuby 1.9 Fibers
Ruby 1.9 Fibers
 
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorp
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015
 
Gearman - Job Queue
Gearman - Job QueueGearman - Job Queue
Gearman - Job Queue
 
Ansible top 10 - 2018
Ansible top 10 -  2018Ansible top 10 -  2018
Ansible top 10 - 2018
 
Docker
DockerDocker
Docker
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
 
CoffeeScript Design Patterns
CoffeeScript Design PatternsCoffeeScript Design Patterns
CoffeeScript Design Patterns
 
Using Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresUsing Puppet in Small Infrastructures
Using Puppet in Small Infrastructures
 
Chef conf-2014
Chef conf-2014Chef conf-2014
Chef conf-2014
 
Introduction to puppet
Introduction to puppetIntroduction to puppet
Introduction to puppet
 
Os Alrubaie
Os AlrubaieOs Alrubaie
Os Alrubaie
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for Scale
 
Concurrent Ruby Application Servers
Concurrent Ruby Application ServersConcurrent Ruby Application Servers
Concurrent Ruby Application Servers
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014
 
DB Replication With Rails
DB Replication With RailsDB Replication With Rails
DB Replication With Rails
 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad Decisions
 

Viewers also liked

Presentation
PresentationPresentation
Presentationnuttynico
 
Jordan west real workscalazfinal2
Jordan west   real workscalazfinal2Jordan west   real workscalazfinal2
Jordan west real workscalazfinal2Skills Matter Talks
 
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in AngerSCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in AngerSkills Matter Talks
 
(Oleg zhurakousky)spring integration-scala-intro
(Oleg zhurakousky)spring integration-scala-intro(Oleg zhurakousky)spring integration-scala-intro
(Oleg zhurakousky)spring integration-scala-introSkills Matter Talks
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12mercetorrasgali
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12mercetorrasgali
 
K O N P E T E N T Z I A D I G I T A L A
K O N P E T E N T Z I A  D I G I T A L AK O N P E T E N T Z I A  D I G I T A L A
K O N P E T E N T Z I A D I G I T A L AJoakintxo
 
Martin sustrik future_of_messaging
Martin sustrik future_of_messagingMartin sustrik future_of_messaging
Martin sustrik future_of_messagingSkills Matter Talks
 

Viewers also liked (18)

Presentation
PresentationPresentation
Presentation
 
12
1212
12
 
Jordan west real workscalazfinal2
Jordan west   real workscalazfinal2Jordan west   real workscalazfinal2
Jordan west real workscalazfinal2
 
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in AngerSCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
 
(Oleg zhurakousky)spring integration-scala-intro
(Oleg zhurakousky)spring integration-scala-intro(Oleg zhurakousky)spring integration-scala-intro
(Oleg zhurakousky)spring integration-scala-intro
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12
 
Marek pubsubhuddle realtime_web
Marek pubsubhuddle realtime_webMarek pubsubhuddle realtime_web
Marek pubsubhuddle realtime_web
 
Mindmap john
Mindmap johnMindmap john
Mindmap john
 
Pdhpe pp
Pdhpe ppPdhpe pp
Pdhpe pp
 
English
EnglishEnglish
English
 
Couch db skillsmatter-prognosql
Couch db skillsmatter-prognosqlCouch db skillsmatter-prognosql
Couch db skillsmatter-prognosql
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12
 
Tmt predictions 2011
Tmt predictions 2011Tmt predictions 2011
Tmt predictions 2011
 
K O N P E T E N T Z I A D I G I T A L A
K O N P E T E N T Z I A  D I G I T A L AK O N P E T E N T Z I A  D I G I T A L A
K O N P E T E N T Z I A D I G I T A L A
 
;)
;);)
;)
 
Martin sustrik future_of_messaging
Martin sustrik future_of_messagingMartin sustrik future_of_messaging
Martin sustrik future_of_messaging
 
Audit toolkit
Audit toolkitAudit toolkit
Audit toolkit
 
Real World Scalaz
Real World ScalazReal World Scalaz
Real World Scalaz
 

Similar to CukeUp! 2012: Michael Nacos on Just enough infrastructure for product development with cucumber

Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationSuresh Kumar
 
Life in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with djangoLife in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with djangoTareque Hossain
 
Lotuscript for large systems
Lotuscript for large systemsLotuscript for large systems
Lotuscript for large systemsBill Buchan
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)DECK36
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Yan Cui
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Yan Cui
 
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...Simplilearn
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLBarry Jones
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupMist.io
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pieTomas Doran
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices💡 Tomasz Kogut
 
Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvarsSam Marley-Jarrett
 
Common Challenges in DevOps Change Management
Common Challenges in DevOps Change ManagementCommon Challenges in DevOps Change Management
Common Challenges in DevOps Change ManagementMatt Ray
 
2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD WorkshopWolfram Arnold
 
20141210 rakuten techtalk
20141210 rakuten techtalk20141210 rakuten techtalk
20141210 rakuten techtalkHiroshi SHIBATA
 
Как мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управленияКак мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управленияPositive Hack Days
 
Scaling and Distributing
Scaling and DistributingScaling and Distributing
Scaling and DistributingDima Malenko
 

Similar to CukeUp! 2012: Michael Nacos on Just enough infrastructure for product development with cucumber (20)

Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Life in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with djangoLife in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with django
 
Lotuscript for large systems
Lotuscript for large systemsLotuscript for large systems
Lotuscript for large systems
 
DevOps
DevOpsDevOps
DevOps
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)
 
Ruby For Startups
Ruby For StartupsRuby For Startups
Ruby For Startups
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)
 
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetup
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pie
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
 
Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvars
 
Common Challenges in DevOps Change Management
Common Challenges in DevOps Change ManagementCommon Challenges in DevOps Change Management
Common Challenges in DevOps Change Management
 
2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop
 
20141210 rakuten techtalk
20141210 rakuten techtalk20141210 rakuten techtalk
20141210 rakuten techtalk
 
Как мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управленияКак мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управления
 
Scaling and Distributing
Scaling and DistributingScaling and Distributing
Scaling and Distributing
 

More from Skills Matter Talks

More from Skills Matter Talks (7)

Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012
 
Cnc scala-presentation
Cnc scala-presentationCnc scala-presentation
Cnc scala-presentation
 
Arvindsujeeth scaladays12
Arvindsujeeth scaladays12Arvindsujeeth scaladays12
Arvindsujeeth scaladays12
 
Scala days mizushima
Scala days mizushimaScala days mizushima
Scala days mizushima
 
Project kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scalaProject kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scala
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
Prediction suretogowrong
Prediction suretogowrongPrediction suretogowrong
Prediction suretogowrong
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

CukeUp! 2012: Michael Nacos on Just enough infrastructure for product development with cucumber

  • 1. Product development with cucumber with just enough infrastructure Michael Nacos
  • 2. Intro what to expect from this talk ● integration tests=important for a tech startup ● cucumber ecosystem is ideal for our stack and our product requirements ● cucumber + git + chef = heart ● duck test/typing references don't expect: ● the definitive cucumber style guide ● plug-and-play solutions
  • 3. Intro cucumber as part of a whole and too many others...
  • 5. leemail why ● to let people share their email fearlessly ● to shift unsubscribe power back to people ● to encourage ethical behaviour from vendors ● to help vendors safeguard their reputation and customer data it's about connecting, in a way that makes everyone happy
  • 6. leemail leemail for businesses ● do you collect email addresses? ● are you good? ● do you want to shout it? we help you establish and secure the relationship against leaks and bad PR
  • 7. cukes over time what do the cukes look like cukes are part of the source tree
  • 9. cukes over time Cukes or else! Monday Tuesday Wednesday Thursday Friday
  • 10. stack requirements netbooks if it can: ● run cukes ● connect to a vpn ● git pull/push ... it's a dev machine OR editors: ● 2 vi users ● 1 emacs ● 1 notepad++
  • 11. stack requirements email is different (esp. for leemail) ● mail servers need dns records, you cannot send to test@127.0.0.1 ● there is an excellent 'mail' gem, but no smtp server gem afaik ● gems like 'mailtrap' exist but our smtp servers do more than just accept emails ● our daemons feed off rabbitmq queues, they shouldn't have to be changed for tests ● ideally, we'd have a lightweight smtp server which supports rules and delivers to rabbit
  • 12. stack requirements configuration is part of the product # setup postfix %w{dynamicmaps.cf mailbox_commands main.cf master.cf sender_canonical password restricted_destinations sender_relayhosts}.each do |cfg| template "/etc/postfix/#{cfg}" do source "postfix/#{cfg}.erb" owner "root" group "root" mode cfg == 'password' ? 0640 : 0644 notifies :restart, resources(:service => "postfix") end end Servers git pull Dev env # ok, you need to satisfy an erlang dependency manually once
  • 13. stack requirements rails environments (taking advnatage of) good for interactive tests on your local machine, no email infrastructure, run mailtrap development test for automated tests, minimum viable test environment for email testing available production for interactive tests on a server, chef dependency and configuration management a given
  • 14. what we test value we want to know: ● existing functionality has not been broken ● new functionality is correct ● before deploying to a server without: ● expensive equipment ● maintaining dev-specific environments ● building internet replicas locally
  • 15. what we test RAILS_ENV='test' if it speaks SMTP and it can follow some rules and deliver messages to a RabbitMQ queue... it's a leemail mailserv then the cukes can focus on things like: ● are email headers re-written properly? ● do daemons deliver only to 'on' connections? etc.
  • 16. how we test extending our World in local_env.rb: require ... World(EmailHelpers) in email_helpers.rb: module EmailHelpers # called before each scenario def self.extended(base) end end # setting up email environment at cucumber startup EmailHelpers.setup_test_email_environment # tearing down email environment at cucumber exit at_exit do EmailHelpers.tear_down_test_email_environment end
  • 17. how we test postfix_stub (filesystem mbox) emails ruby mail ruby net/smtp SMTP leemails ruby amqp (RabbitMQ) in email_helpers.rb: def get_messages_from_mbox(mbox_path) # parsing mbox format raw_messages = IO.read(mbox_path).split(/nFrom .+n/) # returning a list of 'mail' messages raw_messages.map { |r| Mail.read_from_string(r) } end
  • 20. tips i18n makes your cukes less brittle you can write: Then I should see flash message "devise. sessions.signed_in"
  • 21. tips javascript gem 'capybara-webkit' # requires apt-get install libqt4-dev in env.rb: # use webkit driver in @javascript scenaria Capybara.javascript_driver = :webkit # setting the test server port to a known value Capybara.server_port =AppConfig['test_server_port'] then add @javascript tag to specific cukes
  • 22. challenges iframes (well, leemail iframes) find iframe nav in iframe js in iframe nav in parent
  • 23. Product development with cucumber @mnacos @leemailme https://leemail.me/r/CUKEUP Thank You