Three General Principles of QA. COMP 4004 Fall Notes Adapted from Dr. A. Williams

Similar documents
INTRODUCTION TO SOFTWARE ENGINEERING

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Topics in Software Testing

10. Software Testing Fundamental Concepts

Part 5. Verification and Validation

Software Testing. An Overview

Lecture 15 Software Testing

Software Testing Interview Question and Answer

Verification and Validation. Assuring that a software system meets a user s needs. Verification vs Validation. The V & V Process

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

CS 424 Software Quality Assurance & Testing LECTURE 3 BASIC CONCEPTS OF SOFTWARE TESTING - I

Verification and Validation

Verification and Validation

Bridge Course On Software Testing

Chap 2. Introduction to Software Testing

Lecture 20: SW Testing Presented by: Mohammad El-Ramly, PhD

Chapter 8 Software Testing. Chapter 8 Software testing

Why testing and analysis. Software Testing. A framework for software testing. Outline. Software Qualities. Dependability Properties

Software Quality Assurance (SQA) Software Quality Assurance

Software Testing. Software Testing

Sample Question Paper. Software Testing (ETIT 414)

In this Lecture you will Learn: Testing in Software Development Process. What is Software Testing. Static Testing vs.

TestTrack Test Case Management Quick Start Guide

Objectives. Chapter 19. Verification vs. validation. Topics covered. Static and dynamic verification. The V&V process

Sample Exam. Certified Tester Foundation Level

Verification and Validation

Verification and Validation

Examination Questions Time allowed: 1 hour 15 minutes

Chapter 9 Quality and Change Management

Helix Test Case Management Best Practices

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages

Pearson Education 2007 Chapter 9 (RASD 3/e)

Verification and Validation. Verification and validation

Software Testing CS 408

Quote by Bruce Sterling, from: A Software Testing Primer, Nick Jenkins

Software Testing and Maintenance

MONIKA HEINER.

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

Computer Science and Software Engineering University of Wisconsin - Platteville 9-Software Testing, Verification and Validation

Utilizing Fast Testing to Transform Java Development into an Agile, Quick Release, Low Risk Process

Topic: Software Verification, Validation and Testing Software Engineering. Faculty of Computing Universiti Teknologi Malaysia

Overview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing.

Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 22 Slide 1

Software Quality Assurance. David Janzen

Manuel Oriol, CHCRC-C, Software Testing ABB

CSE 403: Software Engineering, Fall courses.cs.washington.edu/courses/cse403/16au/ Unit Testing. Emina Torlak

Software Testing. Software Testing. in the textbook. Chapter 8. Verification and Validation. Verification and Validation: Goals

Chapter 10. Testing and Quality Assurance

EECS 4313 Software Engineering Testing. Topic 01: Limits and objectives of software testing Zhen Ming (Jack) Jiang

Certified Tester Foundation Level(CTFL)

CMSC 132: OBJECT-ORIENTED PROGRAMMING II

The Importance of Test

Testing Process and Methods. CS 490MT/5555, Spring 2017, Yongjie Zheng

Digitized Engineering Notebook

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

An Introduction to Systematic Software Testing. Robert France CSU

Software Engineering and Scientific Computing

Testing. ECE/CS 5780/6780: Embedded System Design. Why is testing so hard? Why do testing?

Software Testing. Massimo Felici IF

Higher-order Testing. Stuart Anderson. Stuart Anderson Higher-order Testing c 2011

Client-server application testing plan

Software Quality Assurance & Testing

Chapter 9. Software Testing

Software Testing MANUAL TESTING. Introduction to Testing. Software Quality Software Testing Definition. Different Life Cycle Models Waterfall Model

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Assuring Certainty through Effective Regression Testing. Vishvesh Arumugam

ECE 587 Hardware/Software Co-Design Lecture 11 Verification I

Background Project Purpose & Goals. SW Reliability Statistical Testing Model Based Specification and Testing

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 11/10/2015

Static and dynamic Testing

Introduction To Software Testing. Brian Nielsen. Center of Embedded Software Systems Aalborg University, Denmark CSS

Test Results. Generation Java. ID-10t Consultations. Assistant Professor Department of Computer Science Siena College

Testing. Prof. Clarkson Fall Today s music: Wrecking Ball by Miley Cyrus

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends!

Software Testing. Overview

Software Engineering Fall 2014

It is primarily checking of the code and/or manually reviewing the code or document to find errors This type of testing can be used by the developer

Introduction to Dynamic Analysis

Question 1: What is a code walk-through, and how is it performed?

Lesson 4: Bug Reporting and STLC

