SlideShare a Scribd company logo
Designing Software For Testability
              A forgotten design pattern




Rohit Nayak
Talentica
Agenda

    Background and Motivation

    DFT in VLSI and hardware design

    Issues in Software Testing

    DFT for Software Development

    Automation and Testability

    Some Examples

    Cons, Review
The Anti-Pattern

      If it works,
its the developer,
  if not blame QA!
VLSI/PCB Testing Issues

    Mass produced

    Each piece needs to be validated

    Complexity
    −   Number of subsystems
    −   Amount of logic

    Access to internal logic

    Testing costs

    Cost of recall
Testability:
 “Effort required to
   test a product to
     ensure that it
performs its intended
       function”
DFT Principles

    Controllability

    Observability
    −   Test Point Insertion

    Built-In Self Test (BIST)

    Fault Modelling

    Fault Simulation

    Test Pattern Generation
Software Testing
“Testability is a design issue and needs to be
  addressed with the design of the rest of
  the system. Projects that defer testing to
  the later stages of a project will find their
  programmers unwilling to consider
  testability changes by the time testers
  actually roll onto the project and start
  making suggestions. Testability takes
  cooperation, appreciation and a team
  commitment to reliability.”
                                - Bret Pettichord
Cost Of Bugs

 Where Found       Requirements   Architecture   Coding   System Test   Production

Where Introduced


 Requirements          1x             3x         5-10x       10x        10x-100x
  Architecture                        1x          10x        15x         25-100x
    Coding                                         1x        10x          10-25x
Software Testability

    Suitability: clarity of specifications QA has

    Observability: we can only test what is visible

    Simplicity: easier design/UI makes testing easier

    Controllability: better the control, better the coverage
    and automation

    Stability: how often it changes

    Performance: how fast it works

    Diagnosability: writing effective bug reports!
Software DFT Patterns

    BIST                   
                               Controllability
    −   Automation suite       −   Decoupling
        w/ oracle              −   Bypassing
    −   Unit Tests             −   Mock/Stub
    −   Assertions             −   Set/Reset

    Fault Simulation       
                               Observability
    −   Mock/Stub              −   Logging
    −   Invalid params         −   Reporting
                               −   Test Interfaces
Good Automated Tests are

    Repeatable

    Easy to Write

    Easy to Understand

    Fast

    Way Easier with a Testable Software
When/How to Automate?

    Manager & Team are commited

    Testers/Dev either experienced or interested
    in learning to script

    Product release cycles managed well

    Functionality / UI changes under control

    Early/Incremental approaches work best

    Build integration, reporting

    Each bug results in a automated test
Automation As Coding

    Automation scripts and frameworks are CODE!

    Use tools and scripting languages

    Evaluate tools on real problems

    Follow development processes
    −   Spiral/Agile

    Use Source Control same as rest of code

    These will have bugs as well!
Test “oracle”

    Expected Result
    −   Generated once from previous run or
    −   Manually specified or
    −   Legacy system

    Time adjustment

    Results
    −   Database
    −   File
    −   Inline with code
Test Environment

    Multiple VMs

    Automated installs/images

    Automation tools

    Bug reporting tools
Unit Tests

    Each module has independent set

    Developer written/maintained

    setup, teardown

    xUnit, TestNG

    Runs on build

    Can run sub-set on install

    TDD
Diagnosability

    All environments: Test / Staging / Production

    Errors result in visual messages

    Errors are raised where they occur

    Errors can be localized

    Details are sufficient to fix issue

    Ability to send diag data to dev
Logging Module

    Log levels (VERBOSE, INFO, WARNING, ERROR, CRITICAL, TIME)

    Define CRITICAL/ERROR levels well and use them!

    These should result in urgent notifications

    Lower levels in Production

    Time, App, Component, ThreadId, Message
       8/2/2010 14:22pm: Notifier: Pop3: 8242: Sending welcome email to userid 334


    Delimited columns for import

    Rotation based on Time, Size
Built-in Self Test

    Inserting test code/interfaces

    Set/Reset to bring state to known value

    Reporting to get current state

    Assertions about values/state
      assert(order.billed==true)

    “oracle” based regression
Some Examples

    Web Application
    −   Software As A Service
    −   Browser Only UI
    −   Ajax / Dynamic HTML

    Banking (Client-Server)
    −   Installed Application
    −   Desktop Client
    −   Server API
