SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
7 Years In Testing
Tamás Tompa (Digital Natives)
tamas.tompa@digitalnatives.hu
Budapest Ruby Meetup 2013
11/09/2013
Thursday, September 12, 13
§ 7 years in ruby, rails
§ 7 years in webapp testing
§ 5 years in agile development
§ 5 years in automated testing
Thursday, September 12, 13
Looking for testing
best practices
Thursday, September 12, 13
Short version
INTEGRATE
AUTOMATE
Thursday, September 12, 13
Short version
INTEGRATE
AUTOMATE
(everything)
Thursday, September 12, 13
Human VS Machine
§ Use humans for thinking
§ Use machines for executing
§ Humans can forgive, forget things
§ Machines are strict, consequent
Thursday, September 12, 13
Theory
Thursday, September 12, 13
Development Workflow
Resolved Deployed
Testing /
Working
Testing /
Not
working
In
progress Stable
for feature based development
Thursday, September 12, 13
Automating steps
Resolved Deployed
Testing /
Working
Testing /
Not
working
In
progress Stable
Manual Automatic Manual Automatic
Thursday, September 12, 13
Automated Testing
§ rspec
§ turnip
§ cucumber
§ capybara
§ selenium -> phantomjs
§ factory girl
§ jenkins / cloud CI
TOOLS
Thursday, September 12, 13
Working, bug free software is
priceless...
Thursday, September 12, 13
Working, bug free software is
more expensive...
Thursday, September 12, 13
... but only if you don’t know
how to test
and maintain your code
Thursday, September 12, 13
Write tests for those parts of the
code which are...
§ the most often used
§ changing frequently
§ changing data and working with
financial data
§ more likely to fail
Thursday, September 12, 13
Instrumentation
§ Instrumentation means that the code gets enhanced with
flags, and when the execution passes a certain flag, it
gets set. When a test code coverage measurement is
made then the tool:
§ instruments the code - places these flags
§ runs the test cases - flags get set
§ and finally prints out the result - how many flags have
been set
§ During usage coverage measurement, test execution is
replaced by customer interaction.
Thursday, September 12, 13
Most often used code
§ Instrument the code base and deliver
it to the testers / customer
§ Turn on coverage measurement in your
(staging) application
§ Deploy it
§ Do manual testing of critical functions
§ Summarize and analyze metrics
§ Write tests for highly covered classes
Thursday, September 12, 13
Frequently changing code
§ Use version control system logs
§ Gitinspector
§ StatSVN
§ Find out which files change often!
Thursday, September 12, 13
Working with data
§ Make code reviews
§ Re-prioritize classes and methods
§ Add more priority when data is critical
§ Move to top when working with money
Thursday, September 12, 13
Failing, problematic code
§ Find and analyze bugs in your Issue
Tracker System
§ Write test before fixing the issue
§ Review CI server logs
§ collect often failing tests
§ Refactor unstable code
§ refactor your tests also
Thursday, September 12, 13
Git branching
§ Work only with feature branches
§ Test the branches separately
§ Use Pull Requests to integrate
feature branches to a development
branch
§ Do more (manual) testing on
development branch
§ Merge easily to stable,
than finally to production
Thursday, September 12, 13
Methods
§ TDD - it’s up to you :)
§ BDD - based on TDD + domain
specific acceptance criterias
§ CDD - for prototypes, spikes
Thursday, September 12, 13
In practice...
Thursday, September 12, 13
Manual Testing
§ Plan your test cases
§ at Sprint Planning Meetings
§ Allocate a good Tester to the team
§ If you can’t, test all User Story after
completion, within team, but between
team members
§ Try to measure coverage during
manual testing
Thursday, September 12, 13
Continuous Integration
§ Jenkins server
§ Cloud alternatives: travis-ci, circleci, drone.io
§ Parallel job execution (queues / executors)
§ Main branches VS Feature branches
§ Instant builds VS Daily builds
§ Conflicting databases and shared resources
§ CI rake task in the project
§ Re-run logic for Cucumber tests
§ Long running jobs
Thursday, September 12, 13
CI - Ruby, Rails
§ Jenkins / RVM Plugin
§ RVM-managed environment:
ruby-1.9.3-p392@PROJECTNAME
§ Jenkins / Ruby Metrics Plugin
§ Rcov coverage report
§ Other stats
§ Bundler integration
Thursday, September 12, 13
Thursday, September 12, 13
CI - Feature branches
§ Jenkins / Git Plugin
§ Branches to build:
^(?!.*master|stable|development|origin/HEAD).*$
§ Jenkins / Version Number Plugin
§ Version Number Format String:
#${BUILD_NUMBER}-${GIT_BRANCH}
Thursday, September 12, 13
CI - Build types
§ Instant builds
§ Higher priority
§ Immediately after commit
§ Build trigger: Poll SCM
§ Daily builds
§ Once a day
§ Long running tests
§ Build trigger: Build periodically
Thursday, September 12, 13
CI - Rake
task :commit => :clean do
Rake::Task['db:migrate'].invoke
Rake::Task['db:test:load'].invoke
Rake::Task['db:test:purge'].invoke
Rake::Task['ci:build:rspec_internal'].invoke
Rake::Task['ci:build:cucumber_internal'].invoke
end
rake ci:build:commit
> Example: https://gist.github.com/tompata/6513021
Thursday, September 12, 13
CI - Rerun
§ Re-run only previously failing tests
§ Re-try the randomly failing tests
§ Built-in support in Cucumber
§ Easy integration with Jenkins
§ Save resources and time
> Example: https://gist.github.com/tompata/6513060
Thursday, September 12, 13
CI - Integration
§ Bitbucket
§ Redmine
§ Notifiers (HipChat, Email, Desktop)
§ Deployment (Capistrano)
§ Monitoring (Airbrake, New Relic)
Thursday, September 12, 13
Thursday, September 12, 13
Thursday, September 12, 13
Thursday, September 12, 13
Thursday, September 12, 13
Thursday, September 12, 13
Browser tests
§ integration tests
§ cucumber / capybara
§ responsive design
§ phantomjs / screen sizes
§ cross browser (design)
§ mtest (npm) - multiplatform
§ saucelabs / cloud
§ 162 device/os/browser platforms
Thursday, September 12, 13
Responsive design
§ PhantomJS
§ Screen resolutions (window_size)
§ Cucumber profiles
> Example: https://gist.github.com/tompata/6512905
Thursday, September 12, 13
Stress tests
§ penetration / load testing before
releases
§ use separated, dedicated
environments (staging test)
§ use virtual instances (ec2)
§ monitor instances (new relic)
§ use online tools (loadimpact,
loader.io) or local (jmeter)
Thursday, September 12, 13
Coverage, Quality
§ rcov
§ simple cov
§ the magical 80%
§ code climate - code analysis, quality
Thursday, September 12, 13
INTEGRATE
AUTOMATE
Thursday, September 12, 13
Resources
§ http://zsoltfabok.com/blog/2011/05/narrow-down-what-to-test/
§ http://nvie.com/posts/a-successful-git-branching-model/
§ http://jenkins-ci.org/
§ https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Metrics+Plugin
§ https://saucelabs.com/
§ https://github.com/digitalnatives/
§ https://github.com/digitalnatives/mtest
§ https://gist.github.com/tompata/6513021
§ https://gist.github.com/tompata/6513060
§ https://gist.github.com/tompata/6512905
§ https://codeclimate.com/
§ http://loadimpact.com/
Thursday, September 12, 13
We’re hiring!
http://digitalnatives.hu/jobs
Thursday, September 12, 13

