Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder

Joseph Yoder
Joseph YoderSoftware Consultant at The Refactory, Inc.
Testing System Qualities

     Rebecca Wirfs-Brock
             Joseph Yoder



      Copyright 2012 Rebecca Wirfs-Brock, Joseph Yoder,
        Wirfs-Brock Associates and The Refactory, Inc.
Introducing Rebecca
President, Wirfs-Brock Associates
Agile enthusiast (involved with experience
    reports since 1st agile conference, board
    president Agile Open Northwest)
First engineering job in Quality Assurance
Pattern enthusiast, author, and Hillside Board
    Treasurer
Old design geek (author of two object design
    books, inventor of Responsibility-Driven
    Design, advocate of CRC cards, hot spot
    cards, & other low-tech design tools, IEEE
    Software design columnist)
Consults and trains top companies on agile
    architecture, responsiblity-driven design,
    enterprise app design, agile use cases,
    design storytelling, pragmatic testing
Runs marathons!!!
Introducing Joseph
Founder and Architect, The Refactory, Inc.
Pattern enthusiast, author and Hillside Board
   President
Author of the Big Ball of Mud Pattern
Adaptive systems expert (programs adaptive
   software, consults on adaptive
   architectures, author of adaptive
   architecture patterns, metatdata maven,
   website: adaptiveobjectmodel.com)
Agile enthusiast and practitioner
Business owner (leads a world class
   development company)
Consults and trains top companies on design,
   refactoring, pragmatic testing
Amateur photographer, motorcycle enthusiast,
   enjoys dancing samba!!!
Some Agile Myths
• System Qualities can be
  added at the last moment.
• We can easily adapt to changing
  requirements (new requirements).
• You can change the system fast!!!
• Don’t worry about the architecture.
Most testers spend the majority of their time writing functional tests




…BUT THERE’S A LOT MORE TO TEST
THAT YOUR SOFTWARE WORKS AS
ADVERTISED
Pragmatic Testing Issues

  • What kinds of testing
    should you focus on?
  • Who writes them?
  • Who runs them?
  • When are they run?
  • How are they run?
Testing System Qualities
Qualities we could consider…
    •   Usability
    •   Security
    •   Performance
    •   Scalability
    •   Internationalization
    •   Availability
    •   Flexibility
    •   Accessibility
    •   Location
    •   Regulation
Discussion


What are the
 important
 qualities in
your system?
Functional Tests vs. System Quality Tests
  Functional:
    – How do I …?
    – Tests user stories work as advertised
       • “As a reviewer I want to add a note to a chart”
       • Compute the charge for an invoice
    – Tests boundary conditions
       • Can I add more than one note at the same place?
       • Are excess charges computed correctly?
System Quality Tests
• How does the system handle…?
  – system load …? number of add note
    transactions/minute under normal load
  – system support for…? simultaneously
    updating charts
  – usability…? ease of locating and selecting notes

• Tests that emphasize architecture capabilities
  and tangible system characteristics
Structure for A System
Quality Acceptance Test
Specify Measurable Results
• Meter: An appropriate • Scale: The values
         way to measure          you expect
                           – Natural Scale:
                              • Response time in
                                milliseconds
                           – Constructed:
                              • 1-10 ranking
                           – Proxy:
                              • Projecting throughput
                                using sample data
Example Performance Scenario

Source of   Stimulus       Artifact    Response       Response
Stimulus                                              Measure
 Users      Initiate      System       Transactions
            order                      processed      Average
                                                      latency of 2
                       Environment                    seconds
                          Normal
                          conditions


  “Users initiate 1,000 order transactions per
   minute under normal operations; transactions
   are processed with an average latency of 2
   seconds.”
Possible Performance Scenario Values
  Portion of                       Possible Values
  Scenario
  Source        External systems, users, components, databases
  Stimulus      Periodic events, sporadic or random events (or a
                combination)
  Artifact      The system’s services, data, or other resources
  Environment   The state the system can be in: normal, overloaded,
                partial operation, emergency mode…
  Response      Process the event or event sequence and possibly change
                the level of service
  Response      Times it takes to process the arriving events (latency or
  Measure       deadline by which event must be processed), the
                variation in this time, the number of events that can be
                processed within a particular time interval, or a
                characterization of events that cannot be processed
                (missed rate, data loss)