Web Application

    HTML Page Title

    Id values for important divs/controls

    Hidden values (non-textual, graphs, tables)

    Measurable Ajax responses

    Tools: Selenium, Sahi, Watir, WebTest, curl

    Logging incl. browser/ip/session cookie

    Ability to simulate time zone, language
Web Application - 2

    Bypassing Captcha

    Mock TP APIs eg. Facebook, Google, OpenId

    SSL bypassing

    Transactions to be voided

    Multiple runs

    Always initialise controls
    −   Browser autofill
Desktop

    Unique identifiers to GUI controls

    Key Replay tools, SendKeys

    API test suites bypassing UI

    Client logs, ability to email

    Ability to run db queries in scripts
Desktop - 2

    Automation Friendly Third Party Controls
    −   Ability to select cell
    −   Copy-enable text fields
    −   Key shortcuts to Forms UI for control focus,
        clicking, navigation
    −   Access by value (tree/list controls)

    OCR for images/text consoles
Bypassing

    Credit card payment
    −   Test cards
    −   Mock object
    −   Dev auto-approval bypass code

    Order placement
    −   Dummy users, auto-fulfill
    −   Dummy vendors (email order)
    −   Admin screens move
Dates

    Never use system date directly

    Config override
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
       <appSettings>
        <add key=“SystemDate" value=“$now">
       </appSettings>
    </configuration>


    Nant: XMLPoke
    <xmlpoke file="App.config"
      xpath="/configuration/appSettings/add[@key = 'SystemDate']/@value"
      value="1-1-2009" />
Sending Emails

    Email subsystem should be a stub in dev

    Bypass SMTP: log to file …

    Email should be sent only to a whitelist

    Use Gmail Id & Atom API

    Use Unique Id/Timestamp to distinguish
Mocking / Stubbing

    Replace module during testing

    Different kinds:
    −   Sub-system (Email, Print)
    −   Webservice (Credit Card, Flight Booking)
    −   Hardware device (Biometric, CNC Machine)

    Return default values, implement simple/fixed
    logic
Mocks - 2

    Simulate Errors and Exceptions

    Provide more logging

    Jmock, Dependency Injection

    Con:
    −   Code level
    −   Needs to change with API
Anti-Testability Viewpoints

    Security compromise by testability interfaces,
    logging
    Remove or lock down in prod

    Extra coding time
    Much lower testing costs, better quality

    Privacy issues in logging
    Show only partial data

    Performance
    Almost never an issue in practice!
Review

    BIST                    
                                Controllability
    −   Automation suite        −   Decoupling
        w/ oracle               −   Bypassing
    −   Unit Tests              −   Mock/Stub
    −   Assertions              −   Set/Reset

    Fault Simulation        
                                Observability
    −   Mock/Stub               −   Logging
    −   Invalid params          −   Reporting

More Related Content

What's hot

Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile Applications
April Luk
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automation
sadams22
 
William Truong_updated
William Truong_updatedWilliam Truong_updated
William Truong_updatedBill Truong
 
A Test Automation Framework
A Test Automation FrameworkA Test Automation Framework
A Test Automation Framework
Gregory Solovey
 
2012 student track - vs2010
2012   student track - vs20102012   student track - vs2010
2012 student track - vs2010
Tim Mahy
 
Mobile applications testing (challenges, tools & techniques)
Mobile applications testing (challenges, tools & techniques)Mobile applications testing (challenges, tools & techniques)
Mobile applications testing (challenges, tools & techniques)
Rakesh Jha
 
Performance Test Slideshow Recent
Performance Test Slideshow RecentPerformance Test Slideshow Recent
Performance Test Slideshow RecentFuture Simmons
 
Manual testing visonia
Manual testing   visoniaManual testing   visonia
Manual testing visonia
VisoniaTechlab
 
Pragmatic Java Test Automation
Pragmatic Java Test AutomationPragmatic Java Test Automation
Pragmatic Java Test AutomationDmitry Buzdin
 
Web Application Testing
Web Application TestingWeb Application Testing
Web Application TestingRicha Goel
 
Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...
Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...
Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...
Charles Beyer
 
Silk Performer Presentation v1
Silk Performer Presentation v1Silk Performer Presentation v1
Silk Performer Presentation v1
Sun Technlogies
 
Testing Mobile Applications
Testing Mobile ApplicationsTesting Mobile Applications
Testing Mobile Applications
Johan Hoberg
 
Types of test tools
Types of test toolsTypes of test tools
Types of test tools
Vaibhav Dash
 
