Fundamentals of Software Testing - Chapter 1
Document Details

Uploaded by LovedEnjambment
Zarqa University
Tags
Summary
This document provides an introduction to the fundamentals of software testing. It covers software testing definitions, the difference between errors, faults, and failures, and discusses key testing principles. It also covers different phase of testing, and what goes into a good test case.
Full Transcript
Chapter 1: Fundamentals Of Software Testing 1 Software Testing definition â–ª Software Testing is the process of exercising or evaluating a system or system component by manual or automated means to verify that it satisfies specified requirements o...
Chapter 1: Fundamentals Of Software Testing 1 Software Testing definition ▪ Software Testing is the process of exercising or evaluating a system or system component by manual or automated means to verify that it satisfies specified requirements or to identify differences between expected and actual results. 2 Error, Fault and Failure… ▪ An Error occurs in the process of writing a program. ▪ A fault is the manifestation of one or more errors. The fault is also known as bug and defect. 3 ▪ A failure occurs when a faulty piece of code is Some Testing Principles ▪ Testing starts during the requirements phase. ▪ Program testing can be used to show the presence of Errors, but never their absence. ▪ The programmer shall not be the tester. ▪ A test cycle is often guided by a test plan. 4 We need professional testers(1) ▪ Developers can’t find their own defects….Why? ▪ Because: ▫ They have no motivation for testing. ▫ They have no skills for testing. ▫ They have no time for testing. 5 We need professional testers(2) ▪ Testers have the tester’s mindset: 1. Goal is to find Errors, Faults and Failures 2. Get the Errors fixed together with developers. 3. Testers are independent verifiers; they can test the software from the customer’s or user’s viewpoint. 4. Testers have the skills, tools, and experience. 6 Levels or Phases of Testing during Development Integration Component Unit Testing Testing Testing User System Integration Acceptance Testing Testing Testing 7 User Based Testing ▪ Alpha: actual end-user testing performed within the development environment. ▪ Beta: end-user testing performed within the user environment prior to general release. ▪ Acceptance: formal testing conducted to enable the customer to determine whether or not to accept the system (acceptance criteria may be defined in a contract) 8 Other Types of Testing During Maintenance ▪ Regression: testing to detect problems caused by the adverse effects of program change. 9 Test Oracle and Test Bed ▪ Test Oracle: is a document, or a piece of SW that allows testers to determine whether a test has been passed or failed. ▪ Test Bed: is an environment that contains all the HW and SW needed to test a software component or SW system as simulators, emulators memory checkers, hardware probes, SW tools, and all other needed items to support execution of the tests. 10 Static Testing ▪ Static testing is a technique in which the software is tested without executing the code. It has two parts as listed below: ▪ Review - Typically used to find and eliminate errors or ambiguities in documents such as requirements, design, test cases, etc. ▫ Walkthrough ▫ Inspections ▪ Static analysis - The code written by developers are analysed (usually by tools) for structural defects 11 that may lead to defects. Test case/data ▪ A test case is a pair consisting of test data to be input to the program and the expected output. The test data is a set of values, one for each input variable. ▪ Test cases must be written for invalid and unexpected, as well as valid and expected, input conditions. ▪ A test set is a collection of zero or more test cases. ▫ Sample test case for sort: ▫ Test data: