SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Automated testing
How?
Markko Paas
markko.paas@gmail.com
unit tests
component tests
integration tests
end-to-end and smoke tests
acceptance and contract tests
code review
continuous integration and deployment
4 clear blocks: setup, operation, validation, teardown
Single claim per test, description should not contain “and”
Independently executable
Unit tests
Test descriptions first, then code and tests in parallel
Code first, then tests
Pure TDD (single failing test – single feature – refactor – repeat)
Unit tests
https://github.com/johnpapa/angular-styleguide#write-tests-with-stories
Service1 Service2mock
adapter
?
?
Component tests
Cover interface
Cover possible behaviours of dependencies
Common mock for positive scenarios
Ad-hock mocks for error scenarios
Possible duplication of some unit tests
Mock databases with in-memory databases.
Component tests
Cover interface between units
E.g. if plugins can be plugged in
Often can be omitted because of component tests cover it
Sometimes it may be efficient to create integration tests instead of unit tests
Integration tests
✓ unit tests
✓ component tests
✓ integration tests
end-to-end and smoke tests
acceptance and contract tests
code review
continuous integration and deployment
Use staging environment
Stable test data set in database
(alternative would be setup and teardown as part of test)
Mock external http-based services using Robohydra
Create page models for abstracting interaction with html/css
Protractor for running tests in browser
End-to-end tests for HTTP API can be done using mocha, much faster
End-to-end tests
Technically same as end-to-end tests
Use in production environment right after deployment
Very limited number of tests, just to validate the deployment success
Smoke tests
Link and track with business requirements
Does not have to be end-to-end test
Acceptance tests
Set of customer-specific requirements
If the customer vanishes, the tests can be removed
Coverage tools can be used to find code that no customer requires
Contract tests
✓ unit tests
✓ component tests
✓ integration tests
✓ end-to-end and smoke tests
✓ acceptance and contract tests
code review
continuous integration and deployment
No seniority – everybody can and has to review
Are the tests descriptions working as a specification?
Has the author revised the existing tests for the entire unit or just added new?
Readability of both code and tests.
Third eye-pair code review for pair programming.
Code review
Continuous integration and deployment
Development
and tests
(feature
branch)
Code
review
Tests
(feature
branch) Merge to
master
Tests
(master)
End-to-end
tests
Deploy to
production
Deploy to
stage
Smoke
tests
Development CI (docker) Stage Production
Protractor – browser end-to-end test runner
Karma – JavaScript unit test runner
Mocha + chai – JavaScript unit test framework
Istanbul – coverage
Nock – http interception for nodejs
Sinon – mocking tool for JavaScript objects and libraries
Robohydra – webserver for mocking
Phabricator + arcanist – code review
Jenkins – continuous integration
Tools

Weitere ähnliche Inhalte

Was ist angesagt?

Practical unit testing in c & c++
Practical unit testing in c & c++Practical unit testing in c & c++
Practical unit testing in c & c++Matt Hargett
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript ApplicationsMuhammad Samu
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assuranceBenjamin Baumann
 
Regression Testing with Symfony
Regression Testing with SymfonyRegression Testing with Symfony
Regression Testing with SymfonyJoachim Unger
 
Regression Tests with Symfony - Example
Regression Tests with Symfony - ExampleRegression Tests with Symfony - Example
Regression Tests with Symfony - ExampleJoachim Unger
 
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)Kaunas Java User Group
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven TestingMaveryx
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool EvaluationKate Semizhon
 
Unit vs. Integration Tests
Unit vs. Integration TestsUnit vs. Integration Tests
Unit vs. Integration TestsDavid Völkel
 
Unit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqUnit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqXPDays
 
TDD in the ABAP world - sitNL 2013 edition
TDD in the ABAP world - sitNL 2013 editionTDD in the ABAP world - sitNL 2013 edition
TDD in the ABAP world - sitNL 2013 editionHendrik Neumann
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gaugevodqancr
 
Development and test infrastructure
Development and test infrastructureDevelopment and test infrastructure
Development and test infrastructureJun Li
 
