SlideShare a Scribd company logo
1 of 30
Software Testing &
Quality Assurance
Why using Specflow (Gherkin) and Selenium ?
Benjamin Baumann
@Zentiltoutou
October 21st 2016
How much costs a bug?
• 1962 NASA - Mariner 1
Omission of a hyphen in instructions. Auto destruct. $18M
• 1996 Ariane 5
Integer Overflow on old legacy code that is not needed. No flight
simulator to spare money. $370M for satellites alone
Coder punchline #1
How much costs a bug?
• 2009 Toyota
Lag in the anti-lock-brake system. Recall 9M cars. $3G estimated
• 2012 Knight Capital Group
Code deployed to all but one server. This server sent out 4M+ wrong
stock orders in one hour. $440M
But we’re no Spacecraft or trading firm!
• 2015 Eurosport Player V6
Video lags, fps drop, overheating PC, angry clients.
Due to incompatibility between technology and requirements.
Detected by beta testing but gone live before the test results
Ok. Let’s test! White-box? Black-box?
• White-box testing
Tests the internal structure or workings of a program :
• Unit tests
• Functional testing
• Integration testing
• Regression testing
• Load & Stress testing
• Sanity & Smoke testing
• Black-box testing
Software is a black box. Tester knows nothing about how it works.
• Acceptance testing
• Beta testing
Unit tests are idiots.
Unit tests are idiots.
Unit tests are idiots but legion!
• Think about code coverage
• Assess code quality, not software’s
• Think about edge cases, error handling
Unit tests are idiots, legion and hard to
maintain
• Each code change/writing begin with test change/writing
• « I’m a developer, these tests are idiots! Why do I have to write
them? »
• « The tests failed, such a pain. I’ll just comment them out »
Break #1 : That’s not me. All internet is saying it!
That’s not me. All internet is saying it!
That’s not me. All internet is saying it!
That’s not me. All internet is saying it!
Still, I want to do unit testing
• Please, do unit testing only if :
• You have a decent number of developers in your team
• You have time to do it and to maintain it
• You can run them and validate them automatically (through CI)
• You run a business critical project
• You have detailled technical specs
• Coding unit test is still coding, treat your tests like your code
• Don’t write the code AND the tests, make someone else write the tests.
• Golden rule : « Each unit test case should be very limited in scope »
Ok I have a ton of unit tests. Am I OK?
Ok I have a ton of unit tests. Am I OK?
Focus on functional,regression and
acceptance tests
• Testing software features above code methods
• Less detailed, less to do, less to maintain
• Focus on testing the requirements/specs
• Safeguard for developers
Ok let’s test a feature !
• Describe the feature : Who? What? Why?
• « In order to watch the player
As a Eurosport Player user
I want to be able to connect»
• Help describing the need
• Feature-centric
• Technology agnostic
• Need for testing scenarios
Ok let’s write a scenario !
Given I go to the Eurosport Player home page
And I open the connection modal
And I enter my credentials
When I submit the form
Then I must be logged in
White-box? Black-box?
Ok let’s write a scenario!
Given I go to the Eurosport Player home page
And I open the connection modal
And I enter my credentials
When I submit the form
Then I must be logged in
White-box! Describing a feature should be blackboxed.
Ok let’s write a better scenario!
Given I go to the Eurosport Player
When I login
Then I must be able to watch Eurosport Player
No tech. No design stuff. Just the feature.
Feature does not change when code is refactored.
You should rewrite the code behind, but not the test scenario
Break #2: Understanding others
Break #2: Understanding others
• « Hey, this is not the behaviour I asked for !», « But that’s what you
told me in your mail… », « You did not understand, that’s not what I
wanted »
• « Domain, Network, AD, I mix up all these, it’s gibberish to me »
• Solutions
• Learn the other language so that you understand them
• Everyone learns a new language so that we understand each other
(AWS)
• Don’t go into details, just do high level
• Speak like you’d speak to the average man in the street
What about Gherkin?
• We’ve already used Gherkin
• Gherkin is the language that Specflow understands. It is a Business
Readable, Domain Specific Language that lets you describe software’s
behaviour without detailing how that behaviour is implemented.
• Gherkin serves two purposes — documentation and automated tests.
The third is a bonus feature — when it yells in red it’s talking to you,
telling you what code you should write.
Documentation by Gherkin
• List features
• List testing scenarios
• Readable by EVERYONE
• Hard to write, easy to understand
• A heaven for maintenance
• http://qa.sti.eurosport.intra/Home/SpecflowList?path=d%3A%5Csites
%5CQA%5CProjects%5CEurosport%20Player%20PROD%5CScenarios&
projectName=Eurosport%20Player%20PROD
Automated tests with Specflow
• Each scenario line is linked to a code method
• Pass scenario data to the method
• Scenario Context (browser, language, environment…)
• Runnable in classic test runners (NUnit, MsTest …)
• Explicit errors
• When failed, need to go deeper with unit tests or by hand
And what about Selenium?
• Selenium WebDriver is a library that can drive a web browser
• Method on the webdriver results on « real user » action
• Let’ code!
Merci!

