Test Specifications. Test specification: example. Test Plans. Test plan: example. Test plan: goals. Quality Assurance: Test Development & Execution

Similar documents
Key Points. Quality Assurance and Testing. Defect Process. Developer Practice

Quality Assurance: Early Work Items

Introduction to Automated Testing

Levels of Software Testing. Functional Testing

Software Testing. Knowledge Base. Rajat Kumar Bal. Introduction

Smarter Balanced Assessment Consortium. Recommendation

Peach Fuzzer Platform

The ROI of Test Automation

FSW QA Testing Levels Definitions

Lecture 17: Testing Strategies" Developer Testing"

Software testing. Objectives

Getting Things Done: Practical Web/e-Commerce Application Stress Testing

What s the status of testing? What are you doing today? When will you be finished? Why is it taking so long? Have you tested, yet?

Formal Software Testing. Terri Grenda, CSTE IV&V Testing Solutions, LLC

Fundamentals of Measurements


ISTQB Certified Tester. Foundation Level. Sample Exam 1

Automating Security Testing. Mark Fallon Senior Release Manager Oracle

Bringing Value to the Organization with Performance Testing

Software Testing, Mythology & Methodologies

Agile Test Automation. James Bach, Satisfice, Inc.

Co-Presented by Mr. Bill Rinko-Gay and Dr. Constantin Stanca 9/28/2011

Successful Scalability Principles - Part 1

Getting started with API testing

Tonight s Speaker. Life of a Tester at Microsoft Urvashi Tyagi Software Test Manager, Microsoft

Essential Visual Studio Team System

Agile Development and Testing Practices highlighted by the case studies as being particularly valuable from a software quality perspective

SECTION 4 TESTING & QUALITY CONTROL

Secure Software Programming and Vulnerability Analysis

Basic Testing Concepts and Terminology

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

A Brief Overview of Software Testing Techniques and Metrics

Assertion Synthesis Enabling Assertion-Based Verification For Simulation, Formal and Emulation Flows

Your guide to DevOps. Bring developers, IT, and the latest tools together to create a smarter, leaner, more successful coding machine

Linux Kernel. Security Report

What Is Specific in Load Testing?

Testing Introduction. IEEE Definitions

An Introduction to. Metrics. used during. Software Development

Software Testing Tutorial

MIMIC Simulator helps testing of Business Service Management Products

Business Application Services Testing

SA Tool Kit release life cycle

ETL-EXTRACT, TRANSFORM & LOAD TESTING

Software Implementation Technology report

Winning the Battle against Automated Testing. Elena Laskavaia March 2016

How To Test For Performance

The Advantages of Block-Based Protocol Analysis for Security Testing

Improved Software Testing Using McCabe IQ Coverage Analysis

Fuzzing in Microsoft and FuzzGuru framework

STUDY AND ANALYSIS OF AUTOMATION TESTING TECHNIQUES

4. Test Design Techniques

Test What You ve Built

Guideline for stresstest Page 1 of 6. Stress test

Security Testing & Load Testing for Online Document Management system

Software Test Plan (STP) Template

R214 SPECIFIC REQUIREMENTS: INFORMATION TECHNOLOGY TESTING LABORATORY ACCREDITATION PROGRAM

Recommendations for Performance Benchmarking

User Migration Tool. Note. Staging Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted Release 9.0(1) 1

A Comprehensive Approach to Master Data Management Testing

List of some usual things to test in an application

Basic Unix/Linux 1. Software Testing Interview Prep

TRACE PERFORMANCE TESTING APPROACH. Overview. Approach. Flow. Attributes

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Cloud Computing WHAT IS CLOUD COMPUTING? 2

Product Review: James F. Koopmann Pine Horse, Inc. Quest Software s Foglight Performance Analysis for Oracle


Scalable Web Programming. CS193S - Jan Jannink - 1/12/10

How To Improve Software Quality

Pattern Insight Clone Detection

Use service virtualization to remove testing bottlenecks

Zend Server 4.0 Beta 2 Release Announcement What s new in Zend Server 4.0 Beta 2 Updates and Improvements Resolved Issues Installation Issues

White Paper. Java versus Ruby Frameworks in Practice STATE OF THE ART SOFTWARE DEVELOPMENT 1

Lessons Learned in Software Testing

<Insert Picture Here> When to Automate Your Testing (and When Not To)

Application security testing: Protecting your application and data

Presentation: 1.1 Introduction to Software Testing

MOBILE METRICS REPORT

Static vs. Dynamic Testing How Static Analysis and Run-Time Testing Can Work Together. Outline

Quality Assurance - Karthik

Software Testing Interview Questions

Splunk for VMware Virtualization. Marco Bizzantino Vmug - 05/10/2011

Software Testing. System, Acceptance and Regression Testing

Blind Security Testing

Outline. 1 Denitions. 2 Principles. 4 Implementation and Evaluation. 5 Debugging. 6 References