(See related materials in textbook.) CSE 435: Software Engineering (slides adapted from Ghezzi et al & Stirewalt

Advanced Software Engineering: Software Testing

Chapter 11, Testing. Using UML, Patterns, and Java. Object-Oriented Software Engineering

Automated Acceptance Testing

(Complete Package) We are ready to serve Latest Testing Trends, Are you ready to learn? New Batches Info

Aerospace Software Engineering

Outline. software testing: search bugs black-box and white-box testing static and dynamic testing

Software Testing. Software Testing. in the textbook. Chapter 8. Verification and Validation. Verification Techniques

Software Testing 2. OOD and Testability. White box vs Black box Testing. Software Testing 2 Semester 1, 2006

1 Visible deviation from the specification or expected behavior for end-user is called: a) an error b) a fault c) a failure d) a defect e) a mistake

(From Glenford Myers: The Art of Software Testing)

Program Analysis. Program Analysis

Why test automation projects are failing? Igor Khrol

QUIZ #5 - Solutions (5pts each)

SOFTWARE ENGINEERING SOFTWARE VERIFICATION AND VALIDATION. Saulius Ragaišis.

The requirements engineering process

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Object-Oriented and Classical Software Engineering

Object-Oriented and Classical Software Engineering

SFWR ENG 3S03: Software Testing

Transcription:

Three General Principles of QA COMP 4004 Fall 2008 Notes Adapted from Dr. A. Williams Software Quality Assurance Lec2 1 Three General Principles of QA Know what you are doing. Know what you should be doing. Know how to measure the difference. Software Quality Assurance Lec2 2

Three General Principles of QA Know what you are doing Understand what is being built, how it is being built and what it currently does. Follow a software development process with Management structure (milestones, scheduling) Reporting policies Tracking Software Quality Assurance Lec2 3 Three General Principles of QA Know what you should be doing: Having explicit requirements and specifications. Follow a software development process with Requirements analysis, Acceptance tests, Frequent user feedback. Software Quality Assurance Lec2 4

Three General Principles of QA Know how to measure the difference. Having explicit measures comparing what is being done from what should be done. Four complementary methods: Formal methods verify mathematically specified properties. Testing explicit input to exercise software and check for expected output. Inspections human examination of requirements, design, code,... based on checklists. Metrics measures a known set of properties related to quality Software Quality Assurance Lec2 5 Verification and Validation Verification: Are we building the product right? Performed at the end of a phase to ensure that requirements established during previous phase have been met. Validation: Are we building the right product? Performed at the end of the development process to ensure compliance with product requirements. Requirements Architecting Detailed Design Coding validation verification verification verification verification Software Quality Assurance Lec2 6

What is Software testing? Examination of a software unit, several integrated software units or an entire software package by running it. execution based on test cases expectation reveal faults as failures Failure: incorrect execution of the system usually consequence of a fault / defect Fault/defect/bug result of a human error Software Quality Assurance Lec2 7 Objectives of testing To find defects before they cause a production system to fail. To bring the tested software, after correction of the identified defects and retesting, to an acceptable level of quality. To perform the required tests efficiently and effectively, within the limits of budgetary and scheduling constraints. To compile a record of software errors for use in error prevention (by corrective and preventive actions), and for process tracking. Software Quality Assurance Lec2 8

When does a fault occur? Software doesn't do something that the specification says it should do. Software does something that the specification says it shouldn't do. Software does something that the specification doesn't mention. Software doesn't do something that the specification doesn't mention but should. Software is difficult to understand, hard to use, slow, or in the software tester's eyes will be viewed by the end user as just plain not right. Software Quality Assurance Lec2 9 Testing Axioms It is impossible to test a program completely. large input space large output space large state space large number of possible execution paths subjectivity of specifications Software Quality Assurance Lec2 10

