SlideShare une entreprise Scribd logo
1  sur  69
Télécharger pour lire hors ligne
Integration Testing
Awesome subtitle
Integration Testing
Awesome subtitle
Integration Testing
Awesome subtitle
Integration Testing
Awesome subtitle
Testing
▪ Unit testing
▪ Integration testing
▪ System Integration testing
▪ Load testing
▪ Performance testing
▪ User acceptance testing
Overview
1. Testing Terminologies
2. Component Integration Testing
a. Persistence tests
b. Container tests
c. Other component integrations
3. System Integration Testing
Testing terminologies
Test levels/phases
Requirement Specification Acceptance Testing
Functional Analysis System Testing
Technical Design Integration Testing
Coding Component Testing
System Integration Testing
Component Integration Testing
BB
WB
Test characteristics
▪ Connectivity
▪ Continuity
▪ Data controllability
▪ Effectivity
▪ Efficiency
▪ Flexibility
▪ Functionality
▪ Suitability of infrastructure
▪ Maintainability
▪ Manageability
▪ Performance
▪ Portability
▪ Reusability
▪ Security
▪ Suitability
▪ Testability
▪ User-friendliness
Focus on terminology
▪ Dedicated test environments
▪ Sanity tests (smoke tests)
▪ Regression testing
▪ Combinations and boundaries
▪ Positive and negative
▪ Valid and invalid
▪ End 2 End testing (chain testing)
▪ Performance testing (load testing vs. stress testing)
▪ Manual testing vs. test automation
Component Integration Testing
Component Integration Testing
Demo:
▪ Service Layer going to Database Layer
PERSISTENCE TESTS
Persistence Tests
Using real databases for tests:
▪ slow
▪ harder than it should be
▪ separate schemas per user?
▪ network required
Using local database for tests:
▪ even slower
▪ requires (annoying) installation
▪ no network required
Persistence Tests
Using in-memory database for tests:
▪ super fast
▪ only lives during test
▪ allows for very specific test data
▪ can be upgraded/changed/...
Persistence Tests
Demo:
▪ JPA2 via Hibernate
▪ Spring Data
▪ SpringJUnit4ClassRunner
▪ DBUnit
Persistence Tests
Demo:
▪ JPA2 via Hibernate
▪ Spring Data
▪ SpringJUnit4ClassRunner
▪ DBUnit
▪ + Spring MVC (REST client)
▪ + Selenium (Chrome WebDriver)
CONTAINER TESTS
What is a container?
What is a container?
A Java ecosystem in which an application is managed
life-cycle
transactions
persistence
security
...
What is a container?
DI container (Dependency Injection)
EJB container (Enterprise Java Beans)
Web container
Application client container
Applet container
Most known providers today
Most known providers today
▪ Only provides a DI Container: IoC (inversion of control)
▪ Runs anywhere
▪ No application server needed
Most known providers today
Most known providers today
▪ Provides specifications for:
▪ DI container: CDI (Contexts and Dependency Injection)
▪ EJB container
▪ Web container
▪ Application client container
▪ Applet container
▪ It only runs on an application server implementing these specs.
What to test?
Dependency Injection (is everything wired correctly together?)
▪ Application Context
▪ CDI
What to test?
Persistence:
and : is JPA (Java Persistence API) mapping correct?
What to test?
Transaction Management:
▪ : Spring Transaction
▪ : JTA (Java Transaction API)
What to test?
Deployment:
▪ : no deployment needed (not to test)
▪ : will it deploy without exceptions in a real Java EE container?
How?
Container-tests
How?
out of the box
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes =
Application.class)
@Transactional
public class SpringIntegrationTest {
Really, that easy :-) !!
How?
not out of the box
Need for third-party frameworks
How?
OpenEJB: a lightweight embeddable EJB container
Can be used with JUnit
How?
A lot to write
How?
And more:
How?
Arquillian:
▪ Embeddable containers for JUnit-tests
▪ Run tests in real running containers
The real thing application servers:
Glassfish
Jboss
Weblogic
...
How?
All it takes in Arquillian
@RunWith(Arquillian.class)
public class ArquillianIntegrationTest {
@Deployment
public static Archive<?> createDeployment() {
return ShrinkWrap.create(WebArchive.class, "test.war")
.addPackage(MeetingRoom.class.getPackage())
.addPackage(MeetingOrganizer.class.getPackage())
.addPackage(MeetingRoomRepository.class.getPackage())
.addAsResource("persistence-test.xml", "META-
INF/persistence.xml")
.addAsWebInfResource("jbossas-ds.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
Actually, together with xml config, but pretty straight-forward
Demo
Integration test
wiring
transactional test
Integration test
wiring
transactional test
web integration test with Graphene
https://github.com/brunobouko
OTHER COMPONENT INTEGRATIONS
File Permissions
How to test ?
● Via dedicated check
FilePermission fp = new FilePermission("file.txt", "read");
AccessController.checkPermission(fp);
● Via shell scripts
Check you have staff group and file is readable by staff
[~] % ls -l file.txt | awk '{ print $1" "$3" "$4;}' | egrep -e '....r..... .*
staff' >|/dev/null && echo 'ok' || echo 'ko'
ok
● Manually...
Results
Emails
How to test
● With developer controlled server
● With code
○ Spring Integration: https://github.com/spring-projects/spring-integration-samples/tree/master/basic/mail
● With dedicated tools
Eg: Sending emails could use FakeSMTP - http://nilhcem.github.io/FakeSMTP
● Running fake mail server during tests
○ GreenMail - http://www.icegreen.com/greenmail/
Roll the demo in: SendAMail project + GreenMail
https://github.com/pijalu/SendAMail.git
JMS
How to test ?
● Writing test code
○ ActiveMQ - http://activemq.apache.org/how-to-unit-test-jms-code.html
○ Spring Integration- https://github.com/spring-projects/spring-integration-
samples/tree/master/basic/jms
● Using tools
○ HermesJMS - http://www.hermesjms.com/confluence/display/HJMS/Home
■ Allows to post message on queues/topics
■ Observes topics !
● With containers test enabled test like Arquillian
Roll the demo in: EJBees project with Arquillian !
https://github.com/pijalu/ejbees.git
LDAP (and co)
How to test ?
● With tools
○ Spring security
■ It can run a “test” LDAP server based on a LDIF file
○ Apache Directory Studio
■ Allows to connect and browse to LDAP server (and AD is LDAP, but weird one...)
■ Allows to run your own LDAP server for integration
■ Allows to run your own LDAP server within JUnit tests
Roll the Demo in: LDAP Dance
https://github.com/pijalu/ldapdance
SOAP/REST/WS/...
How to test ?
● Writing your own integration tests
● Using tools
○ SoapUI
■ Can call the service
■ Perform tests
■ Can run with maven
Roll the demo in: SoapUI + SoapUI project !
https://github.com/pijalu/SoapUIDemo.git
Questions on other components tests ?
Environments
Environment - Disclaimer
● Commonly used
● Not exact
● Merged environments
Environment - Local
● typical laptop/desktop
● focus on work at hand
● not representative (resources, data volume)
● maybe even different application server
● mostly expecting unlimited resources
● limited constraints
● frequent deployments
● possibly different os
● possibly different settings (regional settings)
➔ goal: get your tasks completed
➔ target users: developer
Environment - Component Integration (DEV)
● more limited within company standards
● possibly increased complexity (authentication required)
● automated deployment?
● actual application server
● possible dummy systems
● mostly not load balanced
➔ goal: will it deploy on the actual infrastructure, sanity testing
➔ target users: developers
➔ challenge: bug free (and retard-proof)
Environment - System Integration (INT)
● representative systems
● possibly reduced data
● possibly load balanced
● whatsup
➔ goal: does it work well combined with other systems?
➔ target users: developers, testers
Environment - System Testing (TEST)
● representative systems
● possibly reduced data
● possibly load balanced
➔ goal: is it ready to present to business?
➔ target users: testers, functional analysts
➔ challenge: find the bugs!
Environment - User Acceptance Test (UAT)
● almost the real deal
● no impact on end users
● preferably identical setup compared to production
● loadbalanced
➔ goal: does it meet the business requirements we've specified? do we
need to rethink something? is this performant enough?
➔ target users: business users
Environment - Production
● the real deal
● impact on end users
➔ target users: end users
Environment - Disaster Recovery
● mirror
● offline
● alternate site
● pre go-live
System Integration Testing
System Integration Testing - What?
● web applications
● desktop applications
● mobile applications
● embedded applications
● headless applications
● others?
System Integration Testing - How?
● manual testing
● manual tools
○ soap ui
○ db tools
○ ldap browser
● automated tools
○ proprietary
○ selenium
○ custom made
System Integration Testing - Web application
● browser dependant
● device dependant
● subjective testing
● subject to change
System Integration Testing - Web application
● browser dependant
● device dependant
● subjective testing
● subject to change
System Integration Testing - Selenium
● target specific browser version
● browser bugs
● user simulation
● reusability
● screenshots
➔ record/replay
◆ limited usability
◆ parametrize!
➔ use static ids
➔ html only
System Integration Testing - Headless browser
● faster
● not 100% representative
● prepare test cases
● url check
● javascript check
● objective
➔ karma
➔ jasmine
System Integration Testing - When?
● funded by project
● sucky developers
● regression
● flow based applications
http://www.downvids.net/product-testing-institute-models-very-very-funny-
hq--38051.html

Contenu connexe

Tendances

Testing with laravel
Testing with laravelTesting with laravel
Testing with laravelDerek Binkley
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Applitools
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
Testing Java EE apps with Arquillian
Testing Java EE apps with ArquillianTesting Java EE apps with Arquillian
Testing Java EE apps with ArquillianIvan Ivanov
 
JavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 ProxyJavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 ProxyAlexandr Skachkov
 
Create an architecture for web test automation
Create an architecture for web test automationCreate an architecture for web test automation
Create an architecture for web test automationElias Nogueira
 
Drupalcamp Simpletest
Drupalcamp SimpletestDrupalcamp Simpletest
Drupalcamp Simpletestlyricnz
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in YiiIlPeach
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in YiiIlPeach
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Fwdays
 
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016Joe Ferguson
 
Auditing Drupal Sites
Auditing Drupal SitesAuditing Drupal Sites
Auditing Drupal SitesExove
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Dave Haeffner
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateAbhimanyu Singhal
 
Five Easy Ways to QA Your Drupal Site
Five Easy Ways to QA Your Drupal SiteFive Easy Ways to QA Your Drupal Site
Five Easy Ways to QA Your Drupal SiteMediacurrent
 
Test automation with php codeception
Test automation with php codeceptionTest automation with php codeception
Test automation with php codeceptionbuddhieash
 
An easy way to automate complex UI
An easy way to automate complex UIAn easy way to automate complex UI
An easy way to automate complex UIIvan Pashko
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Joe Ferguson
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScriptSimon Guest
 

Tendances (20)

Testing with laravel
Testing with laravelTesting with laravel
Testing with laravel
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Testing Java EE apps with Arquillian
Testing Java EE apps with ArquillianTesting Java EE apps with Arquillian
Testing Java EE apps with Arquillian
 
JavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 ProxyJavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 Proxy
 
Create an architecture for web test automation
Create an architecture for web test automationCreate an architecture for web test automation
Create an architecture for web test automation
 
Drupalcamp Simpletest
Drupalcamp SimpletestDrupalcamp Simpletest
Drupalcamp Simpletest
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in Yii
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"
 
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
 
Auditing Drupal Sites
Auditing Drupal SitesAuditing Drupal Sites
Auditing Drupal Sites
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 Ultimate
 
Five Easy Ways to QA Your Drupal Site
Five Easy Ways to QA Your Drupal SiteFive Easy Ways to QA Your Drupal Site
Five Easy Ways to QA Your Drupal Site
 
Test automation with php codeception
Test automation with php codeceptionTest automation with php codeception
Test automation with php codeception
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
An easy way to automate complex UI
An easy way to automate complex UIAn easy way to automate complex UI
An easy way to automate complex UI
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 

Similaire à Integration testing - A&BP CC

Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0Sriram Narayanan
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsFedir RYKHTIK
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonIneke Scheffers
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesLars Rosenquist
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesLars Rosenquist
 
HKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHGHKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHGLinaro
 
How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...Max Barrass
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Christian Catalan
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choicetoddbr
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowAdam Doyle
 
Gabriel carabat a healthy approach for test automation
Gabriel carabat   a healthy approach for test automationGabriel carabat   a healthy approach for test automation
Gabriel carabat a healthy approach for test automationRomania Testing
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to useUma Ghotikar
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best PracitcesJustin Filip
 
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Борис Зора
 

Similaire à Integration testing - A&BP CC (20)

Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and Projects
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
 
HKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHGHKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHG
 
How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
 
Gabriel carabat a healthy approach for test automation
Gabriel carabat   a healthy approach for test automationGabriel carabat   a healthy approach for test automation
Gabriel carabat a healthy approach for test automation
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to use
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Cypress Testing.pptx
Cypress Testing.pptxCypress Testing.pptx
Cypress Testing.pptx
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
 
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
 
Automated testing
Automated testingAutomated testing
Automated testing
 

Plus de JWORKS powered by Ordina

Introduction to Webpack - Ordina JWorks - CC JS & Web
Introduction to Webpack - Ordina JWorks - CC JS & WebIntroduction to Webpack - Ordina JWorks - CC JS & Web
Introduction to Webpack - Ordina JWorks - CC JS & WebJWORKS powered by Ordina
 
Netflix OSS and HATEOAS deployed on production - JavaLand
Netflix OSS and HATEOAS deployed on production - JavaLandNetflix OSS and HATEOAS deployed on production - JavaLand
Netflix OSS and HATEOAS deployed on production - JavaLandJWORKS powered by Ordina
 
Cc internet of things LoRa and IoT - Innovation Enablers
Cc internet of things   LoRa and IoT - Innovation Enablers Cc internet of things   LoRa and IoT - Innovation Enablers
Cc internet of things LoRa and IoT - Innovation Enablers JWORKS powered by Ordina
 
Big data document and graph d bs - couch-db and orientdb
Big data  document and graph d bs - couch-db and orientdbBig data  document and graph d bs - couch-db and orientdb
Big data document and graph d bs - couch-db and orientdbJWORKS powered by Ordina
 
Big data key-value and column stores redis - cassandra
Big data  key-value and column stores redis - cassandraBig data  key-value and column stores redis - cassandra
Big data key-value and column stores redis - cassandraJWORKS powered by Ordina
 
Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014JWORKS powered by Ordina
 
Android secure offline storage - CC Mobile
Android secure offline storage - CC MobileAndroid secure offline storage - CC Mobile
Android secure offline storage - CC MobileJWORKS powered by Ordina
 

Plus de JWORKS powered by Ordina (20)

Introduction to Webpack - Ordina JWorks - CC JS & Web
Introduction to Webpack - Ordina JWorks - CC JS & WebIntroduction to Webpack - Ordina JWorks - CC JS & Web
Introduction to Webpack - Ordina JWorks - CC JS & Web
 
Lagom in Practice
Lagom in PracticeLagom in Practice
Lagom in Practice
 
Netflix OSS and HATEOAS deployed on production - JavaLand
Netflix OSS and HATEOAS deployed on production - JavaLandNetflix OSS and HATEOAS deployed on production - JavaLand
Netflix OSS and HATEOAS deployed on production - JavaLand
 
Cc internet of things @ Thomas More
Cc internet of things @ Thomas MoreCc internet of things @ Thomas More
Cc internet of things @ Thomas More
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
An introduction to Cloud Foundry
An introduction to Cloud FoundryAn introduction to Cloud Foundry
An introduction to Cloud Foundry
 
Cc internet of things LoRa and IoT - Innovation Enablers
Cc internet of things   LoRa and IoT - Innovation Enablers Cc internet of things   LoRa and IoT - Innovation Enablers
Cc internet of things LoRa and IoT - Innovation Enablers
 
Mongodb @ vrt
Mongodb @ vrtMongodb @ vrt
Mongodb @ vrt
 
Mongo db intro.pptx
Mongo db intro.pptxMongo db intro.pptx
Mongo db intro.pptx
 
Big data document and graph d bs - couch-db and orientdb
Big data  document and graph d bs - couch-db and orientdbBig data  document and graph d bs - couch-db and orientdb
Big data document and graph d bs - couch-db and orientdb
 
Big data key-value and column stores redis - cassandra
Big data  key-value and column stores redis - cassandraBig data  key-value and column stores redis - cassandra
Big data key-value and column stores redis - cassandra
 
Hadoop bootcamp getting started
Hadoop bootcamp getting startedHadoop bootcamp getting started
Hadoop bootcamp getting started
 
Big data elasticsearch practical
Big data  elasticsearch practicalBig data  elasticsearch practical
Big data elasticsearch practical
 
Intro to cassandra
Intro to cassandraIntro to cassandra
Intro to cassandra
 
Android wear - CC Mobile
Android wear - CC MobileAndroid wear - CC Mobile
Android wear - CC Mobile
 
Clean Code - A&BP CC
Clean Code - A&BP CCClean Code - A&BP CC
Clean Code - A&BP CC
 
Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014
 
Spring 4 - A&BP CC
Spring 4 - A&BP CCSpring 4 - A&BP CC
Spring 4 - A&BP CC
 
Android secure offline storage - CC Mobile
Android secure offline storage - CC MobileAndroid secure offline storage - CC Mobile
Android secure offline storage - CC Mobile
 
Meteor - JOIN 2015
Meteor - JOIN 2015Meteor - JOIN 2015
Meteor - JOIN 2015
 

Dernier

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 

Dernier (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 

Integration testing - A&BP CC

  • 5. Testing ▪ Unit testing ▪ Integration testing ▪ System Integration testing ▪ Load testing ▪ Performance testing ▪ User acceptance testing
  • 6. Overview 1. Testing Terminologies 2. Component Integration Testing a. Persistence tests b. Container tests c. Other component integrations 3. System Integration Testing
  • 8. Test levels/phases Requirement Specification Acceptance Testing Functional Analysis System Testing Technical Design Integration Testing Coding Component Testing System Integration Testing Component Integration Testing BB WB
  • 9. Test characteristics ▪ Connectivity ▪ Continuity ▪ Data controllability ▪ Effectivity ▪ Efficiency ▪ Flexibility ▪ Functionality ▪ Suitability of infrastructure ▪ Maintainability ▪ Manageability ▪ Performance ▪ Portability ▪ Reusability ▪ Security ▪ Suitability ▪ Testability ▪ User-friendliness
  • 10. Focus on terminology ▪ Dedicated test environments ▪ Sanity tests (smoke tests) ▪ Regression testing ▪ Combinations and boundaries ▪ Positive and negative ▪ Valid and invalid ▪ End 2 End testing (chain testing) ▪ Performance testing (load testing vs. stress testing) ▪ Manual testing vs. test automation
  • 12. Component Integration Testing Demo: ▪ Service Layer going to Database Layer
  • 14. Persistence Tests Using real databases for tests: ▪ slow ▪ harder than it should be ▪ separate schemas per user? ▪ network required Using local database for tests: ▪ even slower ▪ requires (annoying) installation ▪ no network required
  • 15. Persistence Tests Using in-memory database for tests: ▪ super fast ▪ only lives during test ▪ allows for very specific test data ▪ can be upgraded/changed/...
  • 16. Persistence Tests Demo: ▪ JPA2 via Hibernate ▪ Spring Data ▪ SpringJUnit4ClassRunner ▪ DBUnit
  • 17. Persistence Tests Demo: ▪ JPA2 via Hibernate ▪ Spring Data ▪ SpringJUnit4ClassRunner ▪ DBUnit ▪ + Spring MVC (REST client) ▪ + Selenium (Chrome WebDriver)
  • 19. What is a container?
  • 20. What is a container? A Java ecosystem in which an application is managed life-cycle transactions persistence security ...
  • 21. What is a container? DI container (Dependency Injection) EJB container (Enterprise Java Beans) Web container Application client container Applet container
  • 23. Most known providers today ▪ Only provides a DI Container: IoC (inversion of control) ▪ Runs anywhere ▪ No application server needed
  • 25. Most known providers today ▪ Provides specifications for: ▪ DI container: CDI (Contexts and Dependency Injection) ▪ EJB container ▪ Web container ▪ Application client container ▪ Applet container ▪ It only runs on an application server implementing these specs.
  • 26. What to test? Dependency Injection (is everything wired correctly together?) ▪ Application Context ▪ CDI
  • 27. What to test? Persistence: and : is JPA (Java Persistence API) mapping correct?
  • 28. What to test? Transaction Management: ▪ : Spring Transaction ▪ : JTA (Java Transaction API)
  • 29. What to test? Deployment: ▪ : no deployment needed (not to test) ▪ : will it deploy without exceptions in a real Java EE container?
  • 31. How? out of the box @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) @Transactional public class SpringIntegrationTest { Really, that easy :-) !!
  • 32. How? not out of the box Need for third-party frameworks
  • 33. How? OpenEJB: a lightweight embeddable EJB container Can be used with JUnit
  • 34. How? A lot to write
  • 36. How? Arquillian: ▪ Embeddable containers for JUnit-tests ▪ Run tests in real running containers The real thing application servers: Glassfish Jboss Weblogic ...
  • 37. How? All it takes in Arquillian @RunWith(Arquillian.class) public class ArquillianIntegrationTest { @Deployment public static Archive<?> createDeployment() { return ShrinkWrap.create(WebArchive.class, "test.war") .addPackage(MeetingRoom.class.getPackage()) .addPackage(MeetingOrganizer.class.getPackage()) .addPackage(MeetingRoomRepository.class.getPackage()) .addAsResource("persistence-test.xml", "META- INF/persistence.xml") .addAsWebInfResource("jbossas-ds.xml") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); } Actually, together with xml config, but pretty straight-forward
  • 38. Demo Integration test wiring transactional test Integration test wiring transactional test web integration test with Graphene https://github.com/brunobouko
  • 41. How to test ? ● Via dedicated check FilePermission fp = new FilePermission("file.txt", "read"); AccessController.checkPermission(fp); ● Via shell scripts Check you have staff group and file is readable by staff [~] % ls -l file.txt | awk '{ print $1" "$3" "$4;}' | egrep -e '....r..... .* staff' >|/dev/null && echo 'ok' || echo 'ko' ok ● Manually...
  • 44. How to test ● With developer controlled server ● With code ○ Spring Integration: https://github.com/spring-projects/spring-integration-samples/tree/master/basic/mail ● With dedicated tools Eg: Sending emails could use FakeSMTP - http://nilhcem.github.io/FakeSMTP ● Running fake mail server during tests ○ GreenMail - http://www.icegreen.com/greenmail/ Roll the demo in: SendAMail project + GreenMail https://github.com/pijalu/SendAMail.git
  • 45. JMS
  • 46. How to test ? ● Writing test code ○ ActiveMQ - http://activemq.apache.org/how-to-unit-test-jms-code.html ○ Spring Integration- https://github.com/spring-projects/spring-integration- samples/tree/master/basic/jms ● Using tools ○ HermesJMS - http://www.hermesjms.com/confluence/display/HJMS/Home ■ Allows to post message on queues/topics ■ Observes topics ! ● With containers test enabled test like Arquillian Roll the demo in: EJBees project with Arquillian ! https://github.com/pijalu/ejbees.git
  • 48. How to test ? ● With tools ○ Spring security ■ It can run a “test” LDAP server based on a LDIF file ○ Apache Directory Studio ■ Allows to connect and browse to LDAP server (and AD is LDAP, but weird one...) ■ Allows to run your own LDAP server for integration ■ Allows to run your own LDAP server within JUnit tests Roll the Demo in: LDAP Dance https://github.com/pijalu/ldapdance
  • 50. How to test ? ● Writing your own integration tests ● Using tools ○ SoapUI ■ Can call the service ■ Perform tests ■ Can run with maven Roll the demo in: SoapUI + SoapUI project ! https://github.com/pijalu/SoapUIDemo.git
  • 51. Questions on other components tests ?
  • 53. Environment - Disclaimer ● Commonly used ● Not exact ● Merged environments
  • 54. Environment - Local ● typical laptop/desktop ● focus on work at hand ● not representative (resources, data volume) ● maybe even different application server ● mostly expecting unlimited resources ● limited constraints ● frequent deployments ● possibly different os ● possibly different settings (regional settings) ➔ goal: get your tasks completed ➔ target users: developer
  • 55. Environment - Component Integration (DEV) ● more limited within company standards ● possibly increased complexity (authentication required) ● automated deployment? ● actual application server ● possible dummy systems ● mostly not load balanced ➔ goal: will it deploy on the actual infrastructure, sanity testing ➔ target users: developers ➔ challenge: bug free (and retard-proof)
  • 56. Environment - System Integration (INT) ● representative systems ● possibly reduced data ● possibly load balanced ● whatsup ➔ goal: does it work well combined with other systems? ➔ target users: developers, testers
  • 57. Environment - System Testing (TEST) ● representative systems ● possibly reduced data ● possibly load balanced ➔ goal: is it ready to present to business? ➔ target users: testers, functional analysts ➔ challenge: find the bugs!
  • 58. Environment - User Acceptance Test (UAT) ● almost the real deal ● no impact on end users ● preferably identical setup compared to production ● loadbalanced ➔ goal: does it meet the business requirements we've specified? do we need to rethink something? is this performant enough? ➔ target users: business users
  • 59. Environment - Production ● the real deal ● impact on end users ➔ target users: end users
  • 60. Environment - Disaster Recovery ● mirror ● offline ● alternate site ● pre go-live
  • 62. System Integration Testing - What? ● web applications ● desktop applications ● mobile applications ● embedded applications ● headless applications ● others?
  • 63. System Integration Testing - How? ● manual testing ● manual tools ○ soap ui ○ db tools ○ ldap browser ● automated tools ○ proprietary ○ selenium ○ custom made
  • 64. System Integration Testing - Web application ● browser dependant ● device dependant ● subjective testing ● subject to change
  • 65. System Integration Testing - Web application ● browser dependant ● device dependant ● subjective testing ● subject to change
  • 66. System Integration Testing - Selenium ● target specific browser version ● browser bugs ● user simulation ● reusability ● screenshots ➔ record/replay ◆ limited usability ◆ parametrize! ➔ use static ids ➔ html only
  • 67. System Integration Testing - Headless browser ● faster ● not 100% representative ● prepare test cases ● url check ● javascript check ● objective ➔ karma ➔ jasmine
  • 68. System Integration Testing - When? ● funded by project ● sucky developers ● regression ● flow based applications