More Related Content

What's hot

Basics of Software Testing
Basics of Software TestingBasics of Software Testing
Basics of Software TestingShakal Shukla
 
Manual testing
Manual testingManual testing
Manual testingkaryatechs
 
Software Testing As a Career Path
Software Testing As a Career PathSoftware Testing As a Career Path
Software Testing As a Career PathRock Interview
 
Alpha beta and acceptance testing
Alpha beta and acceptance testing Alpha beta and acceptance testing
Alpha beta and acceptance testing shah baadshah
 
Software testing
Software testingSoftware testing
Software testingBharath K
 
Career in Software Testing | Skills Required for Software Test Engineer | Edu...
Career in Software Testing | Skills Required for Software Test Engineer | Edu...Career in Software Testing | Skills Required for Software Test Engineer | Edu...
Career in Software Testing | Skills Required for Software Test Engineer | Edu...Edureka!
 
Software Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival GuideSoftware Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival GuideOleksandr Lutsaievskyi
 
Testing automation in agile environment
Testing automation in agile environmentTesting automation in agile environment
Testing automation in agile environmentPerfecto Mobile
 
Manual Testing Online Training
Manual Testing Online Training Manual Testing Online Training
Manual Testing Online Training QEdge Tech
 
Seminar on Software Testing
Seminar on Software TestingSeminar on Software Testing
Seminar on Software TestingBeat Fluri
 
TESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPTTESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPTsuhasreddy1
 
General technical interview questions
General technical interview questionsGeneral technical interview questions
General technical interview questionsKevalkumar Shah
 

What's hot (19)

Basics of Software Testing
Basics of Software TestingBasics of Software Testing
Basics of Software Testing
 
Manual testing
Manual testingManual testing
Manual testing
 
Software Testing As a Career Path
Software Testing As a Career PathSoftware Testing As a Career Path
Software Testing As a Career Path
 
Manual testing ppt
Manual testing pptManual testing ppt
Manual testing ppt
 
Alpha beta and acceptance testing
Alpha beta and acceptance testing Alpha beta and acceptance testing
Alpha beta and acceptance testing
 
Software testing
Software testingSoftware testing
Software testing
 
Career in Software Testing | Skills Required for Software Test Engineer | Edu...
Career in Software Testing | Skills Required for Software Test Engineer | Edu...Career in Software Testing | Skills Required for Software Test Engineer | Edu...
Career in Software Testing | Skills Required for Software Test Engineer | Edu...
 
Unit testing
Unit testingUnit testing
Unit testing
 
Software Testing and Debugging
Software Testing and DebuggingSoftware Testing and Debugging
Software Testing and Debugging
 