Example Security Scenario

 Source of    Stimulus   Artifact   Response      Response
 Stimulus                                         Measure
                         Data       System
              Tries to   within the maintains     Correct data
 Correctly
              transfer   system                   is restored
 identified                         audit trail
              money Environment                   within a day of
 individual
              between Normal                      reported event
              accounts operation

“A known, authorized user transfers money between
 accounts. The user is later identified as an embezzler
 by the institution they belong to and the system then
 restores funds to the original account.”
Possible Security Scenario Values
Portion of                            Possible Values
Scenario
Source        A human or another system. May be identified (correctly or not) or
              be unknown.
Stimulus      An attack or an attempt to break security by trying to display
              information, change information, access system services, or reduce
              system availability
Artifact      The system’s services or data.
Environment   The system might be online or offline, connected to or disconnected
              from the network, behind a firewall or open to the network.
Response      Authenticates user; hides identity of the user; blocks or allows access
              to data and/or services; records access/modification attempts by
              identity; stores data in encrypted format; recognizes unexplained high
              demand and informs a user or other system, or restricts availability.
Response      Time/effort/resources required to circumvent security measures with
Measure       probability of success; probability of detecting attack; probability of
              identifying individual responsible for attack or access/modification;
              time/effort/resources to restore data/services; extent to which
              data/services are damaged and/or legitimate access denied.
Example Modifiability Scenario

Source of     Stimulus    Artifact    Response       Response
Stimulus                                             Measure
 Developer   Add support UI, Source Modification made
             for new                with no schema     2 days to
                         code,
             service                changes            code and
                         Service
             code                                      test, 1 day
                         Code
                                                       to deploy
                         Table
                     Environment
                   Compile time, data definition

“A developer adds support for a new service code to the
system by adding the service code to the definitions table and
modifying the UI to make it available to users. The
modification is made with no data schema changes ”
Possible Modifiability Scenario Values
  Portion of                  Possible Values
  Scenario
  Source        End user, developer, system administrator
  Stimulus      Wishes to add/delete/modify/vary functionality.
                Wishes to change some system quality such as
                availability, responsiveness, increasing capacity.
  Artifact      What is to be changed: system user interface,
                platform, environment, or another system or API
                with which it interoperates
  Environment   When the change can be made: runtime, compile
                time, build time, when deployed,…
  Response      Locates places to be modified; makes
                modification without affecting other
                functionality; tests and deploys modification
  Response      End user, developer, system administrator
  Measure
Example Availability Scenario

Source of    Stimulus    Artifact    Response             Response
Stimulus                                                  Measure
 Unknown    Unexpected System        Record “raw”
            Report                   report in database    No lost
 Sensor
                                     and log event         data
                    Environment
                        Normal
                        conditions


  “An unknown sensor sends a report. The system stores
  the raw data in the unknown sensor database (to
  potentially be processed or purged later) and logs the
  event. ”
Example Usability Scenario

  Source of    Stimulus   Artifact   Response      Response
  Stimulus    Cancel      System                   Measure
              request                 System
                                      backs out    Cancel takes
   End user         Environment
                                      pending      less than one
                     At runtime       transaction second
                                      and releases
                                      resources

“A user can cancel a pending request within two seconds.”
Copyright 2012 Wirfs-Brock Associates and The Refactory
EXERCISES



WRITE A QUALITY SCENARIO FOR A DATA
COLLECTION AND ANALYSIS SYSTEM
Write A Quality Scenario
• Using the template handout,
  write a quality scenario. Be specific.
• Options:
   – Response to data received from an unknown sensor.
   – Adding new analyzer plug-ins.
   – Relocating a sensor and being able to correlate data
     from its previous location (if desired).
   – Detecting and troubleshooting equipment failures
   – Detecting unusual weather conditions and incidents

• What quality does your scenario address?
You can’t test warm and fuzzy…
“It should be easy to place an online order”