Testing Presentation
Testing PresentationTesting Presentation
Testing Presentationsureshpkumar
 
Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteriabasma_iti_1984
 
Data driven automation testing of web applications using selenium
Data driven automation testing of web applications using seleniumData driven automation testing of web applications using selenium
Data driven automation testing of web applications using selenium
anandseelan
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementation
Bharathi Krishnamurthi
 
Arun Prasad-R.DOCX
Arun Prasad-R.DOCXArun Prasad-R.DOCX
Arun Prasad-R.DOCXArun R
 

What's hot (20)

Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile Applications
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automation
 
Kscope presentation 2013
Kscope presentation 2013Kscope presentation 2013
Kscope presentation 2013
 
William Truong_updated
William Truong_updatedWilliam Truong_updated
William Truong_updated
 
A Test Automation Framework
A Test Automation FrameworkA Test Automation Framework
A Test Automation Framework
 
2012 student track - vs2010
2012   student track - vs20102012   student track - vs2010
2012 student track - vs2010
 
Mobile applications testing (challenges, tools & techniques)
Mobile applications testing (challenges, tools & techniques)Mobile applications testing (challenges, tools & techniques)
Mobile applications testing (challenges, tools & techniques)
 
Performance Test Slideshow Recent
Performance Test Slideshow RecentPerformance Test Slideshow Recent
Performance Test Slideshow Recent
 
Manual testing visonia
Manual testing   visoniaManual testing   visonia
Manual testing visonia
 
Pragmatic Java Test Automation
Pragmatic Java Test AutomationPragmatic Java Test Automation
Pragmatic Java Test Automation
 
Web Application Testing
Web Application TestingWeb Application Testing
Web Application Testing
 
Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...
Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...
Case of the Unexplained Support Issue – Troubleshooting steps for diagnosing ...
 
Silk Performer Presentation v1
Silk Performer Presentation v1Silk Performer Presentation v1
Silk Performer Presentation v1
 
Testing Mobile Applications
Testing Mobile ApplicationsTesting Mobile Applications
Testing Mobile Applications
 
Types of test tools
Types of test toolsTypes of test tools
Types of test tools
 
Testing Presentation
Testing PresentationTesting Presentation
Testing Presentation
 
Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteria
 
Data driven automation testing of web applications using selenium
Data driven automation testing of web applications using seleniumData driven automation testing of web applications using selenium
Data driven automation testing of web applications using selenium
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementation
 
Arun Prasad-R.DOCX
Arun Prasad-R.DOCXArun Prasad-R.DOCX
Arun Prasad-R.DOCX
 

Similar to Designing for Testability - Rohit Nayak

Planning & building scalable test infrastructure
Planning  & building scalable test infrastructurePlanning  & building scalable test infrastructure
Planning & building scalable test infrastructureVijayan Reddy
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails Applications
Bhavin Javia
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lesson
Sadaaki Emura
 
Innovative Test Automation Solution
Innovative Test Automation SolutionInnovative Test Automation Solution
Innovative Test Automation Solution
Alan Lee White
 
Felix Ramos_Automation Programmer Analyst_QA
Felix Ramos_Automation Programmer Analyst_QAFelix Ramos_Automation Programmer Analyst_QA
Felix Ramos_Automation Programmer Analyst_QAFelix Ramos
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
ICS
 
Next-gen Automation Framework
Next-gen Automation FrameworkNext-gen Automation Framework
Next-gen Automation Framework
Kumar Swamy Dontamsetti
 
04 test controlling and tracking
04   test controlling and tracking04   test controlling and tracking
04 test controlling and tracking
Clemens Reijnen
 
Agile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard ChengAgile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard Cheng
Excella
 