Weitere ähnliche Inhalte

Was ist angesagt?

Scale like a pro with Gearman
Scale like a pro with GearmanScale like a pro with Gearman
Scale like a pro with Gearman
Amal Raghav
 
Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and Capybara
Marc Seeger
 

Was ist angesagt? (20)

Scale like a pro with Gearman
Scale like a pro with GearmanScale like a pro with Gearman
Scale like a pro with Gearman
 
Gearman
GearmanGearman
Gearman
 
Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and Capybara
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
The Mysteries Of JavaScript-Fu (RailsConf Ediition)
The Mysteries Of JavaScript-Fu (RailsConf Ediition)The Mysteries Of JavaScript-Fu (RailsConf Ediition)
The Mysteries Of JavaScript-Fu (RailsConf Ediition)
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11
 
Show an Open Source Project Some Love and Start Using Travis-CI
Show an Open Source Project Some Love and Start Using Travis-CIShow an Open Source Project Some Love and Start Using Travis-CI
Show an Open Source Project Some Love and Start Using Travis-CI
 
Lets cook cucumber !!
Lets cook cucumber !!Lets cook cucumber !!
Lets cook cucumber !!
 
Managing Complexity with Module::Release
Managing Complexity with Module::ReleaseManaging Complexity with Module::Release
Managing Complexity with Module::Release
 