Defining Quality Workbook. <Program/Project/Work Name> Quality Definition

The Association of System Performance Professionals

Design for Testability experiences from the DVD domain

iscripts Top 10 challenges to consider before testing SaaS based applications

Recruiting, motivating and energizing superior test engineers

THE WINDOWS AZURE PROGRAMMING MODEL

11/1/2013. Championing test automation at a new team: The challenges and benefits. Alan PNSQC About you?

Panorama NovaView. Load Balancing Installation Guide

Test Automation Framework

Methods of software quality assurance. Daniel Osielczak Sebastian Mianowski

Taking the First Steps in. Web Load Testing. Telerik

Network and Host-based Vulnerability Assessment

Static Code Analysis Procedures in the Development Cycle

the first thing that comes to mind when you think about unit testing? If you re a Java developer, it s probably JUnit, since the

TEST AUTOMATION FRAMEWORK

Project Planning. COSC345 Lecture 3 Slides: Andrew Trotman Dramatic presentation: Richard O Keefe. Software Engineering 2013

Assurance in Service-Oriented Environments

Transcription:

Quality Assurance: Test Development & Execution CSE 403 Lecture 23 Slides derived from a talk by Ian King Test Specifications What questions do I want to answer about this code? Think of this as experiment design In what dimensions will I ask these questions? Functionality Security Reliability Performance Scalability Manageability Test specification: example CreateFile method Should return valid, unique handle for initial open for appropriate resource subsequent calls for shareable resource for files, should create file if it doesn t exist Should return NULL handle and set error indicator if resource is nonexistent device inappropriate for open action in use and not shareable unavailable because of error condition (e.g. no disk space) Must recognize valid forms of resource name Filename, device,? Test Plans How will I ask my questions? Think of this as the Methods section Understand domain and range Establish equivalence classes Address domain classes Valid cases Invalid cases Boundary conditions Error conditions Fault tolerance/stress/performance Test plan: goals Enables development of tests Proof of testability if you can t design it, you can t do it Review: what did you miss? Test plan: example CreateFile method Valid cases execute for each resource supporting open action opening existing device opening existing file opening (creating) nonexistent file execute for each such resource that supports sharing multiple method calls in separate threads/processes multiple method calls in single thread/process Invalid cases nonexistent device file path does not exist in use and not shareable Error cases insufficient disk space invalid form of name permissions violation Boundary cases e.g. execute to/past system limit on open device handles device name at/past name length limit (MAXPATH) Fault tolerance execute on failed/corrupted filesystem execute on failed but present device 1

Performance testing Test for performance behavior Does it meet requirements? Customer requirements Definitional requirements (e.g. Ethernet) Test for resource utilization Understand resource requirements Test performance early Avoid costly redesign to meet performance requirements Security Testing Is data/access safe from those who should not have it? Is data/access available to those who should have it? How is privilege granted/revoked? Is the system safe from unauthorized control? Example: denial of service Collateral data that compromises security Example: network topology Stress testing Working stress: sustained operation at or near maximum capability Goal: resource leak detection Breaking stress: operation beyond expected maximum capability Goal: understand failure scenario(s) Failing safe vs. unrecoverable failure or data loss Globalization Localization UI in the customer s language German overruns the buffers Japanese tests extended character sets Globalization Data in the customer s language Non-US values ($ vs. Euro, ips vs. cgs) Mars Global Surveyor: mixed metric and SAE Test Cases Actual how to for individual tests Expected results One level deeper than the Test Plan Automated or manual? Environmental/platform variables Test case: example CreateFile method Valid cases English open existing disk file with arbitrary name and full path, file permissions allowing access create directory c:\foo copy file bar to directory c:\foo from test server; permissions are Everyone: full access execute CreateFile( c:foo\bar, etc.) expected: non-null handle returned 2

Test Harness/Architecture Test automation is nearly always worth the time and expense How to automate? Commercial harnesses Roll-your-own Record/replay tools Scripted harness Logging/Evaluation Test Schedule Phases of testing Unit testing (may be done by developers) Component testing Integration testing System testing Dependencies when are features ready? Use of stubs and harnesses When are tests ready? Automation requires lead time The long pole how long does a test pass take? Where The Wild Things Are: Challenges and Pitfalls Everyone knows hallway design We won t know until we get there I don t have time to write docs Feature creep/design bugs Dependency on external groups Test Schedule Phases of testing Unit testing (may be done by developers) Component testing Integration testing System testing Usability testing What makes a good tester? Analytical Ask the right questions Develop experiments to get answers Methodical Follow experimental procedures precisely Document observed behaviors, their precursors and environment Brutally honest You can t argue with the data How do test engineers fail? Desire to make it work Impartial judge, not handyman Trust in opinion or expertise Trust no one the truth (data) is in there Failure to follow defined test procedure How did we get here? Failure to document the data Failure to believe the data 3