(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know
Richard Cheng
 
Good vs power automation frameworks
Good vs power automation frameworksGood vs power automation frameworks
Good vs power automation frameworks
Kumar Swamy Dontamsetti
 
Gredy - test automation management and team collaboration
Gredy - test automation management and team collaborationGredy - test automation management and team collaboration
Gredy - test automation management and team collaborationGredy
 
Test Automation Frameworks Final
Test Automation Frameworks   FinalTest Automation Frameworks   Final
Test Automation Frameworks Final
Margaret_Dickman
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
DevOps.com
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015
Stephen Ritchie
 
Building Quality with Foundations of Mud
Building Quality with Foundations of MudBuilding Quality with Foundations of Mud
Building Quality with Foundations of Mudseleniumconf
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 
Lightning Talks by Globant - Automation (This app runs by itself )
Lightning Talks by Globant -  Automation (This app runs by itself ) Lightning Talks by Globant -  Automation (This app runs by itself )
Lightning Talks by Globant - Automation (This app runs by itself )
Globant
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and Monitoring
Melissa Benua
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
CIVEL Benoit
 

Similar to Designing for Testability - Rohit Nayak (20)

Planning & building scalable test infrastructure
Planning  & building scalable test infrastructurePlanning  & building scalable test infrastructure
Planning & building scalable test infrastructure
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails Applications
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lesson
 
Innovative Test Automation Solution
Innovative Test Automation SolutionInnovative Test Automation Solution
Innovative Test Automation Solution
 
Felix Ramos_Automation Programmer Analyst_QA
Felix Ramos_Automation Programmer Analyst_QAFelix Ramos_Automation Programmer Analyst_QA
Felix Ramos_Automation Programmer Analyst_QA
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
 
Next-gen Automation Framework
Next-gen Automation FrameworkNext-gen Automation Framework
Next-gen Automation Framework
 
04 test controlling and tracking
04   test controlling and tracking04   test controlling and tracking
04 test controlling and tracking
 
Agile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard ChengAgile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard Cheng
 
(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know
 
Good vs power automation frameworks
Good vs power automation frameworksGood vs power automation frameworks
Good vs power automation frameworks
 
Gredy - test automation management and team collaboration
Gredy - test automation management and team collaborationGredy - test automation management and team collaboration
Gredy - test automation management and team collaboration
 
Test Automation Frameworks Final
Test Automation Frameworks   FinalTest Automation Frameworks   Final
Test Automation Frameworks Final
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015
 
Building Quality with Foundations of Mud
Building Quality with Foundations of MudBuilding Quality with Foundations of Mud
Building Quality with Foundations of Mud
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
 
Lightning Talks by Globant - Automation (This app runs by itself )
Lightning Talks by Globant -  Automation (This app runs by itself ) Lightning Talks by Globant -  Automation (This app runs by itself )
Lightning Talks by Globant - Automation (This app runs by itself )
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and Monitoring
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 

More from IndicThreads

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

More from IndicThreads (20)

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

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 

Designing for Testability - Rohit Nayak

  • 1. Designing Software For Testability A forgotten design pattern Rohit Nayak Talentica
  • 2. Agenda  Background and Motivation  DFT in VLSI and hardware design  Issues in Software Testing  DFT for Software Development  Automation and Testability  Some Examples  Cons, Review
  • 3. The Anti-Pattern If it works, its the developer, if not blame QA!
  • 4. VLSI/PCB Testing Issues  Mass produced  Each piece needs to be validated  Complexity − Number of subsystems − Amount of logic  Access to internal logic  Testing costs  Cost of recall
  • 5.
  • 6. Testability: “Effort required to test a product to ensure that it performs its intended function”
  • 7. DFT Principles  Controllability  Observability − Test Point Insertion  Built-In Self Test (BIST)  Fault Modelling  Fault Simulation  Test Pattern Generation
  • 8.
  • 9.
  • 10. Software Testing “Testability is a design issue and needs to be addressed with the design of the rest of the system. Projects that defer testing to the later stages of a project will find their programmers unwilling to consider testability changes by the time testers actually roll onto the project and start making suggestions. Testability takes cooperation, appreciation and a team commitment to reliability.” - Bret Pettichord
  • 11. Cost Of Bugs Where Found Requirements Architecture Coding System Test Production Where Introduced Requirements 1x 3x 5-10x 10x 10x-100x Architecture 1x 10x 15x 25-100x Coding 1x 10x 10-25x
  • 12.
  • 13. Software Testability  Suitability: clarity of specifications QA has  Observability: we can only test what is visible  Simplicity: easier design/UI makes testing easier  Controllability: better the control, better the coverage and automation  Stability: how often it changes  Performance: how fast it works  Diagnosability: writing effective bug reports!
  • 14. Software DFT Patterns  BIST  Controllability − Automation suite − Decoupling w/ oracle − Bypassing − Unit Tests − Mock/Stub − Assertions − Set/Reset  Fault Simulation  Observability − Mock/Stub − Logging − Invalid params − Reporting − Test Interfaces
  • 15. Good Automated Tests are  Repeatable  Easy to Write  Easy to Understand  Fast  Way Easier with a Testable Software
  • 16. When/How to Automate?  Manager & Team are commited  Testers/Dev either experienced or interested in learning to script  Product release cycles managed well  Functionality / UI changes under control  Early/Incremental approaches work best  Build integration, reporting  Each bug results in a automated test
  • 17. Automation As Coding  Automation scripts and frameworks are CODE!  Use tools and scripting languages  Evaluate tools on real problems  Follow development processes − Spiral/Agile  Use Source Control same as rest of code  These will have bugs as well!
  • 18. Test “oracle”  Expected Result − Generated once from previous run or − Manually specified or − Legacy system  Time adjustment  Results − Database − File − Inline with code
  • 19. Test Environment  Multiple VMs  Automated installs/images  Automation tools  Bug reporting tools
  • 20. Unit Tests  Each module has independent set  Developer written/maintained  setup, teardown  xUnit, TestNG  Runs on build  Can run sub-set on install  TDD
  • 21. Diagnosability  All environments: Test / Staging / Production  Errors result in visual messages  Errors are raised where they occur  Errors can be localized  Details are sufficient to fix issue  Ability to send diag data to dev
  • 22. Logging Module  Log levels (VERBOSE, INFO, WARNING, ERROR, CRITICAL, TIME)  Define CRITICAL/ERROR levels well and use them!  These should result in urgent notifications  Lower levels in Production  Time, App, Component, ThreadId, Message 8/2/2010 14:22pm: Notifier: Pop3: 8242: Sending welcome email to userid 334  Delimited columns for import  Rotation based on Time, Size
  • 23. Built-in Self Test  Inserting test code/interfaces  Set/Reset to bring state to known value  Reporting to get current state  Assertions about values/state assert(order.billed==true)  “oracle” based regression
  • 24. Some Examples  Web Application − Software As A Service − Browser Only UI − Ajax / Dynamic HTML  Banking (Client-Server) − Installed Application − Desktop Client − Server API
  • 25. Web Application  HTML Page Title  Id values for important divs/controls  Hidden values (non-textual, graphs, tables)  Measurable Ajax responses  Tools: Selenium, Sahi, Watir, WebTest, curl  Logging incl. browser/ip/session cookie  Ability to simulate time zone, language
  • 26. Web Application - 2  Bypassing Captcha  Mock TP APIs eg. Facebook, Google, OpenId  SSL bypassing  Transactions to be voided  Multiple runs  Always initialise controls − Browser autofill
  • 27. Desktop  Unique identifiers to GUI controls  Key Replay tools, SendKeys  API test suites bypassing UI  Client logs, ability to email  Ability to run db queries in scripts
  • 28. Desktop - 2  Automation Friendly Third Party Controls − Ability to select cell − Copy-enable text fields − Key shortcuts to Forms UI for control focus, clicking, navigation − Access by value (tree/list controls)  OCR for images/text consoles
  • 29. Bypassing  Credit card payment − Test cards − Mock object − Dev auto-approval bypass code  Order placement − Dummy users, auto-fulfill − Dummy vendors (email order) − Admin screens move
  • 30. Dates  Never use system date directly  Config override <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key=“SystemDate" value=“$now"> </appSettings> </configuration>  Nant: XMLPoke <xmlpoke file="App.config" xpath="/configuration/appSettings/add[@key = 'SystemDate']/@value" value="1-1-2009" />
  • 31. Sending Emails  Email subsystem should be a stub in dev  Bypass SMTP: log to file …  Email should be sent only to a whitelist  Use Gmail Id & Atom API  Use Unique Id/Timestamp to distinguish
  • 32. Mocking / Stubbing  Replace module during testing  Different kinds: − Sub-system (Email, Print) − Webservice (Credit Card, Flight Booking) − Hardware device (Biometric, CNC Machine)  Return default values, implement simple/fixed logic
  • 33. Mocks - 2  Simulate Errors and Exceptions  Provide more logging  Jmock, Dependency Injection  Con: − Code level − Needs to change with API
  • 34. Anti-Testability Viewpoints  Security compromise by testability interfaces, logging Remove or lock down in prod  Extra coding time Much lower testing costs, better quality  Privacy issues in logging Show only partial data  Performance Almost never an issue in practice!
  • 35. Review  BIST  Controllability − Automation suite − Decoupling w/ oracle − Bypassing − Unit Tests − Mock/Stub − Assertions − Set/Reset  Fault Simulation  Observability − Mock/Stub − Logging − Invalid params − Reporting