SW Testing Fundamentals
SW Testing FundamentalsSW Testing Fundamentals
SW Testing Fundamentals
 
Software Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival GuideSoftware Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival Guide
 
Testing automation in agile environment
Testing automation in agile environmentTesting automation in agile environment
Testing automation in agile environment
 
Unit tests benefits
Unit tests benefitsUnit tests benefits
Unit tests benefits
 
Testing Best Practices
Testing Best PracticesTesting Best Practices
Testing Best Practices
 
Abc of testing
Abc of testingAbc of testing
Abc of testing
 
Manual Testing Online Training
Manual Testing Online Training Manual Testing Online Training
Manual Testing Online Training
 
Seminar on Software Testing
Seminar on Software TestingSeminar on Software Testing
Seminar on Software Testing
 
TESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPTTESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPT
 
General technical interview questions
General technical interview questionsGeneral technical interview questions
General technical interview questions
 

Similar to Software testing and quality assurance

Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Danny Preussler
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automationVishal Banthia
 
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Conference
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven developmentEinar Ingebrigtsen
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1Blue Elephant Consulting
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentShawn Jones
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Console Development in 15 minutes
Console Development in 15 minutesConsole Development in 15 minutes
Console Development in 15 minutesSperasoft
 
Winning strategies in Test Automation
Winning strategies in Test AutomationWinning strategies in Test Automation
Winning strategies in Test AutomationXBOSoft
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium SuccessfullyDave Haeffner
 
An Introduction To Software Development - Final Review
An Introduction To Software Development - Final ReviewAn Introduction To Software Development - Final Review
An Introduction To Software Development - Final ReviewBlue Elephant Consulting
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....Mike Harris
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucksPeter Gfader
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testingDuy Tan Geek
 
Quality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality MattersQuality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality MattersMarc Miquel
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)Nacho Cougil
 

Similar to Software testing and quality assurance (20)

Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
eXtreme Programming
eXtreme ProgrammingeXtreme Programming
eXtreme Programming
 
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
 
Perl-Critic
Perl-CriticPerl-Critic
Perl-Critic
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Console Development in 15 minutes
Console Development in 15 minutesConsole Development in 15 minutes
Console Development in 15 minutes
 
Winning strategies in Test Automation
Winning strategies in Test AutomationWinning strategies in Test Automation
Winning strategies in Test Automation
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
An Introduction To Software Development - Final Review
An Introduction To Software Development - Final ReviewAn Introduction To Software Development - Final Review
An Introduction To Software Development - Final Review
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucks
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
 
Quality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality MattersQuality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality Matters
 
Bug Hunting Safari
Bug Hunting SafariBug Hunting Safari
Bug Hunting Safari
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
 

Recently uploaded

Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 

Recently uploaded (20)

Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

