Principles of Software Testing

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

Why is exhaustive testing considered neither possible nor practical in software testing?

  • It leads to conflicts between developers and testers.
  • It is not supported by testing tools.
  • It is too costly and time-consuming in most scenarios. (correct)
  • It violates industry standards.

Which of the following best describes the relationship between errors, faults, and failures in software?

  • Faults are human actions that produce errors, which lead to failures.
  • Errors are human actions that produce faults, which may lead to failures. (correct)
  • Errors are manifestations of failures, which cause faults.
  • Failures are manifestations of errors, which directly cause faults.

What is the primary goal of regression testing?

  • To ensure that previously fixed defects have not reappeared and that no new defects were introduced. (correct)
  • To test the performance of the software under heavy load.
  • To find new defects in recently added features.
  • To validate that the software meets all specified requirements.

What is a key reason why developers and testers often have different mindsets?

<p>Developers are focused on creating something new, while testers are focused on finding problems. (B)</p> Signup and view all the answers

Why is it important to specify expected results before test execution?

<p>To prevent testers from subconsciously interpreting erroneous results as correct. (D)</p> Signup and view all the answers

A company releases a new version of its software. After the release, several users report that a feature that was working perfectly in the previous version is now broken. Which type of testing could have prevented this?

<p>Regression testing (A)</p> Signup and view all the answers

What is the term used to describe a situation where a faulty piece of code in a software application causes it to deviate from the expected behavior?

<p>Failure (D)</p> Signup and view all the answers

A software team discovers that a critical module in their application has numerous potential risks associated with it due to its complex nature. According to the principles of testing, how should they allocate their testing effort?

<p>Focus testing effort on the areas of the system most likely to have defects. (A)</p> Signup and view all the answers

What is the main objective of testing software?

<p>To find faults in the software. (C)</p> Signup and view all the answers

What is the main reason behind why developers should not test their own code?

<p>Developers cannot be objective about their own work. (B)</p> Signup and view all the answers

According to the provided text, what factor significantly contributes to the cost of software errors?

<p>The time at which the error is discovered. (D)</p> Signup and view all the answers

Which of the following is the FIRST step in component testing following the BS7925-2 standard?

<p>Planning the test activity. (A)</p> Signup and view all the answers

What is a key characteristic of a 'successful test' as defined in the provided material?

<p>A test which uncovers a fault in the software. (D)</p> Signup and view all the answers

Which of the following scenarios illustrates the concept of 'testing as a risk management process?'

<p>Prioritizing tests to detect critical defects and prevent catastrophic consequences. (B)</p> Signup and view all the answers

What is the definition of 'Test Recording'?

<p>Keeping good records of the tests undertaken. (C)</p> Signup and view all the answers

What is the definition of 'Test Execution'?

<p>Running the test on a computer system. (B)</p> Signup and view all the answers

Consider this code fragment: IF age > 16 AND age <=65 THEN Issue drivers License. What type of testing is best suited to ensure that the software functions as intended?

<p>Boundary value analysis. (B)</p> Signup and view all the answers

Which of the following is a common cause of software bugs?

<p>Constantly changing requirements. (A)</p> Signup and view all the answers

What factor determines whether or not modifications have caused unintended adverse side effects?

<p>If the changed system still meets requirements. (D)</p> Signup and view all the answers

What must you have version control of to have an effective regression test suite?

Signup and view all the answers

In software testing, what distinguishes a 'fault' from a 'failure'?

<p>A fault is the cause of the incorrect behavior, while a failure is the observable result of that fault. (A)</p> Signup and view all the answers

Why is it important for testers to possess good communication skills?

<p>To ensure that developers are aware of the faults in the system and can fix them effectively. (D)</p> Signup and view all the answers

What is the MOST critical reason for re-testing software after a detected fault has been fixed?

<p>To ensure the original fault has been successfully removed. (A)</p> Signup and view all the answers

Which of the following factors MOST significantly influences the prioritization of tests?

<p>The severity of potential failures and the likelihood of their occurrence. (B)</p> Signup and view all the answers

What is the primary purpose of regression testing?