Completed slides
Completed slidesCompleted slides
Completed slidesJyothi Vbs
 
Android tdd
Android tddAndroid tdd
Android tddNhan Cao
 

Was ist angesagt? (20)

Unit Testing Your Application
Unit Testing Your ApplicationUnit Testing Your Application
Unit Testing Your Application
 
Practical unit testing in c & c++
Practical unit testing in c & c++Practical unit testing in c & c++
Practical unit testing in c & c++
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript Applications
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assurance
 
Regression Testing with Symfony
Regression Testing with SymfonyRegression Testing with Symfony
Regression Testing with Symfony
 
Tdd for php
Tdd for phpTdd for php
Tdd for php
 
Regression Tests with Symfony - Example
Regression Tests with Symfony - ExampleRegression Tests with Symfony - Example
Regression Tests with Symfony - Example
 
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool Evaluation
 
Unit vs. Integration Tests
Unit vs. Integration TestsUnit vs. Integration Tests
Unit vs. Integration Tests
 
Unit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqUnit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and Moq
 
TDD in the ABAP world - sitNL 2013 edition
TDD in the ABAP world - sitNL 2013 editionTDD in the ABAP world - sitNL 2013 edition
TDD in the ABAP world - sitNL 2013 edition
 
Unit tests benefits
Unit tests benefitsUnit tests benefits
Unit tests benefits
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gauge
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Development and test infrastructure
Development and test infrastructureDevelopment and test infrastructure
Development and test infrastructure
 
Completed slides
Completed slidesCompleted slides
Completed slides
 
Android tdd
Android tddAndroid tdd
Android tdd
 

Andere mochten auch

Pricing Siddhant Gupta
Pricing Siddhant GuptaPricing Siddhant Gupta
Pricing Siddhant GuptaSiddhant Gupta
 
Water damage agent presentation
Water damage agent presentationWater damage agent presentation
Water damage agent presentationLonTiniakos
 
Choice of Entity for Startups by Huan Le
Choice of Entity for Startups by Huan LeChoice of Entity for Startups by Huan Le
Choice of Entity for Startups by Huan LePlatform Houston
 
projektijuhtimine - teooria ja praktika
projektijuhtimine - teooria ja praktikaprojektijuhtimine - teooria ja praktika
projektijuhtimine - teooria ja praktikaMarkko Paas
 
Understanding Risk Management by Bobby Talbott
Understanding Risk Management by Bobby TalbottUnderstanding Risk Management by Bobby Talbott
Understanding Risk Management by Bobby TalbottPlatform Houston
 
Rockethub: The world's crowdfunding machine
Rockethub: The world's crowdfunding machineRockethub: The world's crowdfunding machine
Rockethub: The world's crowdfunding machinePlatform Houston
 

Andere mochten auch (6)

Pricing Siddhant Gupta
Pricing Siddhant GuptaPricing Siddhant Gupta
Pricing Siddhant Gupta
 
Water damage agent presentation
Water damage agent presentationWater damage agent presentation
Water damage agent presentation
 
Choice of Entity for Startups by Huan Le
Choice of Entity for Startups by Huan LeChoice of Entity for Startups by Huan Le
Choice of Entity for Startups by Huan Le
 
projektijuhtimine - teooria ja praktika
projektijuhtimine - teooria ja praktikaprojektijuhtimine - teooria ja praktika
projektijuhtimine - teooria ja praktika
 
Understanding Risk Management by Bobby Talbott
Understanding Risk Management by Bobby TalbottUnderstanding Risk Management by Bobby Talbott
Understanding Risk Management by Bobby Talbott
 
Rockethub: The world's crowdfunding machine
Rockethub: The world's crowdfunding machineRockethub: The world's crowdfunding machine
Rockethub: The world's crowdfunding machine
 

Ähnlich wie Automated testing - how?

Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...OlyaSurits
 
Automation testing
Automation testingAutomation testing
Automation testingTomy Rhymond
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choicetoddbr
 
ATDD in Practice
ATDD in PracticeATDD in Practice
ATDD in PracticeSteven Mak
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020Abhijeet Vaikar
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and executionClemens Reijnen
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Abhijeet Vaikar
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Mohamed Taman
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual TestingDirecti Group
 
