Software Testing Fundamentals

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which activity accurately describes software testing?

  • Exercising or evaluating a system using manual or automated means to verify it satisfies specified requirements and to identify differences between expected and actual results. (correct)
  • Evaluating a system manually to ensure customer satisfaction.
  • Exercising a system component to identify all possible errors.
  • Executing or evaluating a system component using automated means.

In the context of software development, how do 'error', 'fault', and 'failure' relate to each other?

  • A failure leads to a fault, which results from an error.
  • A fault is triggered by a failure, which is caused by an error.
  • An error is the manifestation of a failure, which causes a fault.
  • An error leads to a fault, which can then cause a failure. (correct)

Which of the following statements is a valid principle of software testing?

  • Testers and programmers should always be the same person to ensure efficient debugging.
  • Testing should begin during the requirements phase of software development. (correct)
  • A test cycle is never guided by a test plan to allow for flexibility.
  • Testing can prove the absence of errors in a program.

Why is it generally recommended to have professional testers instead of relying solely on developers to test their own code?

<p>Testers have a different mindset, focusing on finding errors, faults, and failures, and can test the software from a user's perspective. (D)</p>
Signup and view all the answers

What characterizes static testing?

<p>Analyzing the software without executing the code, including reviews and inspections. (A)</p>
Signup and view all the answers

Which of the following describes a 'test oracle'?

<p>A document or piece of software that allows testers to determine whether a test has been passed or failed. (C)</p>
Signup and view all the answers

What best describes a 'test bed'?

<p>An environment that contains all the hardware and software needed to test a software component or system. (B)</p>
Signup and view all the answers

In which testing phase is actual end-user testing performed within the user environment prior to general release?

<p>Beta testing (C)</p>
Signup and view all the answers

What is the primary purpose of regression testing?

<p>To detect problems caused by the adverse effects of program changes. (C)</p>
Signup and view all the answers

Which of these is the best description of a test case?

<p>A pair consisting of test data to be input to the program and the expected output. (D)</p>
Signup and view all the answers

Besides expected input, what other types of input should test cases include?

<p>Test cases must be written for invalid and unexpected, as well as valid and expected, input conditions. (D)</p>
Signup and view all the answers

Which of the following is NOT an element of a test case?

<p>The name of the tester. (A)</p>
Signup and view all the answers

What determines the 'PASS' or 'FAIL' result of a test case?

<p>Whether the actual result equals the expected result. (D)</p>
Signup and view all the answers

Which principle should guide the generation of test cases?

<p>Every test should check whether some customer requirement is properly satisfied. (C)</p>
Signup and view all the answers

A program is designed to determine the type of triangle based on three integer inputs representing the lengths of its sides. If the inputs trigger a 'Not a triangle' output, what input values could cause this?

<p>A=0, B=4, C=5 (A)</p>
Signup and view all the answers

You have a requirement to write a program that inputs two integers and outputs the maximum of these. What defines the input domain for this program?

<p>The set of all pairs of integers within a specified range. (B)</p>
Signup and view all the answers

A program is required to sort a sequence of integers. Which factor makes it difficult or impossible to define the input domain?

<p>The number of integers in the sequence is not defined. (C)</p>
Signup and view all the answers

What is the purpose of Acceptance Testing?

<p>To enable the customer to determine whether or not to accept the system. (B)</p>
Signup and view all the answers

What is the primary focus of Static Analysis?

<p>To analyze code written by developers for structural defects. (A)</p>
Signup and view all the answers

What is the main purpose of Integration Testing?

<p>Testing communication between components. (B)</p>
Signup and view all the answers

Flashcards

Software Testing

The process of exercising or evaluating a system to verify that it satisfies specified requirements and to identify differences between expected and actual results.

Error

An action in the process of writing a program that produces an incorrect result.

Fault (Bug/Defect)

The manifestation of one or more errors in the code. It is also known as a bug or defect.

Failure

Occurs when a faulty piece of code is executed, leading to an incorrect result or behavior of the system.

Signup and view all the flashcards

Alpha Testing

Testing that is performed within the development environment by end-users.

Signup and view all the flashcards

Beta Testing

Testing performed in the user environment prior to the general release of the software.

Signup and view all the flashcards

Acceptance Testing

Formal testing conducted to determine whether the customer will accept the system.

Signup and view all the flashcards

Regression Testing

Testing that detects problems caused by the adverse effects of program change.

Signup and view all the flashcards

Test Oracle

A document or piece of software that allows testers to determine whether a test has passed or failed.

Signup and view all the flashcards

Test Bed

An environment that contains all the hardware and software needed to test a software component or system.

Signup and view all the flashcards

Static Testing

A technique to evaluate software without executing the code; typically involves reviews and static analysis.