TURN VAGUE STATEMENTS INTO
CONCRETE MEASURABLE ACTIONS
Turning Warm Fuzzies into a
        Testable Usability Scenario

  Source of   Stimulus    Artifact     Response    Response
  Stimulus                System                   Measure
              Place                    Order
   Novice     order                    completed   Time to
   user                  Environment               complete order
                                                   entry task
                         Web interface
                         with online help

“80% of novice users should be able to place an order in
 under 3 minutes without assistance.”
                            or
“80% of novice users should be able to place an order in
 under 3 minutes only using online help.”
Agreeing on scenarios and target values
Some options…
• Toss out a reasonable number, then
     discuss to come to a consensus
• Average informed individuals’ estimates
• Use an existing system as baseline
• Values for similar scenarios
• Benchmark working code
• …
There is more than “pass” or “fail”
                  • Landing Zone: Lets you
                    define a range of
                    acceptable values
                     – Minimal: OK, we
                       can live with that
                     – Target: Realistic goal,
                       what we are aiming for
                     – Outstanding: This
                       would be great, if
                       everything goes well
Landing Zones
       • Roll up product or
         project success to
         several key scenarios
       • Easier to make sense of
         the bigger picture:
          – What happens when one
            quality scenario edges
            below minimum? How
            do others trend?
          – When will targets be
            achieved? At what cost?
Minimum     Target       Outstanding
            Throughput (txns      50,000      70,000       90,000
Performance per day)
            Average txn time      2 seconds   1 second     < 1 second

             Intersystem data     95%         97%          97%
             consistency (per
Data Quality cent critical data
             attributes
             consistent)
              Data accuracy       97%         99%          >99%


               Managing Landing Zones
       Too many scenarios and you lose track of what’s really important
       Define a core set, organize and group
       Roll up into aggregate scenarios
       Re-calibrate values as you implement more functionality…be agile
Quality Testing Cycle for TDD

        Identify and
                           Write Code
                                             Verify
           Write                            Quality
                           and Tests
          Quality                          Scenarios
         Scenarios


                        Clean up Code
                       (Refactor/revise
                           /rework)



Ship
                                            Check
            Ready to   all tests succeed
it!!!                                      all Tests
            Release?                       Succeed
Test Coverage Can Overlap…

               Smoke
               Tests   Quality
                       Scenarios
 Integration
 Tests
                                   Acceptance
                                   Tests
                                   (Functional and
                                   qualities)

               Unit
               Tests
Pragmatic Test Driven
           Development Is…
• Practical. Testing system qualities can fit into
  and enhance your current testing.
• Thoughtful. What qualities need to be tested?
  Who should write tests? When should you test
  for qualities?
• Realistic. You only have so much time and energy.
  Test essential qualities.
Summary
• Quality Scenarios are easy to write and read.
• Writing quality test scenarios drives out
  important cross-cutting concerns.
• If you don’t pay attention to qualities they
  can be hard to achieve at the last moment.
• Measuring system qualities can require
  specialized testing/measurement tools.
Resources
•   Agile Myths: agilemyths.com
•   Wirfs-Brock Associates: www.wirfs-brock.com
•   The Refactory: www.refactory.com
•   Joe’s website: joeyoder.com
•   Our Pragmatic TDD Course:
    – refactory.com/training/test-driven-development
    – wirfs-brock.com/pragmatictestdrivendevelopment.html
• Landing Zone blogs:
    – wirfs-brock.com/blog/2011/07/20/introducing-landing-zones/
    – wirfs-brock.com/blog/2011/08/16/who-defines-or-redefines-
                                                landing-zone-criteria/
    – wirfs-brock.com/blog/2011/08/05/landing-zone-targets-precision-
                                                specificity-and-wiggle-room/
• Introducing Pragmatic TDD:
    – wirfs-brock.com/blog/2011/09/23/what-is-pragmatic-testing-all-about/
    – http://adaptiveobjectmodel.com/2012/01/what-is-pragmatic-tdd/
1 of 35

Recommended

