SlideShare a Scribd company logo
Testing Concurrent Java programs

                        Sameer Arora
                       Xebia IT Architects.




                                        1
AGENDA

    What makes Concurrent programs hard to test.


    How concurrent application's design drives testability.


    Testing asynchronous code - demo.


    Testing Blocking operations and Resource Management - demo.


    Testing Thread Safety - demo.


    Complementary testing approaches.


    Questions & Feedback




                                                                  2
What makes concurrency hard to test


Tests for Concurrent Programs are themselves concurrent programs.



Failures are rare and probabilistic in nature.



Execution is Platform Dependent.




                                                                3
Design and Testability

Encapsulating concurrent interactions .



Thread Delegation.



Effectively Immutability.



Figuring Single Thread Confinement.



Composition.

                                          4
Testing Asynchronous Method Calls




   Asynchronous Job Signal Demo

                                    5
Testing for Resource Management




                                  6
Bounded Job Queue




Test for Blocking Operations - Demo
                                      7
Testing for Thread Safety




Bounded Job Queue Thread Interleaving Test


                                             8
Complementary Testing Approaches

    Injecting Callbacks.


    Static code Analysis Tools.


    Code Review.


    Profilers and Monitoring tools.


    Frameworks for Multi-threaded Testing.
     
         ConcJunit
     
         Awaitility
     
         MultiThreadedTC



                                                9
Questions




Questions/Comments/Feedback




                              10
Thank you



            11

More Related Content

What's hot (20)

PDF
Parasoft fda software compliance part1
Engineering Software Lab
 
PPT
TDD (Test Driven Design)
nedirtv
 
PDF
Parasoft fda software compliance part2
Engineering Software Lab
 
DOCX
TestDrivenDeveloment
Antonio Tapper
 
PDF
Design For Testability
Giovanni Asproni
 
PDF
Java Code Review Checklist
Mahesh Chopker
 
PDF
Practical Guide To Software System Testing
vladimir zaremba
 
PPT
Test Driven Development
Sachithra Gayan
 
PPTX
Unit testing
Slideshare
 
DOCX
Code review guidelines
Lalit Kale
 
PPTX
Top 10 static code analysis tool
scmGalaxy Inc
 
PPTX
Good Unit Tests Ask For Quality Code
Florin Coros
 
PPTX
Design for Testability
Pawel Kalbrun
 
PPTX
Testing the untestable
RoyKlein
 
PDF
Test-Driven Development Reference Card
Seapine Software
 
KEY
Test Driven Development
Jason Ragsdale
 
PPTX
Formal method
Sara Malik
 
PPT
Software Design for Testability
amr0mt
 
PPTX
Code review
Abhishek Sur
 
PDF
A Not-So-Serious Introduction to Test Driven Development (TDD)
CodeOps Technologies LLP
 
Parasoft fda software compliance part1
Engineering Software Lab
 
TDD (Test Driven Design)
nedirtv
 
Parasoft fda software compliance part2
Engineering Software Lab
 
TestDrivenDeveloment
Antonio Tapper
 
Design For Testability
Giovanni Asproni
 
Java Code Review Checklist
Mahesh Chopker
 
Practical Guide To Software System Testing
vladimir zaremba
 
Test Driven Development
Sachithra Gayan
 
Unit testing
Slideshare
 
Code review guidelines
Lalit Kale
 
Top 10 static code analysis tool
scmGalaxy Inc
 
Good Unit Tests Ask For Quality Code
Florin Coros
 
Design for Testability
Pawel Kalbrun
 
Testing the untestable
RoyKlein
 
Test-Driven Development Reference Card
Seapine Software
 
Test Driven Development
Jason Ragsdale
 
Formal method
Sara Malik
 
Software Design for Testability
amr0mt
 
Code review
Abhishek Sur
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
CodeOps Technologies LLP
 

Similar to Testing concurrent java programs - Sameer Arora (20)

PPTX
Unit testing patterns for concurrent code
Dror Helper
 
PDF
Just Java2007 - Daniel Wildt - Tools For Java Test Automation
Daniel Wildt
 
PDF
Pair programming pair testing working together with the developers by Simon ...
Agile ME
 
PPTX
Unit testing
Panos Pnevmatikatos
 
PPT
Testing multithreaded java applications for synchronization problems
Vassil Popovski
 
PDF
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
PDF
Programming Sideways: Asynchronous Techniques for Android
Emanuele Di Saverio
 
PDF
JUnit PowerUp
James McGivern
 
PDF
Unit testingandcontinousintegrationfreenest1dot4
JAMK
 
PPTX
Specs2
Eric Torreborre
 