<p>To verify that modifications have not caused unintended adverse side effects and that the system continues to meet requirements. (C)</p> Signup and view all the answers

Why is specifying expected results prior to test execution considered a fundamental principle of software testing?

<p>It helps testers avoid subjective interpretations of test outcomes. (B)</p> Signup and view all the answers

What is a key difference in mindset between developers and testers during software development?

<p>Developers aim to create and implement functionality, while testers aim to identify faults and ensure reliability. (A)</p> Signup and view all the answers

Which of the following BEST describes 'test recording' in the context of a fundamental test process?

<p>Keeping detailed records of test activities, including software versions, test specifications, and actual outcomes. (B)</p> Signup and view all the answers

What is the PRIMARY purpose of setting 'completion' or 'exit' criteria in software testing?

<p>To determine when sufficient testing has been performed. (A)</p> Signup and view all the answers

In the context of software errors, what does 'reliability' measure?

<p>The probability that software will not cause system failure for a specified time under specified conditions. (A)</p> Signup and view all the answers

What is the BEST approach to ensure that faults are reported effectively to developers?

<p>Reporting faults in a professional manner, providing clear and constructive information. (C)</p> Signup and view all the answers

Which of the following is NOT typically considered a reason why developers should avoid testing their work?

<p>Developers may lack the necessary testing skills. (A)</p> Signup and view all the answers

According to the fundamental test process, what activity immediately follows test specification?

<p>Test execution. (A)</p> Signup and view all the answers

In the context of software testing, what does the term 'Incident' refer to?

<p>An unexpected outcome that requires further investigation. (B)</p> Signup and view all the answers

A software project is facing a tight deadline. Which testing approach would be MOST effective in this situation?

<p>Prioritized testing based on risk and potential impact. (C)</p> Signup and view all the answers

A tester finds several spelling mistakes and formatting issues, along with some more serious function faults. What should the tester do?

<p>Report all defects, both minor and severe, clearly and professionally. (B)</p> Signup and view all the answers

What is a 'work-around' in software testing terminology?

<p>A temporary fix or method to bypass an error in the product. (D)</p> Signup and view all the answers

How does testing contribute to improving software quality?

<p>By identifying faults, which when removed, enhance the software's potential reliability. (D)</p> Signup and view all the answers

What is the role of a 'Test Plan' in software testing?

<p>A document describing the scope, approach, resources, and schedule of intended testing activities. (C)</p> Signup and view all the answers

What action should be taken when a test produces an unexpected outcome?

<p>Perform further effort to classify the incident and determine the cause. (C)</p> Signup and view all the answers

Which of the following is the MOST accurate description of 'Validation' in testing?

<p>Checking the software against the user requirements: are we building the right product? (D)</p> Signup and view all the answers

What is the BEST way to handle situations where emergency fixes are needed?

<p>The test manager may create a subset of regression test pack for immediate execution. (A)</p> Signup and view all the answers

When deciding on test effort, what factors need to be balanced?

<p>Extra testing effort and cost. (D)</p> Signup and view all the answers

What makes a test successful?

<p>A test that finds a defect. (C)</p> Signup and view all the answers

Flashcards

What is an Error?

A human action that produces an incorrect result.

What is a Fault?

A manifestation of an error in software; colloquially known as a bug.

What is a Failure?

Deviation of the software from its existing delivery or service, caused by a fault.

What is Reliability?

The probability that software will not cause system failure for a specified time under set conditions.

Signup and view all the flashcards

What is consistent terminology?

Ensuring everyone involved shares a common understanding of the terms used in testing.

Signup and view all the flashcards

What is BS 7925-PART2?

The British Standard for Software Component Testing.

Signup and view all the flashcards

What is BS 7925-PART1?

A useful glossary of terms used in software testing.

Signup and view all the flashcards

What is Testing?

Testing identifies faults that increase software quality by improving the software's potential reliability.

Signup and view all the flashcards

What is Risk-based testing?

Allocating testing time and resources based on potential negative impacts.

Signup and view all the flashcards

What are the stages of the fundamental test process?

Planning, specification, execution, recording, and checking for completion.

Signup and view all the flashcards