Automated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+TestingAutomated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+Testinggueste1e4db
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testingdidev
 
Testing Node.js.pdf
Testing Node.js.pdfTesting Node.js.pdf
Testing Node.js.pdfAhmed Hassan
 
Quality Loopback
Quality LoopbackQuality Loopback
Quality LoopbackOmar Bashir
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysisssuser2e8d4b
 
Writing useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildWriting useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildAndrei Sebastian Cîmpean
 
Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战George Ang
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestSeb Rose
 
May 05 test_code_states
May 05 test_code_statesMay 05 test_code_states
May 05 test_code_statesKyungHo Jung
 

Ähnlich wie Automated testing - how? (20)

Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
ATDD in Practice
ATDD in PracticeATDD in Practice
ATDD in Practice
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and execution
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Automated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+TestingAutomated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+Testing
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Testing Node.js.pdf
Testing Node.js.pdfTesting Node.js.pdf
Testing Node.js.pdf
 
Quality Loopback
Quality LoopbackQuality Loopback
Quality Loopback
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysis
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Writing useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildWriting useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you build
 
Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
 
May 05 test_code_states
May 05 test_code_statesMay 05 test_code_states
May 05 test_code_states
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 

Kürzlich hochgeladen

Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 

Kürzlich hochgeladen (20)

Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 

Automated testing - how?

  • 2. unit tests component tests integration tests end-to-end and smoke tests acceptance and contract tests code review continuous integration and deployment
  • 3.
  • 4.
  • 5. 4 clear blocks: setup, operation, validation, teardown Single claim per test, description should not contain “and” Independently executable Unit tests
  • 6. Test descriptions first, then code and tests in parallel Code first, then tests Pure TDD (single failing test – single feature – refactor – repeat) Unit tests
  • 8.
  • 9.
  • 11. Cover interface Cover possible behaviours of dependencies Common mock for positive scenarios Ad-hock mocks for error scenarios Possible duplication of some unit tests Mock databases with in-memory databases. Component tests
  • 12.
  • 13.
  • 14. Cover interface between units E.g. if plugins can be plugged in Often can be omitted because of component tests cover it Sometimes it may be efficient to create integration tests instead of unit tests Integration tests
  • 15.
  • 16.
  • 17. ✓ unit tests ✓ component tests ✓ integration tests end-to-end and smoke tests acceptance and contract tests code review continuous integration and deployment
  • 18. Use staging environment Stable test data set in database (alternative would be setup and teardown as part of test) Mock external http-based services using Robohydra Create page models for abstracting interaction with html/css Protractor for running tests in browser End-to-end tests for HTTP API can be done using mocha, much faster End-to-end tests
  • 19.
  • 20. Technically same as end-to-end tests Use in production environment right after deployment Very limited number of tests, just to validate the deployment success Smoke tests
  • 21. Link and track with business requirements Does not have to be end-to-end test Acceptance tests
  • 22. Set of customer-specific requirements If the customer vanishes, the tests can be removed Coverage tools can be used to find code that no customer requires Contract tests
  • 23. ✓ unit tests ✓ component tests ✓ integration tests ✓ end-to-end and smoke tests ✓ acceptance and contract tests code review continuous integration and deployment
  • 24. No seniority – everybody can and has to review Are the tests descriptions working as a specification? Has the author revised the existing tests for the entire unit or just added new? Readability of both code and tests. Third eye-pair code review for pair programming. Code review
  • 25. Continuous integration and deployment Development and tests (feature branch) Code review Tests (feature branch) Merge to master Tests (master) End-to-end tests Deploy to production Deploy to stage Smoke tests Development CI (docker) Stage Production
  • 26. Protractor – browser end-to-end test runner Karma – JavaScript unit test runner Mocha + chai – JavaScript unit test framework Istanbul – coverage Nock – http interception for nodejs Sinon – mocking tool for JavaScript objects and libraries Robohydra – webserver for mocking Phabricator + arcanist – code review Jenkins – continuous integration Tools