SlideShare a Scribd company logo
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

More Related Content

What's hot

Unit Testing Your Application
Unit Testing Your ApplicationUnit Testing Your Application
Unit Testing Your Application
Paladin Web Services
 
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 Applications
Muhammad Samu
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
L&T Technology Services Limited
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assurance
Benjamin Baumann
 
Regression Testing with Symfony
Regression Testing with SymfonyRegression Testing with Symfony
Regression Testing with Symfony
Joachim Unger
 
Tdd for php
Tdd for phpTdd for php
Tdd for php
ABDEL RAHMAN KARIM
 
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 Evaluation
Kate Semizhon
 
Unit vs. Integration Tests
Unit vs. Integration TestsUnit vs. Integration Tests
Unit vs. Integration Tests
David 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 Moq
XPDays
 
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
Hendrik Neumann
 
Unit tests benefits
Unit tests benefitsUnit tests benefits
Unit tests benefits
Kate Semizhon
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gauge
vodqancr
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
Anuj Arora
 
Development and test infrastructure
Development and test infrastructureDevelopment and test infrastructure
Development and test infrastructure
Jun Li
 
Completed slides
Completed slidesCompleted slides
Completed slides
Jyothi Vbs
 
Android tdd
Android tddAndroid tdd
Android tdd
Nhan Cao
 

What's hot (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
 

Viewers also liked

Pricing Siddhant Gupta
Pricing Siddhant GuptaPricing Siddhant Gupta
Pricing Siddhant Gupta
Siddhant 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 praktika
Markko Paas
 
Understanding Risk Management by Bobby Talbott
Understanding Risk Management by Bobby TalbottUnderstanding Risk Management by Bobby Talbott
Understanding Risk Management by Bobby Talbott
Platform Houston
 
Rockethub: The world's crowdfunding machine
Rockethub: The world's crowdfunding machineRockethub: The world's crowdfunding machine
Rockethub: The world's crowdfunding machine
Platform Houston
 

Viewers also liked (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
 

Similar to 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 testing
Tomy Rhymond
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
toddbr
 
ATDD in Practice
ATDD in PracticeATDD in Practice
ATDD in Practice
Steven 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 2020
Abhijeet Vaikar
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and execution
Clemens 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+Testinggueste1e4db
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
Directi Group
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
didev
 
Testing Node.js.pdf
Testing Node.js.pdfTesting Node.js.pdf
Testing Node.js.pdf
Ahmed Hassan
 
Quality Loopback
Quality LoopbackQuality Loopback
Quality Loopback
Omar Bashir
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysis
ssuser2e8d4b
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
François Camus
 
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
Andrei 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 Test
Seb Rose
 
May 05 test_code_states
May 05 test_code_statesMay 05 test_code_states
May 05 test_code_states
KyungHo Jung
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro

Similar to 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
 

Recently uploaded

Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
abdulrafaychaudhry
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 

Recently uploaded (20)

Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 

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