What is Test Specification?

Designing test conditions and test cases using recognized test techniques.

Signup and view all the flashcards

What is Re-testing and Regression testing?

Testing after changes to ensure original faults are resolved and no new faults are introduced.

Signup and view all the flashcards

What are Expected Results?

Knowing the expected outcome before test execution

Signup and view all the flashcards

What is a Bug report?

The act of transmitting a discrepancy between actual and expected output.

Signup and view all the flashcards

What are failures?

The act of a product not behaving as expected.

Signup and view all the flashcards

What is a Test Plan?

A document outlining the scope, approach, resources, and schedule of testing.

Signup and view all the flashcards

What is a Test Suite?

A collection of test cases to adequately test a product.

Signup and view all the flashcards

What is Validation?

Establishing the relationship between software and a specification.

Signup and view all the flashcards

What is a Work-around?

A way to bypass an error and still achieve the desired function.

Signup and view all the flashcards

What is a Program?

A program is a sequence of instructions for the computer

Signup and view all the flashcards

What are Syntax errors?

Errors in structure or grammar of the programming language that violate rules.

Signup and view all the flashcards

What are Routine errors?

Errors when the program asks the computer to perform an impossible action.

Signup and view all the flashcards

What are Logical errors?

Mistakes in the meaning or logic of the program.

Signup and view all the flashcards

What is the Cost of Bugs?

To be able to fix it, and the cost. is more expensive over time

Signup and view all the flashcards

What are Program Errors?

Complexity is very difficult to prevent.

Signup and view all the flashcards

Study Notes

Principles of Testing Overview

  • Professional testers are largely in agreement on the basic principles of testing, despite different terminology used throughout the industry.
  • Proper testing is crucial, as the cost of errors can be substantial.

Testing Necessities

  • Exhaustive testing will never be possible or practical.
  • Fundamental test process includes industry standards.
  • Determining expected results in advance of test execution is important.
  • Re-testing and regression testing are critical for ensuring software quality before release.

Learning Objectives

  • Basic testing terminology should be clear.
  • Grasp the necessity of testing.
  • Define error, fault, and failure distinctly.
  • Recognize why errors happen and their potential costs.
  • Recognize testing limitations and manage it as a risk.
  • Grasp the fundamental test process.
  • Understand the differing mindsets of developers and testers.
  • Learn effective communication strategies for developers and testers.
  • Understanding why testing of own work is ineffective.
  • Knowing the importance of regression testing.
  • Be able to define expected results in advance.
  • Tests should be prioritized appropriately.

Testing Terminology

  • A generally accepted set of testing definitions does not exist.
  • The British Standard for Software Component Testing is a good source of testing definitions.
  • It's important to ensure everyone understands terminology.

Why Testing is Needed

  • Explores the reasons testing is necessary alongside the costs and consequences of software errors.

Errors, Faults, and Failures

  • Error: A human action that produces an incorrect result.
  • Fault: A manifestation of an error in software (also known as defects or bugs).
  • Failure: Deviation of the software from its intended delivery or service, caused by a fault.

Reliability

  • Reliability: The probability that software will perform without failure for a specified time and conditions.
  • Includes MTBF, MTTF, and service level agreements.

Errors and How They Occur

  • Human errors are unavoidable.
  • Real-world pressures such as tight deadlines and budget restrictions intensify the risk of errors.

Cost of Errors

  • The cost of errors ranges from negligible to massive financial losses or even loss of life.
  • Nuclear reactor shutdown occurred due to a single line of incorrect code.
  • Blue Cross of Wisconsin issued $60 million in unwarranted payments.
  • Pepsi promotion error could've cost them $42 billion.
  • Chemical Bank error caused $15 million to be incorrectly withdrawn.

London Ambulance Service (LAS) Failure

  • The LAS new system failed, resulting in ambulances not arriving and loss of life on October 26th and 27th 1992.
  • Problems: over-reliance on perfect information and difficulties in correcting system errors.
  • Consequences: poor allocations, build-up of messages, slow-down, and telephone answering delays.

Exhaustive Testing

  • Testing everything is impossible both theoretically and practically.
  • Testing every possible scenario can be extremely time-consuming.