Groovy on Google App Engine with Gaelyk
Groovy on Google App Engine with GaelykGroovy on Google App Engine with Gaelyk
Groovy on Google App Engine with Gaelyk
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 
Continuous delivery of your legacy application
Continuous delivery of your legacy applicationContinuous delivery of your legacy application
Continuous delivery of your legacy application
 
Test Driving a jQuery Plugin
Test Driving a jQuery PluginTest Driving a jQuery Plugin
Test Driving a jQuery Plugin
 
JVM Web Frameworks Exploration
JVM Web Frameworks ExplorationJVM Web Frameworks Exploration
JVM Web Frameworks Exploration
 
Jest: Frontend Testing leicht gemacht @EnterJS2018
Jest: Frontend Testing leicht gemacht @EnterJS2018Jest: Frontend Testing leicht gemacht @EnterJS2018
Jest: Frontend Testing leicht gemacht @EnterJS2018
 
The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)
 
CI/CD doesn’t necessarily mean Jenkins - Omer Hamerman - DevOpsDays Tel Aviv ...
CI/CD doesn’t necessarily mean Jenkins - Omer Hamerman - DevOpsDays Tel Aviv ...CI/CD doesn’t necessarily mean Jenkins - Omer Hamerman - DevOpsDays Tel Aviv ...
CI/CD doesn’t necessarily mean Jenkins - Omer Hamerman - DevOpsDays Tel Aviv ...
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
 
Untangling spring week10
Untangling spring week10Untangling spring week10
Untangling spring week10
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
 

Andere mochten auch

Andere mochten auch (20)

Introduction to Reactive
Introduction to ReactiveIntroduction to Reactive
Introduction to Reactive
 
Agille Testing Meetup 1
Agille Testing Meetup 1Agille Testing Meetup 1
Agille Testing Meetup 1
 
Acunu Cassandra London Meetup
Acunu Cassandra London MeetupAcunu Cassandra London Meetup
Acunu Cassandra London Meetup
 
Agile Testing Alliance Chapter and Meetup Details - June 2016
Agile Testing Alliance Chapter and Meetup Details - June 2016Agile Testing Alliance Chapter and Meetup Details - June 2016
Agile Testing Alliance Chapter and Meetup Details - June 2016
 
Peer Meetup introduction & networking by Safaraz Ali delivered on 18th Nov 2016
Peer Meetup introduction & networking by Safaraz Ali delivered on 18th Nov 2016Peer Meetup introduction & networking by Safaraz Ali delivered on 18th Nov 2016
Peer Meetup introduction & networking by Safaraz Ali delivered on 18th Nov 2016
 
Paris Qa meetup - The testing family
Paris Qa meetup - The testing familyParis Qa meetup - The testing family
Paris Qa meetup - The testing family
 
Puppet meetup testing
Puppet meetup testingPuppet meetup testing
Puppet meetup testing
 
Ata pune 12 meetup 17 September 2016 - Introduction by Amol Deshpande
Ata pune 12 meetup 17 September 2016 - Introduction by Amol DeshpandeAta pune 12 meetup 17 September 2016 - Introduction by Amol Deshpande
Ata pune 12 meetup 17 September 2016 - Introduction by Amol Deshpande
 
Integration Testing for Polyglot Ecosystems
Integration Testing for Polyglot EcosystemsIntegration Testing for Polyglot Ecosystems
Integration Testing for Polyglot Ecosystems
 
Ata pune 12 meetup Future of testing 17 sep 2016 by sanjay upadhyay
Ata pune 12 meetup  Future of testing 17 sep 2016 by sanjay upadhyayAta pune 12 meetup  Future of testing 17 sep 2016 by sanjay upadhyay
Ata pune 12 meetup Future of testing 17 sep 2016 by sanjay upadhyay
 
Paris Qa Meetup - Testing Family
Paris Qa Meetup -  Testing FamilyParis Qa Meetup -  Testing Family
Paris Qa Meetup - Testing Family
 
Java Beginners Meetup February 2017: Testing and TDD
Java Beginners Meetup February 2017: Testing and TDDJava Beginners Meetup February 2017: Testing and TDD
Java Beginners Meetup February 2017: Testing and TDD
 
Meetup kickoff slides - Perfecto Mobile, September 2014
Meetup kickoff slides - Perfecto Mobile, September 2014Meetup kickoff slides - Perfecto Mobile, September 2014
Meetup kickoff slides - Perfecto Mobile, September 2014
 
DevOps Columbus Meetup Kickoff - Infrastructure as Code
DevOps Columbus Meetup Kickoff - Infrastructure as CodeDevOps Columbus Meetup Kickoff - Infrastructure as Code
DevOps Columbus Meetup Kickoff - Infrastructure as Code
 
RST - Makati Testers Meetup
RST - Makati Testers MeetupRST - Makati Testers Meetup
RST - Makati Testers Meetup
 
Meetup Testing Workshop 2016 - Gatling para pruebas de performance - Federico...
Meetup Testing Workshop 2016 - Gatling para pruebas de performance - Federico...Meetup Testing Workshop 2016 - Gatling para pruebas de performance - Federico...
Meetup Testing Workshop 2016 - Gatling para pruebas de performance - Federico...
 
Helsinki Legal Tech Meetup introduction
Helsinki Legal Tech Meetup introductionHelsinki Legal Tech Meetup introduction
Helsinki Legal Tech Meetup introduction
 
NoVA UX Meetup: Product Testing and Data-informed Design
NoVA UX Meetup: Product Testing and Data-informed DesignNoVA UX Meetup: Product Testing and Data-informed Design
NoVA UX Meetup: Product Testing and Data-informed Design
 
Tundra at Agile Mississauga Meetup Kick off Event
Tundra at Agile Mississauga Meetup Kick off EventTundra at Agile Mississauga Meetup Kick off Event
Tundra at Agile Mississauga Meetup Kick off Event
 
The Invisible Art Of Software Testing
The Invisible Art Of Software TestingThe Invisible Art Of Software Testing
The Invisible Art Of Software Testing
 

Ähnlich wie Ruby meetup 7_years_in_testing

Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and Beyond
Spike Brehm
 
CI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFSCI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFS
ScyllaDB
 
Kostentreiber bei der iOS-Entwicklung
Kostentreiber bei der iOS-EntwicklungKostentreiber bei der iOS-Entwicklung
Kostentreiber bei der iOS-Entwicklung
xrb
 