Software testing and quality assurance

  • 1. Software Testing & Quality Assurance Why using Specflow (Gherkin) and Selenium ? Benjamin Baumann @Zentiltoutou October 21st 2016
  • 2. How much costs a bug? • 1962 NASA - Mariner 1 Omission of a hyphen in instructions. Auto destruct. $18M • 1996 Ariane 5 Integer Overflow on old legacy code that is not needed. No flight simulator to spare money. $370M for satellites alone
  • 4. How much costs a bug? • 2009 Toyota Lag in the anti-lock-brake system. Recall 9M cars. $3G estimated • 2012 Knight Capital Group Code deployed to all but one server. This server sent out 4M+ wrong stock orders in one hour. $440M
  • 5.
  • 6. But we’re no Spacecraft or trading firm! • 2015 Eurosport Player V6 Video lags, fps drop, overheating PC, angry clients. Due to incompatibility between technology and requirements. Detected by beta testing but gone live before the test results
  • 7. Ok. Let’s test! White-box? Black-box? • White-box testing Tests the internal structure or workings of a program : • Unit tests • Functional testing • Integration testing • Regression testing • Load & Stress testing • Sanity & Smoke testing • Black-box testing Software is a black box. Tester knows nothing about how it works. • Acceptance testing • Beta testing
  • 8. Unit tests are idiots.
  • 9. Unit tests are idiots.
  • 10. Unit tests are idiots but legion! • Think about code coverage • Assess code quality, not software’s • Think about edge cases, error handling
  • 11. Unit tests are idiots, legion and hard to maintain • Each code change/writing begin with test change/writing • « I’m a developer, these tests are idiots! Why do I have to write them? » • « The tests failed, such a pain. I’ll just comment them out »
  • 12. Break #1 : That’s not me. All internet is saying it!
  • 13. That’s not me. All internet is saying it!
  • 14. That’s not me. All internet is saying it!
  • 15. That’s not me. All internet is saying it!
  • 16. Still, I want to do unit testing • Please, do unit testing only if : • You have a decent number of developers in your team • You have time to do it and to maintain it • You can run them and validate them automatically (through CI) • You run a business critical project • You have detailled technical specs • Coding unit test is still coding, treat your tests like your code • Don’t write the code AND the tests, make someone else write the tests. • Golden rule : « Each unit test case should be very limited in scope »
  • 17. Ok I have a ton of unit tests. Am I OK?
  • 18. Ok I have a ton of unit tests. Am I OK?
  • 19. Focus on functional,regression and acceptance tests • Testing software features above code methods • Less detailed, less to do, less to maintain • Focus on testing the requirements/specs • Safeguard for developers
  • 20. Ok let’s test a feature ! • Describe the feature : Who? What? Why? • « In order to watch the player As a Eurosport Player user I want to be able to connect» • Help describing the need • Feature-centric • Technology agnostic • Need for testing scenarios
  • 21. Ok let’s write a scenario ! Given I go to the Eurosport Player home page And I open the connection modal And I enter my credentials When I submit the form Then I must be logged in White-box? Black-box?
  • 22. Ok let’s write a scenario! Given I go to the Eurosport Player home page And I open the connection modal And I enter my credentials When I submit the form Then I must be logged in White-box! Describing a feature should be blackboxed.
  • 23. Ok let’s write a better scenario! Given I go to the Eurosport Player When I login Then I must be able to watch Eurosport Player No tech. No design stuff. Just the feature. Feature does not change when code is refactored. You should rewrite the code behind, but not the test scenario
  • 25. Break #2: Understanding others • « Hey, this is not the behaviour I asked for !», « But that’s what you told me in your mail… », « You did not understand, that’s not what I wanted » • « Domain, Network, AD, I mix up all these, it’s gibberish to me » • Solutions • Learn the other language so that you understand them • Everyone learns a new language so that we understand each other (AWS) • Don’t go into details, just do high level • Speak like you’d speak to the average man in the street
  • 26. What about Gherkin? • We’ve already used Gherkin • Gherkin is the language that Specflow understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. • Gherkin serves two purposes — documentation and automated tests. The third is a bonus feature — when it yells in red it’s talking to you, telling you what code you should write.
  • 27. Documentation by Gherkin • List features • List testing scenarios • Readable by EVERYONE • Hard to write, easy to understand • A heaven for maintenance • http://qa.sti.eurosport.intra/Home/SpecflowList?path=d%3A%5Csites %5CQA%5CProjects%5CEurosport%20Player%20PROD%5CScenarios& projectName=Eurosport%20Player%20PROD
  • 28. Automated tests with Specflow • Each scenario line is linked to a code method • Pass scenario data to the method • Scenario Context (browser, language, environment…) • Runnable in classic test runners (NUnit, MsTest …) • Explicit errors • When failed, need to go deeper with unit tests or by hand
  • 29. And what about Selenium? • Selenium WebDriver is a library that can drive a web browser • Method on the webdriver results on « real user » action • Let’ code!