Signup and view all the flashcards

Review (in testing)

A technique to find and eliminate errors or ambiguities in documents such as requirements, design, and test cases.

Signup and view all the flashcards

Static Analysis

The code is analysed (usually by tools) for structural defects that may lead to defects.

Signup and view all the flashcards

Test Case

A pair consisting of test data to be input to the program and the expected output.

Signup and view all the flashcards

Test Set

A collection of zero or more test cases.

Signup and view all the flashcards

Test Inputs

A set of test inputs received by the code under test from an external resource.

Signup and view all the flashcards

Execution Conditions

Conditions required for running the test, such as a specific state of a database or configuration of a hardware device.

Signup and view all the flashcards

Expected Output

The specified results that are expected to be produced by the code under test in a test case.

Signup and view all the flashcards

Test case goal

Check customer needs

Signup and view all the flashcards

Input domain

The set of all possible inputs to a program.

Signup and view all the flashcards

Study Notes

Fundamentals of Software Testing

  • Software Testing is evaluating a system or component through manual or automated methods.
  • The goal is to verify that the system meets specified requirements.
  • It also identifies differences between expected and actual results.

Errors, Faults, and Failures

  • An Error occurs during the process of writing a program.
  • A fault is a manifestation of one or more errors, also known as a bug or defect.
  • A failure occurs when faulty code is executed during operation.

Testing Principles

  • Testing should start during the requirements phase.
  • Program testing can reveal the presence of errors but never prove their absence.
  • The programmer should not be the tester.
  • A test cycle is guided by a test plan.

Professional Testers

  • Developers often cannot find their own defects due to lack of motivation, skills, or time.
  • Testers aim to find errors, faults, and failures, and work with developers to fix them.
  • Testers can assess software from a customer's or user's perspective.
  • Testers possess specific skills, tools, and experience.

Levels/Phases of testing during Development

  • Testing types are: Unit, Integration, Component, System, User Acceptance and Regression.

User-Based Testing

  • Alpha testing occurs with actual end-users within the development environment.
  • Beta testing occurs with end-users in their environment before a general release.
  • Acceptance testing is formal testing to allow customers to determine whether to accept the system, this can be defined within a contract.

Other Types of Testing

  • Regression testing detects problems in code caused by program changes.

Test Oracle & Test Bed

  • A test oracle is a document or software to allow testers to determine whether a test passed or failed.
  • A test bed is an environment with all the hardware/software to test a software component or system.
  • The test bed includes simulators, emulators, memory checkers, hardware probes, and test tools.

Static Testing

  • Static testing involves evaluating software without executing code.
  • Reviews are used to find and eliminate errors or ambiguities in design, requirement, and test case documents.
  • Reviews include walkthroughs and inspections.
  • Static analysis uses tools to analyze code for structural defects that could lead to defects.

Test Cases

  • In Test case data, a single test case includes both test data and the predicted output.
  • Test cases should cover both valid/expected and invalid/unexpected input conditions.
  • A test set is a collection of zero or more test cases.
  • As an example of sorting, if the test data were "A 12 -29 32", the expected output is "-29 12 32".
  • A test case includes: Test inputs, conditions, expected outputs, and related test procedures.

Sample Test Case

  • The Actual output gets compared to the expected output.
  • If the actual result matches the Expected Result: PASS.
  • If the actual result is different to the Expected Result: FAIL.

Nature of Test Cases

  • Each test should verify that a requirement is satisfied.
  • Tests generate a minimum number of test cases to find the most amount of errors.
  • A good test case has a high probability of finding any undiscovered error.
  • Test cases should not be redundant.
  • Select test cases that could cover various error types.

Self-Assessment Test

  • A demonstration of a program reading three integers that makes up the sides of a triangle.
  • The program needs to establish whether the triangle is: scalene, isosceles, equilateral, impossible, or "not a triangle".

Requirements Assessment

  • Requirements should lead to two different programs:
  • Requirement 1 should input two integers and output the maximum of them.
  • Requirement 2 should input a sequence of integers and output them in sorted order.

Input Domain/Space

  • The input domain or input space of P is the set of all possible inputs to a program P.
  • For requirement 1, the input domain has pairs of integers in the range of -32,768 to 32,767.
  • For requirement 2, it's not possible to find the input domain for the sort program.

Modified Input Domain

  • Modified program should input a sequence of integers and output them sorted in ascending or descending order.
  • An A is required for ascending order and a D is required for descending order.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Software Testing Fundamentals
16 questions

Software Testing Fundamentals

DetachableSanctuary378 avatar
DetachableSanctuary378
Software Testing Fundamentals
42 questions
Use Quizgecko on...
Browser
Browser