Software Architecture Second Lecture by
Software Architecture Second LectureSoftware Architecture Second Lecture
Software Architecture Second LectureSadhana Ghalsasi
580 views19 slides
The difference between in-depth analysis of virtual infrastructures & monitoring by
The difference between in-depth analysis of virtual infrastructures & monitoringThe difference between in-depth analysis of virtual infrastructures & monitoring
The difference between in-depth analysis of virtual infrastructures & monitoringBettyRManning
184 views8 slides
Quals by
QualsQuals
QualsNhựt Đình
197 views41 slides
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用 by
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用Hironori Washizaki
1.1K views25 slides
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P... by
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...Takashi Iba
2.6K views81 slides
Pragmatic notdogmatictdd by
Pragmatic notdogmatictddPragmatic notdogmatictdd
Pragmatic notdogmatictddJoseph Yoder
1K views33 slides

More Related Content

Viewers also liked

AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け by
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行けAWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行けHajime Ogushi
2.4K views77 slides
System quality attributes by
System quality attributes System quality attributes
System quality attributes Adil Mehmoood
1.2K views10 slides
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work by
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkJoseph Yoder
7.7K views75 slides
Cloud Computing Architecture Primer by
Cloud Computing Architecture PrimerCloud Computing Architecture Primer
Cloud Computing Architecture PrimerIlham Ahmed
5.3K views15 slides
Software Architecture: Test Case Writing by
Software Architecture: Test Case WritingSoftware Architecture: Test Case Writing
Software Architecture: Test Case WritingSitdhibong Laokok
15.7K views38 slides
Cloud computing architecture and vulnerabilies by
Cloud computing architecture and vulnerabiliesCloud computing architecture and vulnerabilies
Cloud computing architecture and vulnerabiliesVinay Dwivedi
14.5K views26 slides

Viewers also liked(12)

AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け by Hajime Ogushi
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行けAWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
Hajime Ogushi2.4K views
System quality attributes by Adil Mehmoood
System quality attributes System quality attributes
System quality attributes
Adil Mehmoood1.2K views
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work by Joseph Yoder
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Joseph Yoder7.7K views
Cloud Computing Architecture Primer by Ilham Ahmed
Cloud Computing Architecture PrimerCloud Computing Architecture Primer
Cloud Computing Architecture Primer
Ilham Ahmed5.3K views
Software Architecture: Test Case Writing by Sitdhibong Laokok
Software Architecture: Test Case WritingSoftware Architecture: Test Case Writing
Software Architecture: Test Case Writing
Sitdhibong Laokok15.7K views
Cloud computing architecture and vulnerabilies by Vinay Dwivedi
Cloud computing architecture and vulnerabiliesCloud computing architecture and vulnerabilies
Cloud computing architecture and vulnerabilies
Vinay Dwivedi14.5K views
Introduction to cloud computing by Vipin Batra
Introduction to cloud computingIntroduction to cloud computing
Introduction to cloud computing
Vipin Batra12K views
Mobile Cloud Computing Challenges and Security by John Paul Prassanna
Mobile Cloud Computing Challenges and SecurityMobile Cloud Computing Challenges and Security
Mobile Cloud Computing Challenges and Security
John Paul Prassanna12.6K views
How to Implement Hybrid Cloud Solutions Successfully by SoftServe
How to Implement Hybrid Cloud Solutions SuccessfullyHow to Implement Hybrid Cloud Solutions Successfully
How to Implement Hybrid Cloud Solutions Successfully
SoftServe2.4K views
Fog Computing with VORTEX by Angelo Corsaro
Fog Computing with VORTEXFog Computing with VORTEX
Fog Computing with VORTEX
Angelo Corsaro17.3K views
Cloud computing security issues and challenges by Dheeraj Negi
Cloud computing security issues and challengesCloud computing security issues and challenges
Cloud computing security issues and challenges
Dheeraj Negi30.3K views
AWSでアプリ開発するなら 知っておくべこと by Keisuke Nishitani
AWSでアプリ開発するなら 知っておくべことAWSでアプリ開発するなら 知っておくべこと
AWSでアプリ開発するなら 知っておくべこと
Keisuke Nishitani22.8K views

Similar to Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder

Software archiecture lecture05 by
Software archiecture   lecture05Software archiecture   lecture05
Software archiecture lecture05Luktalja
718 views46 slides
Sda 3 by
Sda   3Sda   3
Sda 3AmberMughal5
47 views38 slides
Design For Testability by
Design For TestabilityDesign For Testability
Design For TestabilityGiovanni Asproni
3.1K views87 slides
Quality Attributes Of a Software.pptx by
Quality Attributes Of a Software.pptxQuality Attributes Of a Software.pptx
Quality Attributes Of a Software.pptxjordan724752
2 views17 slides
RuSIEM overview (english version) by
RuSIEM overview (english version)RuSIEM overview (english version)
RuSIEM overview (english version)Olesya Shelestova
696 views41 slides
Ch20-Software Engineering 9 by
Ch20-Software Engineering 9Ch20-Software Engineering 9
Ch20-Software Engineering 9Ian Sommerville
2.9K views46 slides

Similar to Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder(20)

Software archiecture lecture05 by Luktalja
Software archiecture   lecture05Software archiecture   lecture05
Software archiecture lecture05
Luktalja718 views
Quality Attributes Of a Software.pptx by jordan724752
Quality Attributes Of a Software.pptxQuality Attributes Of a Software.pptx
Quality Attributes Of a Software.pptx
jordan7247522 views
Automated Discovery of Performance Regressions in Enterprise Applications by SAIL_QU
Automated Discovery of Performance Regressions in Enterprise ApplicationsAutomated Discovery of Performance Regressions in Enterprise Applications
Automated Discovery of Performance Regressions in Enterprise Applications
SAIL_QU229 views
Performance testing basics by Charu Anand
Performance testing basicsPerformance testing basics
Performance testing basics
Charu Anand1.7K views
Siddhi: A Second Look at Complex Event Processing Implementations by Srinath Perera
Siddhi: A Second Look at Complex Event Processing ImplementationsSiddhi: A Second Look at Complex Event Processing Implementations
Siddhi: A Second Look at Complex Event Processing Implementations
Srinath Perera17.4K views
High Availability HPC ~ Microservice Architectures for Supercomputing by inside-BigData.com
High Availability HPC ~ Microservice Architectures for SupercomputingHigh Availability HPC ~ Microservice Architectures for Supercomputing
High Availability HPC ~ Microservice Architectures for Supercomputing
inside-BigData.com1.9K views
ADDO Open Source Observability Tools by Mickey Boxell
ADDO Open Source Observability Tools ADDO Open Source Observability Tools
ADDO Open Source Observability Tools
Mickey Boxell141 views
Proactive ops for container orchestration environments by Docker, Inc.
Proactive ops for container orchestration environmentsProactive ops for container orchestration environments
Proactive ops for container orchestration environments
Docker, Inc.322 views
Code Quality - Security by sedukull
Code Quality - SecurityCode Quality - Security
Code Quality - Security
sedukull1.5K views
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Building an Event-oriented... by Data Con LA
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Building an Event-oriented...Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Building an Event-oriented...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Building an Event-oriented...
Data Con LA1.8K views
Big Data and Machine Learning on AWS by CloudHesive
Big Data and Machine Learning on AWSBig Data and Machine Learning on AWS
Big Data and Machine Learning on AWS
CloudHesive233 views
Regulated Reactive - Security Considerations for Building Reactive Systems in... by Ryan Hodgin
Regulated Reactive - Security Considerations for Building Reactive Systems in...Regulated Reactive - Security Considerations for Building Reactive Systems in...
Regulated Reactive - Security Considerations for Building Reactive Systems in...
Ryan Hodgin281 views
Challenges in Practicing High Frequency Releases in Cloud Environments by Liming Zhu
Challenges in Practicing High Frequency Releases in Cloud Environments Challenges in Practicing High Frequency Releases in Cloud Environments
Challenges in Practicing High Frequency Releases in Cloud Environments
Liming Zhu1.6K views
Building an Event-oriented Data Platform with Kafka, Eric Sammer by confluent
Building an Event-oriented Data Platform with Kafka, Eric Sammer Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer
confluent3.9K views

Recently uploaded