Testability Can all of the feature s code paths be exercised through APIs, events/messages, etc.? Unreachable internal states Can the feature s behavior be programmatically verified? Is the feature too complex to test? Consider configurations, locales, etc. Can the feature be tested timely with available resources? Long test latency = late discovery of faults What color is your box? Black box testing Treats the SUT as atomic Study the gazinta s and gozouta s Best simulates the customer experience White box testing Examine the SUT internals Trace data flow directly (in the debugger) Bug report contains more detail on source of defect May obscure timing problems (race conditions) Designing Good Tests Well-defined inputs and outputs Consider environment as inputs Consider side effects as outputs Clearly defined initial conditions Clearly described expected behavior Specific small granularity provides greater precision in analysis Test must be at least as verifiable as SUT Types of Test Cases Valid cases What should work? Invalid cases Ariane V data conversion error (http://www.cs.york.ac.uk/hise/safety-criticalarchive/1996/0055.html) Boundary conditions Fails in September? Null input Error conditions Distinct from invalid input Manual Testing Definition: test that requires direct human intervention with SUT Necessary when: GUI is present Behavior is premised on physical activity (e.g. card insertion) Advisable when: Automation is more complex than SUT SUT is changing rapidly (early development) Automated Testing Good: replaces manual testing Better: performs tests difficult for manual testing (e.g. timing related issues) Best: enables other types of testing (regression, perf, stress, lifetime) Risks: Time investment to write automated tests Tests may need to change when features change 4

Types of Automation Tools: Record/Playback Record proper run through test procedure (inputs and outputs) Play back inputs, compare outputs with recorded values Advantage: requires little expertise Disadvantage: little flexibility - easily invalidated by product change Disadvantage: update requires manual involvement Types of Automation Tools: Scripted Record/Playback Fundamentally same as simple record/playback Record of inputs/outputs during manual test input is converted to script Advantage: existing tests can be maintained as programs Disadvantage: requires more expertise Disadvantage: fundamental changes can ripple through MANY scripts Types of Automation Tools: Script Harness Tests are programmed as modules, then run by harness Harness provides control and reporting Advantage: tests can be very flexible Disadvantage: requires considerable expertise and abstract process Test Corpus Body of data that generates known results Can be obtained from Real world demonstrates customer experience Test generator more deterministic Caveats Bias in data generation Don t share test corpus with developers! Instrumented Code: Test Hooks Code that enables non-invasive testing Code remains in shipping product May be enabled through Special API Special argument or argument value Registry value or environment variable Example: Windows CE IOCTLs Risk: silly customers. Instrumented Code: Diagnostic Compilers Creates instrumented SUT for testing Profiling where does the time go? Code coverage what code was touched? Really evaluates testing, NOT code quality Syntax/coding style discover bad coding lint, the original syntax checker Complexity Very esoteric, often disputed (religiously) Example: function point counting 5

Instrumented platforms Example: App Verifier Supports shims to instrument standard system calls such as memory allocation Tracks all activity, reports errors such as unreclaimed allocations, multiple frees, use of freed memory, etc. Win32 includes hooks for platform instrumentation Environment Management Tools Predictably simulate real-world situations MemHog DiskHog Data Channel Simulator Test Monkeys Generate random input, watch for crash or hang Typically, hooks UI through message queue Primarily to catch local minima in state space (logic dead ends ) Useless unless state at time of failure is well preserved! Finding and Managing Bugs What is a bug? Formally, a software defect SUT fails to perform to spec SUT causes something else to fail SUT functions, but does not satisfy usability criteria If the SUT works to spec and someone wants it changed, that s a feature request What are the contents of a bug report? Repro steps how did you cause the failure? Observed result what did it do? Expected result what should it have done? Any collateral information: return values/output, debugger, etc. Environment Test platforms must be reproducible It doesn t do it on my machine 6

Ranking bugs A Bug s Life Severity Sev 1: crash, hang, data loss Sev 2: blocks feature, no workaround Sev 3: blocks feature, workaround available Sev 4: trivial (e.g. cosmetic) Priority Pri 1: Fix immediately Pri 2: Fix before next release outside team Pri 3: Fix before ship Pri 4: Fix if nothing better to do Regression Testing Good: rerun the test that failed Or write a test for what you missed Better: rerun related tests (e.g. component level) Best: rerun all product tests Automation can make this feasible! Tracking Bugs Raw bug count Slope is useful predictor Ratio by ranking How bad are the bugs we re finding? Find rate vs. fix rate One step forward, two back? Management choices Load balancing Review of development quality When can I ship? Test coverage sufficient Bug slope, find vs. fix lead to convergence Severity mix is primarily low-sev Priority mix is primarily low-pri Milestones Feature complete All features are present Code complete Coding is done, except for the bugs Code Freeze No more coding Release Candidate I think it s ready to ship It s out the door 7

BUGs vs. Time Feature Complete Code Complete Code Freeze Release Candidate 8