Ähnlich wie Ruby meetup 7_years_in_testing (20)

Backbone
BackboneBackbone
Backbone
 
From naive to agile - software engineering approach
From naive to agile - software engineering approachFrom naive to agile - software engineering approach
From naive to agile - software engineering approach
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)
 
Continuous Security Testing
Continuous Security TestingContinuous Security Testing
Continuous Security Testing
 
Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and Beyond
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 
Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Cd syd
Cd sydCd syd
Cd syd
 
Siegfried Goeschl - Performance Testing of a Road Tolling System - EuroSTAR 2012
Siegfried Goeschl - Performance Testing of a Road Tolling System - EuroSTAR 2012Siegfried Goeschl - Performance Testing of a Road Tolling System - EuroSTAR 2012
Siegfried Goeschl - Performance Testing of a Road Tolling System - EuroSTAR 2012
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
CI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFSCI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFS
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your Organization
 
Serverless in production, an experience report (IWOMM)
Serverless in production, an experience report (IWOMM)Serverless in production, an experience report (IWOMM)
Serverless in production, an experience report (IWOMM)
 
2019-09-10: Testing Contributions at Scale
2019-09-10: Testing Contributions at Scale2019-09-10: Testing Contributions at Scale
2019-09-10: Testing Contributions at Scale
 
Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Kostentreiber bei der iOS Entwicklung
Kostentreiber bei der iOS EntwicklungKostentreiber bei der iOS Entwicklung
Kostentreiber bei der iOS Entwicklung
 
Kostentreiber bei der iOS-Entwicklung
Kostentreiber bei der iOS-EntwicklungKostentreiber bei der iOS-Entwicklung
Kostentreiber bei der iOS-Entwicklung
 
Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)
 

Mehr von Digital Natives

Evolution of the Software Development Process ad Digital Natives
Evolution of the Software Development Process ad Digital NativesEvolution of the Software Development Process ad Digital Natives
Evolution of the Software Development Process ad Digital Natives
Digital Natives
 
Budapest.rb 2011/01 - Rails Deployment
Budapest.rb 2011/01 - Rails DeploymentBudapest.rb 2011/01 - Rails Deployment
Budapest.rb 2011/01 - Rails Deployment
Digital Natives
 

Mehr von Digital Natives (15)

How to support innovation in organisations @ Startup Safary
How to support innovation in organisations @ Startup SafaryHow to support innovation in organisations @ Startup Safary
How to support innovation in organisations @ Startup Safary
 