Future of AR - Facebook Presentation by
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook PresentationRob McCarty
65 views27 slides
"Package management in monorepos", Zoltan Kochan by
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan KochanFwdays
34 views18 slides
NTGapps NTG LowCode Platform by
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform Mustafa Kuğu
437 views30 slides
"Surviving highload with Node.js", Andrii Shumada by
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada Fwdays
58 views29 slides
Qualifying SaaS, IaaS.pptx by
Qualifying SaaS, IaaS.pptxQualifying SaaS, IaaS.pptx
Qualifying SaaS, IaaS.pptxSachin Bhandari
1.1K views8 slides
Evaluation of Quality of Experience of ABR Schemes in Gaming Stream by
Evaluation of Quality of Experience of ABR Schemes in Gaming StreamEvaluation of Quality of Experience of ABR Schemes in Gaming Stream
Evaluation of Quality of Experience of ABR Schemes in Gaming StreamAlpen-Adria-Universität
38 views34 slides

Recently uploaded(20)

Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu437 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays58 views
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada44 views
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 views
Transcript: Redefining the book supply chain: A glimpse into the future - Tec... by BookNet Canada
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
BookNet Canada41 views
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdf by MichaelOLeary82
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdfAdopting Karpenter for Cost and Simplicity at Grafana Labs.pdf
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdf
MichaelOLeary8213 views
This talk was not generated with ChatGPT: how AI is changing science by Elena Simperl
This talk was not generated with ChatGPT: how AI is changing scienceThis talk was not generated with ChatGPT: how AI is changing science
This talk was not generated with ChatGPT: how AI is changing science
Elena Simperl32 views
What is Authentication Active Directory_.pptx by HeenaMehta35
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptx
HeenaMehta3515 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue108 views
AIM102-S_Cognizant_CognizantCognitive by PhilipBasford
AIM102-S_Cognizant_CognizantCognitiveAIM102-S_Cognizant_CognizantCognitive
AIM102-S_Cognizant_CognizantCognitive
PhilipBasford21 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE84 views

Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder

  • 1. Testing System Qualities Rebecca Wirfs-Brock Joseph Yoder Copyright 2012 Rebecca Wirfs-Brock, Joseph Yoder, Wirfs-Brock Associates and The Refactory, Inc.
  • 2. Introducing Rebecca President, Wirfs-Brock Associates Agile enthusiast (involved with experience reports since 1st agile conference, board president Agile Open Northwest) First engineering job in Quality Assurance Pattern enthusiast, author, and Hillside Board Treasurer Old design geek (author of two object design books, inventor of Responsibility-Driven Design, advocate of CRC cards, hot spot cards, & other low-tech design tools, IEEE Software design columnist) Consults and trains top companies on agile architecture, responsiblity-driven design, enterprise app design, agile use cases, design storytelling, pragmatic testing Runs marathons!!!
  • 3. Introducing Joseph Founder and Architect, The Refactory, Inc. Pattern enthusiast, author and Hillside Board President Author of the Big Ball of Mud Pattern Adaptive systems expert (programs adaptive software, consults on adaptive architectures, author of adaptive architecture patterns, metatdata maven, website: adaptiveobjectmodel.com) Agile enthusiast and practitioner Business owner (leads a world class development company) Consults and trains top companies on design, refactoring, pragmatic testing Amateur photographer, motorcycle enthusiast, enjoys dancing samba!!!
  • 4. Some Agile Myths • System Qualities can be added at the last moment. • We can easily adapt to changing requirements (new requirements). • You can change the system fast!!! • Don’t worry about the architecture.
  • 5. Most testers spend the majority of their time writing functional tests …BUT THERE’S A LOT MORE TO TEST THAT YOUR SOFTWARE WORKS AS ADVERTISED
  • 6. Pragmatic Testing Issues • What kinds of testing should you focus on? • Who writes them? • Who runs them? • When are they run? • How are they run?
  • 7. Testing System Qualities Qualities we could consider… • Usability • Security • Performance • Scalability • Internationalization • Availability • Flexibility • Accessibility • Location • Regulation
  • 8. Discussion What are the important qualities in your system?
  • 9. Functional Tests vs. System Quality Tests Functional: – How do I …? – Tests user stories work as advertised • “As a reviewer I want to add a note to a chart” • Compute the charge for an invoice – Tests boundary conditions • Can I add more than one note at the same place? • Are excess charges computed correctly?
  • 10. System Quality Tests • How does the system handle…? – system load …? number of add note transactions/minute under normal load – system support for…? simultaneously updating charts – usability…? ease of locating and selecting notes • Tests that emphasize architecture capabilities and tangible system characteristics
  • 11. Structure for A System Quality Acceptance Test
  • 12. Specify Measurable Results • Meter: An appropriate • Scale: The values way to measure you expect – Natural Scale: • Response time in milliseconds – Constructed: • 1-10 ranking – Proxy: • Projecting throughput using sample data
  • 13. Example Performance Scenario Source of Stimulus Artifact Response Response Stimulus Measure Users Initiate System Transactions order processed Average latency of 2 Environment seconds Normal conditions “Users initiate 1,000 order transactions per minute under normal operations; transactions are processed with an average latency of 2 seconds.”
  • 14. Possible Performance Scenario Values Portion of Possible Values Scenario Source External systems, users, components, databases Stimulus Periodic events, sporadic or random events (or a combination) Artifact The system’s services, data, or other resources Environment The state the system can be in: normal, overloaded, partial operation, emergency mode… Response Process the event or event sequence and possibly change the level of service Response Times it takes to process the arriving events (latency or Measure deadline by which event must be processed), the variation in this time, the number of events that can be processed within a particular time interval, or a characterization of events that cannot be processed (missed rate, data loss)
  • 15. Example Security Scenario Source of Stimulus Artifact Response Response Stimulus Measure Data System Tries to within the maintains Correct data Correctly transfer system is restored identified audit trail money Environment within a day of individual between Normal reported event accounts operation “A known, authorized user transfers money between accounts. The user is later identified as an embezzler by the institution they belong to and the system then restores funds to the original account.”
  • 16. Possible Security Scenario Values Portion of Possible Values Scenario Source A human or another system. May be identified (correctly or not) or be unknown. Stimulus An attack or an attempt to break security by trying to display information, change information, access system services, or reduce system availability Artifact The system’s services or data. Environment The system might be online or offline, connected to or disconnected from the network, behind a firewall or open to the network. Response Authenticates user; hides identity of the user; blocks or allows access to data and/or services; records access/modification attempts by identity; stores data in encrypted format; recognizes unexplained high demand and informs a user or other system, or restricts availability. Response Time/effort/resources required to circumvent security measures with Measure probability of success; probability of detecting attack; probability of identifying individual responsible for attack or access/modification; time/effort/resources to restore data/services; extent to which data/services are damaged and/or legitimate access denied.
  • 17. Example Modifiability Scenario Source of Stimulus Artifact Response Response Stimulus Measure Developer Add support UI, Source Modification made for new with no schema 2 days to code, service changes code and Service code test, 1 day Code to deploy Table Environment Compile time, data definition “A developer adds support for a new service code to the system by adding the service code to the definitions table and modifying the UI to make it available to users. The modification is made with no data schema changes ”
  • 18. Possible Modifiability Scenario Values Portion of Possible Values Scenario Source End user, developer, system administrator Stimulus Wishes to add/delete/modify/vary functionality. Wishes to change some system quality such as availability, responsiveness, increasing capacity. Artifact What is to be changed: system user interface, platform, environment, or another system or API with which it interoperates Environment When the change can be made: runtime, compile time, build time, when deployed,… Response Locates places to be modified; makes modification without affecting other functionality; tests and deploys modification Response End user, developer, system administrator Measure
  • 19. Example Availability Scenario Source of Stimulus Artifact Response Response Stimulus Measure Unknown Unexpected System Record “raw” Report report in database No lost Sensor and log event data Environment Normal conditions “An unknown sensor sends a report. The system stores the raw data in the unknown sensor database (to potentially be processed or purged later) and logs the event. ”
  • 20. Example Usability Scenario Source of Stimulus Artifact Response Response Stimulus Cancel System Measure request System backs out Cancel takes End user Environment pending less than one At runtime transaction second and releases resources “A user can cancel a pending request within two seconds.”
  • 21. Copyright 2012 Wirfs-Brock Associates and The Refactory
  • 22. EXERCISES WRITE A QUALITY SCENARIO FOR A DATA COLLECTION AND ANALYSIS SYSTEM
  • 23. Write A Quality Scenario • Using the template handout, write a quality scenario. Be specific. • Options: – Response to data received from an unknown sensor. – Adding new analyzer plug-ins. – Relocating a sensor and being able to correlate data from its previous location (if desired). – Detecting and troubleshooting equipment failures – Detecting unusual weather conditions and incidents • What quality does your scenario address?
  • 24. You can’t test warm and fuzzy… “It should be easy to place an online order” TURN VAGUE STATEMENTS INTO CONCRETE MEASURABLE ACTIONS
  • 25. Turning Warm Fuzzies into a Testable Usability Scenario Source of Stimulus Artifact Response Response Stimulus System Measure Place Order Novice order completed Time to user Environment complete order entry task Web interface with online help “80% of novice users should be able to place an order in under 3 minutes without assistance.” or “80% of novice users should be able to place an order in under 3 minutes only using online help.”
  • 26. Agreeing on scenarios and target values
  • 27. Some options… • Toss out a reasonable number, then discuss to come to a consensus • Average informed individuals’ estimates • Use an existing system as baseline • Values for similar scenarios • Benchmark working code • …
  • 28. There is more than “pass” or “fail” • Landing Zone: Lets you define a range of acceptable values – Minimal: OK, we can live with that – Target: Realistic goal, what we are aiming for – Outstanding: This would be great, if everything goes well
  • 29. Landing Zones • Roll up product or project success to several key scenarios • Easier to make sense of the bigger picture: – What happens when one quality scenario edges below minimum? How do others trend? – When will targets be achieved? At what cost?
  • 30. Minimum Target Outstanding Throughput (txns 50,000 70,000 90,000 Performance per day) Average txn time 2 seconds 1 second < 1 second Intersystem data 95% 97% 97% consistency (per Data Quality cent critical data attributes consistent) Data accuracy 97% 99% >99% Managing Landing Zones Too many scenarios and you lose track of what’s really important Define a core set, organize and group Roll up into aggregate scenarios Re-calibrate values as you implement more functionality…be agile
  • 31. Quality Testing Cycle for TDD Identify and Write Code Verify Write Quality and Tests Quality Scenarios Scenarios Clean up Code (Refactor/revise /rework) Ship Check Ready to all tests succeed it!!! all Tests Release? Succeed
  • 32. Test Coverage Can Overlap… Smoke Tests Quality Scenarios Integration Tests Acceptance Tests (Functional and qualities) Unit Tests
  • 33. Pragmatic Test Driven Development Is… • Practical. Testing system qualities can fit into and enhance your current testing. • Thoughtful. What qualities need to be tested? Who should write tests? When should you test for qualities? • Realistic. You only have so much time and energy. Test essential qualities.
  • 34. Summary • Quality Scenarios are easy to write and read. • Writing quality test scenarios drives out important cross-cutting concerns. • If you don’t pay attention to qualities they can be hard to achieve at the last moment. • Measuring system qualities can require specialized testing/measurement tools.
  • 35. Resources • Agile Myths: agilemyths.com • Wirfs-Brock Associates: www.wirfs-brock.com • The Refactory: www.refactory.com • Joe’s website: joeyoder.com • Our Pragmatic TDD Course: – refactory.com/training/test-driven-development – wirfs-brock.com/pragmatictestdrivendevelopment.html • Landing Zone blogs: – wirfs-brock.com/blog/2011/07/20/introducing-landing-zones/ – wirfs-brock.com/blog/2011/08/16/who-defines-or-redefines- landing-zone-criteria/ – wirfs-brock.com/blog/2011/08/05/landing-zone-targets-precision- specificity-and-wiggle-room/ • Introducing Pragmatic TDD: – wirfs-brock.com/blog/2011/09/23/what-is-pragmatic-testing-all-about/ – http://adaptiveobjectmodel.com/2012/01/what-is-pragmatic-tdd/