Testing and Risk

  • Balance testing effort with the potential risk of failure.
  • Prioritize tests based on risk assessment.
  • Testing should focus on areas most likely to have defects.
  • Execute the most important tests first.

Testing and Quality

  • Testing improves software quality by identifying and removing faults.
  • Testing measures software quality factors.

Testing and Requirements

  • Testing may be determined by legal, contractual, regulatory, or mandatory requirements.

How Much Testing?

  • Determining how much testing is enough involves balancing risks versus the cost of additional testing efforts.
  • Thorough test planning and clear completion criteria are essential.
  • Prioritising tests ensures critical functionalities are tested even if time runs short.

Fundamental Test Process

Introduction

  • Testing must be planned.
  • Good testing involves thinking out approaches.

Test Process Stages

  • Test planning: Documents the overall approach, objectives, assumptions, and exceptions.
  • Test specification: Designs test conditions and cases using recognized test techniques.
  • Test execution: Running the tests on the system.
  • Test recording: Keeping detailed records of test activities and results.
  • Checking for test completion involves verifying if the completion criteria have been met and rerunning or designing some new test cases.

Successful Tests

  • A successful test detects the faults.
  • Finding faults early is more effective.

Completion Criteria

  • Completion criteria determine when testing is complete, defined by cost, time, faults found, or coverage criteria.

Coverage Criteria

  • Coverage criteria is in terms of items exercised by test suites.

Psychology of Testing

Purpose

  • Aims to explore the differences in perspective between testers and developers.

Different Mindsets

  • Testing finds faults, hence a destructive process.
  • Development is creative.
  • Developers aim to build new software that works the first time.
  • Testers ensure the system meets user needs, is reliable, and functions correctly.
  • Communication helps in getting bugs fixed.

Developer Communication

  • Developers are creative and valued.
  • Developers are often not good communicators; can specialize to only a few skills.

Tester Communication

  • Testers are sometimes seen as destructive.
  • Testers are multitasked.

Independence in Testing

  • Independent testing is more effective.
  • Test cases can be designed by different people.

Retesting and Regression Testing

  • Re-testing is to ensure the fault is fixed.
  • Regression testing verifies that modifications have not caused unintended adverse side effects.
  • Maintain a regression test suite.
  • Emergency fixes need a small regression test.

Expected Result

  • Specifying expected results in advance of test execution is a must.
  • Human error will cause more errors and testers might thing that a failure is a correct result

Some Testing Terminology

  • Ad-hoc test care: tests executed without prior planning, when expected behavior is unknown.
  • Bug report: tells someone that cares for follow-up when there is a discrepancy.
  • Coincidental correctness: behavior appears correct, but it is coincidental.
  • Failures: a product that doesn't behave correctly showing manifestation of a fault.
  • Faults: the mistake in the code, the cause.
  • Work-around: bypassing the error.
  • Test Suite: Test cases that "adequately" test the product.
  • Validation: Correspondance between the software and the specifications.

Programming Basics

  • Write programs to tell the computer exactly what to do.
  • Programs are sets of instructions for the computer.
  • "Code" is another name for program.

Textual Programming

  • Computers can't understand any language.
  • Applications are programs.

Programming errors

  • Bug is the program error.
  • Debugging is fixing the application error.

Errors in Programming

  • Syntax errors: are due to structure or grammar of the language (rules) applied.
  • Routine errors: are due to non-existing situations like 1 divided by 0, is impossibility.
  • Logical errors: are those in the meaning of the program.

The Cost of Bugs

  • Costs of fixing bugs increase dramatically over time.
  • Early detection is cheaper.

Why Bugs Happen

  • Miscommunication.
  • Software complexity.
  • Programming errors.
  • Changing requirements.

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Principles of Software Testing
5 questions

Principles of Software Testing

SelfSufficientRhinoceros9937 avatar
SelfSufficientRhinoceros9937
Software Testing Principles
37 questions
Software Testing Principles Quiz
48 questions
ISTQB Certification and Software Testing Principles
48 questions
Use Quizgecko on...
Browser
Browser