A termékfejlesztés rögös útja (avagy barangolás a módszertanok és eszközök er...
A termékfejlesztés rögös útja (avagy barangolás a módszertanok és eszközök er...A termékfejlesztés rögös útja (avagy barangolás a módszertanok és eszközök er...
A termékfejlesztés rögös útja (avagy barangolás a módszertanok és eszközök er...
 
Agile és lean workshop @ Startup Safary
Agile és lean workshop @ Startup SafaryAgile és lean workshop @ Startup Safary
Agile és lean workshop @ Startup Safary
 
Introduction to GraphQL with Ruby
Introduction to GraphQL with RubyIntroduction to GraphQL with Ruby
Introduction to GraphQL with Ruby
 
A visual introduction to concurrency and parallellism patterns
A visual introduction to concurrency and parallellism patternsA visual introduction to concurrency and parallellism patterns
A visual introduction to concurrency and parallellism patterns
 
How flat organisations support the innovation
How flat organisations support the innovationHow flat organisations support the innovation
How flat organisations support the innovation
 
CULTURE OF INNOVATION
CULTURE OF INNOVATIONCULTURE OF INNOVATION
CULTURE OF INNOVATION
 
Testing in JavaScript
Testing in JavaScriptTesting in JavaScript
Testing in JavaScript
 
Basics of Metaprogramming in Ruby
Basics of Metaprogramming in RubyBasics of Metaprogramming in Ruby
Basics of Metaprogramming in Ruby
 
Digital natives incubation process_2011-11-23_v09
Digital natives incubation process_2011-11-23_v09Digital natives incubation process_2011-11-23_v09
Digital natives incubation process_2011-11-23_v09
 
Evolution of the Software Development Process ad Digital Natives
Evolution of the Software Development Process ad Digital NativesEvolution of the Software Development Process ad Digital Natives
Evolution of the Software Development Process ad Digital Natives
 
Mixgar in Volt festival 2011
Mixgar in Volt festival 2011Mixgar in Volt festival 2011
Mixgar in Volt festival 2011
 
Mixgar prezi v1.2
Mixgar prezi v1.2Mixgar prezi v1.2
Mixgar prezi v1.2
 
Budapest.rb 2011/01 - Rails Deployment
Budapest.rb 2011/01 - Rails DeploymentBudapest.rb 2011/01 - Rails Deployment
Budapest.rb 2011/01 - Rails Deployment
 
Budapest.rb 201010
Budapest.rb 201010Budapest.rb 201010
Budapest.rb 201010
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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
 

Ruby meetup 7_years_in_testing

  • 1. 7 Years In Testing Tamás Tompa (Digital Natives) tamas.tompa@digitalnatives.hu Budapest Ruby Meetup 2013 11/09/2013 Thursday, September 12, 13
  • 2. § 7 years in ruby, rails § 7 years in webapp testing § 5 years in agile development § 5 years in automated testing Thursday, September 12, 13
  • 3. Looking for testing best practices Thursday, September 12, 13
  • 6. Human VS Machine § Use humans for thinking § Use machines for executing § Humans can forgive, forget things § Machines are strict, consequent Thursday, September 12, 13
  • 8. Development Workflow Resolved Deployed Testing / Working Testing / Not working In progress Stable for feature based development Thursday, September 12, 13
  • 9. Automating steps Resolved Deployed Testing / Working Testing / Not working In progress Stable Manual Automatic Manual Automatic Thursday, September 12, 13
  • 10. Automated Testing § rspec § turnip § cucumber § capybara § selenium -> phantomjs § factory girl § jenkins / cloud CI TOOLS Thursday, September 12, 13
  • 11. Working, bug free software is priceless... Thursday, September 12, 13
  • 12. Working, bug free software is more expensive... Thursday, September 12, 13
  • 13. ... but only if you don’t know how to test and maintain your code Thursday, September 12, 13
  • 14. Write tests for those parts of the code which are... § the most often used § changing frequently § changing data and working with financial data § more likely to fail Thursday, September 12, 13
  • 15. Instrumentation § Instrumentation means that the code gets enhanced with flags, and when the execution passes a certain flag, it gets set. When a test code coverage measurement is made then the tool: § instruments the code - places these flags § runs the test cases - flags get set § and finally prints out the result - how many flags have been set § During usage coverage measurement, test execution is replaced by customer interaction. Thursday, September 12, 13
  • 16. Most often used code § Instrument the code base and deliver it to the testers / customer § Turn on coverage measurement in your (staging) application § Deploy it § Do manual testing of critical functions § Summarize and analyze metrics § Write tests for highly covered classes Thursday, September 12, 13
  • 17. Frequently changing code § Use version control system logs § Gitinspector § StatSVN § Find out which files change often! Thursday, September 12, 13
  • 18. Working with data § Make code reviews § Re-prioritize classes and methods § Add more priority when data is critical § Move to top when working with money Thursday, September 12, 13
  • 19. Failing, problematic code § Find and analyze bugs in your Issue Tracker System § Write test before fixing the issue § Review CI server logs § collect often failing tests § Refactor unstable code § refactor your tests also Thursday, September 12, 13
  • 20. Git branching § Work only with feature branches § Test the branches separately § Use Pull Requests to integrate feature branches to a development branch § Do more (manual) testing on development branch § Merge easily to stable, than finally to production Thursday, September 12, 13
  • 21. Methods § TDD - it’s up to you :) § BDD - based on TDD + domain specific acceptance criterias § CDD - for prototypes, spikes Thursday, September 12, 13
  • 23. Manual Testing § Plan your test cases § at Sprint Planning Meetings § Allocate a good Tester to the team § If you can’t, test all User Story after completion, within team, but between team members § Try to measure coverage during manual testing Thursday, September 12, 13
  • 24. Continuous Integration § Jenkins server § Cloud alternatives: travis-ci, circleci, drone.io § Parallel job execution (queues / executors) § Main branches VS Feature branches § Instant builds VS Daily builds § Conflicting databases and shared resources § CI rake task in the project § Re-run logic for Cucumber tests § Long running jobs Thursday, September 12, 13
  • 25. CI - Ruby, Rails § Jenkins / RVM Plugin § RVM-managed environment: ruby-1.9.3-p392@PROJECTNAME § Jenkins / Ruby Metrics Plugin § Rcov coverage report § Other stats § Bundler integration Thursday, September 12, 13
  • 27. CI - Feature branches § Jenkins / Git Plugin § Branches to build: ^(?!.*master|stable|development|origin/HEAD).*$ § Jenkins / Version Number Plugin § Version Number Format String: #${BUILD_NUMBER}-${GIT_BRANCH} Thursday, September 12, 13
  • 28. CI - Build types § Instant builds § Higher priority § Immediately after commit § Build trigger: Poll SCM § Daily builds § Once a day § Long running tests § Build trigger: Build periodically Thursday, September 12, 13
  • 29. CI - Rake task :commit => :clean do Rake::Task['db:migrate'].invoke Rake::Task['db:test:load'].invoke Rake::Task['db:test:purge'].invoke Rake::Task['ci:build:rspec_internal'].invoke Rake::Task['ci:build:cucumber_internal'].invoke end rake ci:build:commit > Example: https://gist.github.com/tompata/6513021 Thursday, September 12, 13
  • 30. CI - Rerun § Re-run only previously failing tests § Re-try the randomly failing tests § Built-in support in Cucumber § Easy integration with Jenkins § Save resources and time > Example: https://gist.github.com/tompata/6513060 Thursday, September 12, 13
  • 31. CI - Integration § Bitbucket § Redmine § Notifiers (HipChat, Email, Desktop) § Deployment (Capistrano) § Monitoring (Airbrake, New Relic) Thursday, September 12, 13
  • 37. Browser tests § integration tests § cucumber / capybara § responsive design § phantomjs / screen sizes § cross browser (design) § mtest (npm) - multiplatform § saucelabs / cloud § 162 device/os/browser platforms Thursday, September 12, 13
  • 38. Responsive design § PhantomJS § Screen resolutions (window_size) § Cucumber profiles > Example: https://gist.github.com/tompata/6512905 Thursday, September 12, 13
  • 39. Stress tests § penetration / load testing before releases § use separated, dedicated environments (staging test) § use virtual instances (ec2) § monitor instances (new relic) § use online tools (loadimpact, loader.io) or local (jmeter) Thursday, September 12, 13
  • 40. Coverage, Quality § rcov § simple cov § the magical 80% § code climate - code analysis, quality Thursday, September 12, 13
  • 42. Resources § http://zsoltfabok.com/blog/2011/05/narrow-down-what-to-test/ § http://nvie.com/posts/a-successful-git-branching-model/ § http://jenkins-ci.org/ § https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Metrics+Plugin § https://saucelabs.com/ § https://github.com/digitalnatives/ § https://github.com/digitalnatives/mtest § https://gist.github.com/tompata/6513021 § https://gist.github.com/tompata/6513060 § https://gist.github.com/tompata/6512905 § https://codeclimate.com/ § http://loadimpact.com/ Thursday, September 12, 13