Testing Axioms Large Input/State space int exfunction(int x, int y) {... } Exhaustive testing trying all possible combinations of x and y Range for just one int in Java: Integer.MIN_VALUE to Integer.MAX_VALUE; that is: 4,294,967,295 different possibilities The range is not infinite but it is very, very large. Combinations of 2 int variables: square of the above. Software Quality Assurance Lec2 11 Testing Axioms Large number of possible execution paths: for (int i = 0; i < n; i++) { if (a.get(i) == b.get(i)) { // do something } else { // do something else } } Number of potential execution paths is 2 n If n = 40, the number of paths could be 1,099,511,627,776 Software Quality Assurance Lec2 12

Testing Axioms Upper limit to total number of tests (Binder) 2 n ( L 1... L m ) ( V 1... V k ) where: n : number of decisions L i : number of times a decision can loop m : number of decisions that cause loops V i : number of all the possible values each input variable could have k : number of input variables. Software Quality Assurance Lec2 13 Testing Axioms Software testing is a risk-based exercise Need to balance cost and risk of missing bugs Testing cannot prove the absence of bugs The more bugs you find, the more bugs there are The pesticide paradox A system tends to build resistance to a particular testing technique. Software Quality Assurance Lec2 14

Testing Axioms Not all bugs found are fixed. Difficult to say when a bug is a bug. only when observed (latent otherwise) Product specifications are never final. Software testers sometimes aren't the most popular members of a project team. Software testing is a disciplined technical profession that requires training. Software Quality Assurance Lec2 15 What Testing can accomplish Reveal faults that would be too costly or impossible to find using other techniques Show the system complies with its stated requirements for a given test suite Testing is made easier and more effective by good software engineering practices Software Quality Assurance Lec2 16

Risk Risk is the probability of an observed failure, multiplied by the potential cost (usually, estimated) of the failure. Example: Dropping one regular phone call: low probability, low potential cost (customer hits redial) Dropping a 911 emergency call: low probability, high potential cost (lives) Software Quality Assurance Lec2 17 Risk-based testing Choosing what to test is often influenced by risk. What are the probabilities that the following were implemented incorrectly...? A typical scenario Exceptional scenarios Empirically, the probability of a defect is much higher in the code for exceptional scenarios, and testing resources are often directed towards them. Keep the cost factor of risk in mind as well. Software Quality Assurance Lec2 18

Types of testing Unit testing Black box testing based on specification White box testing based on implementation s structure Grey box testing based on design model Integration testing System testing - includes Function testing Performance testing Acceptance testing Alpha testing Beta testing Regression testing Software Quality Assurance Lec2 19 Testing is a Process Planning Design Implementation Execution Reporting Information Management Planning Scope, resources, schedules Architecture, tools needed Design Test selection Coverage goals Implementation Creation of (automated?) test scripts Execution Running the tests Reporting Problem reports Progress tracking Coverage measurement Information management (ongoing through process) Change control of artifacts Software Quality Assurance Lec2 20 Archive of test results

Terminology Warning: many organizations, tools, or standards use inconsistent terminology. Stimulus: an action / request / command sent to a system under test. Response: something that can be observed from a system under test. Test case: a sequence of stimuli and expected responses with a specified purpose and decisive result. Test script: a test case as a set of instructions, for either manual or automated execution. Test suite: a collection of related test cases. Verdict: the decision as to the result of a test case. Software Quality Assurance Lec2 21 Testing basics What do we need to do testing? Test script Stimuli to send to system under test (SUT). Responses expected from SUT. When / how to determine the test verdict? i.e. What are the decision points, and how is the decision made? For an automated test execution system, additional requirements are: Test controller, to manage execution. Mechanism to read test script, and connect test case to SUT. Software Quality Assurance Lec2 22

Verdicts Running a test results in a verdict at one or more decision points in a test case. Pass: The expected responses were observed in the proper sequence with the proper timing, and no other anomalies were observed. Fail: One or more of the expected responses were not observed. Inconclusive / Error: Anomalies were observed, or the purpose of the test could not be achieved. Example: the test could not be set up properly. Conf (used infrequently; from conforms ): An response was received that is correct in terms of content, but outside of the correct time window. Software Quality Assurance Lec2 23 Test Architecture (1) Includes defining the set of Points of Control and Observation (PCOs) Tester or automated tool Test script PCOs... System under test A PCO could be a device or user interface a particular method to call a network port etc. Software Quality Assurance Lec2 24

Test Architecture (2) The test architecture will affect the test script because it may be significant as to which PCO is used for a stimulus or response. Tester or Test tool Tester or Test tool m m PCO SUT PCO 1 PCO 2 SUT Software Quality Assurance Lec2 25 Distributed Test Architecture (1) May require several local test controllers and a master test controller Master Test controller Local Test controller PCO SUT Component 1 Local Test controller PCO SUT Component 2 Software Quality Assurance Lec2 26

Distributed Test Architecture (2) Issues with distributed testing: Synchronization Where are pass/fail decisions made? Communication among test controllers Software Quality Assurance Lec2 27 Choosing a test architecture User Browser Web Server Data base mouse clicks / keyboard HTTP SQL Software Quality Assurance Lec2 28

Choosing a Test Architecture Testing from the user s point of view: Need a test tool to simulate mouse movement and click events, or keyboard input Need to be able to recognize correct web pages Small web page changes might require large changes to test scripts. Testing without the browser: Test script would send HTTP commands to web server, and check HTTP messages that are returned. Easier to do, but not quite as realistic. Software Quality Assurance Lec2 29 Test Results Documenting of test results is a crucial element of testing. When was a test suite run (day, time, etc.)? What is the summary count of each type of verdict? What are the specific verdicts for each test case? Software Quality Assurance Lec2 30

Test Scripts What should the format of a test script be? natural language? (for manual testing) tool dependent? a standard test language? a programming language? Software Quality Assurance Lec2 31 Test Script Development Creating test scripts follows a parallel development process, including: Requirements Design Debugging Configuration management Maintenance Documentation Result: they are expensive to create and maintain, especially for automated test execution. Software Quality Assurance Lec2 32