PPTX
Binary Studio Academy: .NET Code Testing
Binary Studio
 
PDF
Model For Applying Unit Test
Hieu Le Trung
 
PPTX
Concurrency - Why it's hard ?
Ramith Jayasinghe
 
PPTX
NET Code Testing
Kirill Miroshnichenko
 
PPTX
Principles and patterns for test driven development
Stephen Fuqua
 
PPT
ProspectusPresentationPrinterFriendly
martijnetje
 
PPTX
Type mock isolator
MaslowB
 
PDF
Tools. Techniques. Trouble?
Testplant
 
PPTX
Testing 101
Noam Barkai
 
PPTX
Concepts of unit testing_dynamic-testing.ppt.pptx
ssuser9d6aac
 
Unit testing patterns for concurrent code
Dror Helper
 
Just Java2007 - Daniel Wildt - Tools For Java Test Automation
Daniel Wildt
 
Pair programming pair testing working together with the developers by Simon ...
Agile ME
 
Unit testing
Panos Pnevmatikatos
 
Testing multithreaded java applications for synchronization problems
Vassil Popovski
 
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
Programming Sideways: Asynchronous Techniques for Android
Emanuele Di Saverio
 
JUnit PowerUp
James McGivern
 
Unit testingandcontinousintegrationfreenest1dot4
JAMK
 
Binary Studio Academy: .NET Code Testing
Binary Studio
 
Model For Applying Unit Test
Hieu Le Trung
 
Concurrency - Why it's hard ?
Ramith Jayasinghe
 
NET Code Testing
Kirill Miroshnichenko
 
Principles and patterns for test driven development
Stephen Fuqua
 
ProspectusPresentationPrinterFriendly
martijnetje
 
Type mock isolator
MaslowB
 
Tools. Techniques. Trouble?
Testplant
 
Testing 101
Noam Barkai
 
Concepts of unit testing_dynamic-testing.ppt.pptx
ssuser9d6aac
 
Ad

More from IndicThreads (20)

PPTX
Http2 is here! And why the web needs it
IndicThreads
 
ODP
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
IndicThreads
 
PPT
Go Programming Language - Learning The Go Lang way
IndicThreads
 
PPT
Building Resilient Microservices
IndicThreads
 
PPT
App using golang indicthreads
IndicThreads
 
PDF
Building on quicksand microservices indicthreads
IndicThreads
 
PDF
How to Think in RxJava Before Reacting
IndicThreads
 
PPT
Iot secure connected devices indicthreads
IndicThreads
 
PDF
Real world IoT for enterprises
IndicThreads
 
PPT
IoT testing and quality assurance indicthreads
IndicThreads
 
PPT
Functional Programming Past Present Future
IndicThreads
 
PDF
Harnessing the Power of Java 8 Streams
IndicThreads
 
PDF
Building & scaling a live streaming mobile platform - Gr8 road to fame
IndicThreads
 
PPTX
Internet of things architecture perspective - IndicThreads Conference
IndicThreads
 
PDF
Cars and Computers: Building a Java Carputer
IndicThreads
 
PPTX
Scrap Your MapReduce - Apache Spark
IndicThreads
 
PPT
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
PPTX
Speed up your build pipeline for faster feedback
IndicThreads
 
PPT
Unraveling OpenStack Clouds
IndicThreads
 
PPTX
Digital Transformation of the Enterprise. What IT leaders need to know!
IndicThreads
 
Http2 is here! And why the web needs it
IndicThreads
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
IndicThreads
 
Go Programming Language - Learning The Go Lang way
IndicThreads
 
Building Resilient Microservices
IndicThreads
 
App using golang indicthreads
IndicThreads
 
Building on quicksand microservices indicthreads
IndicThreads
 
How to Think in RxJava Before Reacting
IndicThreads
 
Iot secure connected devices indicthreads
IndicThreads
 
Real world IoT for enterprises
IndicThreads
 
IoT testing and quality assurance indicthreads
IndicThreads
 
Functional Programming Past Present Future
IndicThreads
 
Harnessing the Power of Java 8 Streams
IndicThreads
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
IndicThreads
 
Internet of things architecture perspective - IndicThreads Conference
IndicThreads
 
Cars and Computers: Building a Java Carputer
IndicThreads
 
Scrap Your MapReduce - Apache Spark
IndicThreads
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
Speed up your build pipeline for faster feedback
IndicThreads
 
Unraveling OpenStack Clouds
IndicThreads
 
Digital Transformation of the Enterprise. What IT leaders need to know!
IndicThreads
 
Ad

Recently uploaded (20)

PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Python basic programing language for automation
DanialHabibi2
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

Testing concurrent java programs - Sameer Arora