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

Questions and Answers

Which of the following is the MOST accurate description of a 'fault' in software testing terminology?

  • A manifestation of an error in software, also known as a defect or bug. (correct)
  • A deviation of the software from its expected delivery or service.
  • An event that represents a deviation of the software from its delivered results.
  • A human action that produces an incorrect result.

In the context of software testing, what does 'reliability' primarily indicate?

  • The degree to which a software application is user-friendly and easy to navigate.
  • The absence of any known faults within the software application.
  • The probability that the software will function without failure for a specified period under specific conditions. (correct)
  • The ability of a software application to perform its intended functions without any errors.

What BEST describes the primary reason software faults occur?

  • Automated testing tools are not sophisticated enough to catch all errors.
  • Software is written by human beings who are fallible and work under constraints. (correct)
  • There is insufficient investment in quality assurance and testing processes.
  • The complexity of modern software exceeds the ability of current programming languages.

Why is exhaustive testing generally impractical?

<p>The number of possible input combinations and preconditions is too large to test in a reasonable time frame. (A)</p> Signup and view all the answers

What is the most important principle to follow when test time is limited?

<p>Prioritize tests to ensure that the best testing is done within the available time. (C)</p> Signup and view all the answers

What is the PRIMARY goal of testing?

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

What factors influence how much testing is sufficient for a project?

<p>The risk of missing important faults and potential impacts of failure. (D)</p> Signup and view all the answers

Which of the following represents an industry-specific requirement that can influence software testing?

<p>Specific guidelines from regulatory bodies like the FDA for pharmaceutical software. (A)</p> Signup and view all the answers

What does a 'test strategy' define in the context of software testing?

<p>A high-level approach to testing. (B)</p> Signup and view all the answers

According to the information, what is the main goal of test planning?

<p>To document any exceptions to the test strategy. (A)</p> Signup and view all the answers

During test specification, what is the FIRST task that should be performed?

<p>Identify conditions. (A)</p> Signup and view all the answers

Which characteristic is MOST important for a good test case?

<p>It is effective at finding faults. (D)</p> Signup and view all the answers

What are the three distinct tasks involved in test specification?

<p>Identification, Design, and Building (D)</p> Signup and view all the answers

When selecting test conditions, what is the MOST important consideration?

<p>Covering the most important conditions to ensure critical areas are tested. (D)</p> Signup and view all the answers

What activity is undertaken during the test recording stage?

<p>Comparing actual outcomes with expected outcomes and logging discrepancies. (A)</p> Signup and view all the answers

What BEST describes the purpose of 'test completion criteria'?

<p>To determine when to stop testing. (C)</p> Signup and view all the answers

Which activity is considered more 'intellectual' and governs the quality of tests?

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

According to the theory, what is the primary purpose of testing?

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

According to the theory, 'The testing paradox' implies what about building confidence in software?

<p>The best way to build confidence is to try to destroy it by finding faults (C)</p> Signup and view all the answers

What is a key responsibility of a software tester?

<p>To report faults objectively and factually, without personal bias. (B)</p> Signup and view all the answers

Why is it generally NOT recommended for developers to test their own code?

<p>They may have the same assumptions and thought processes that led to the faults. (D)</p> Signup and view all the answers

When is re-testing performed during the software development lifecycle?

<p>After faults have been fixed to confirm the fix. (C)</p> Signup and view all the answers

What is the primary purpose of regression testing?

<p>To look for any unexpected side-effects after changes have been made. (D)</p> Signup and view all the answers

Under what circumstances are regression tests typically performed?

<p>After software changes, including faults fixed. (A)</p> Signup and view all the answers

What action helps streamline regression test pack maintenance?

<p>Eliminating repetitive tests that test the same condition. (A)</p> Signup and view all the answers

Why is automation particularly beneficial for regression testing?

<p>It allows tests to be run as often as desired. (C)</p> Signup and view all the answers

When should expected results be defined in the testing process?

<p>Before test execution as part of the test design process. (A)</p> Signup and view all the answers

What guides the prioritization of tests when there is not enough time to test everything?

<p>Risk-based ranking criteria, such as the severity and likelihood of failure. (A)</p> Signup and view all the answers

Which of the following ranking criteria is MOST useful for prioritizing tests?

<p>Tests where a failure would be most visible. (A)</p> Signup and view all the answers

Which statement BEST reflects the role of automation in the test completion process?

<p>Automation can speed up execution but is not the whole the picture. (A)</p> Signup and view all the answers

To improve software quality and reliability, what action takes precedence during testing?

<p>Finding faults in the software. (A)</p> Signup and view all the answers

In the software development lifecycle, what is the PRIMARY reason for conducting regression testing?

<p>To ensure recent changes haven't introduced new errors. (C)</p> Signup and view all the answers

What is a typical consequence of neglecting to define expected results before executing a test case?

<p>Inaccurate bug reports. (B)</p> Signup and view all the answers

Which of the following actions is MOST likely to improve the efficiency of a regression test suite?

<p>Combining test cases to reduce redundancy. (D)</p> Signup and view all the answers

Which aspect are the test completion criteria aiming to measure?

<p>Test coverage. (C)</p> Signup and view all the answers

How can software faults lead to safety issues within radiation treatment systems?

<p>By causing the system to administer lethal doses of radiation. (B)</p> Signup and view all the answers

What is the likely issue if developers test their own code?

<p>They are too biased to detect faults. (C)</p> Signup and view all the answers

What must happen to the environment, versions, inputs, and preconditions during re-testing?

<p>They must be exactly as before. (A)</p> Signup and view all the answers

What is the relationship between exhaustive- and risk-testing? (Select all that apply)

<p>Risk testing is more common given that exhaustive testing is impractical. (A), Exhaustive testing is very rare due to it being unnecessary and time-consuming. (C)</p> Signup and view all the answers

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. It's also called a defect or bug. If the fault is executed, this may cause a failure.

What is a failure?

Deviation of the software from its expected delivery or service. It's also called a 'found defect'. Failure is an event, fault is a state.

What is reliability?

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

Signup and view all the flashcards

What is exhaustive testing?

The process of exercising all combinations of inputs and preconditions.

Signup and view all the flashcards

How much testing is enough?

It depends on the risks for your system

Signup and view all the flashcards

What do testing measure?

Testing measures software quality and improve reliability.

Signup and view all the flashcards

Planning (detailed level)

Planning includes specification, execution, recording and completion.

Signup and view all the flashcards

A good test case

A test case is effective, exemplary, evolvable and economic

Signup and view all the flashcards

Identify

Determine what is to be tested (identify test conditions) and prioritise.

Signup and view all the flashcards

Design

Determine how the 'what' is to be tested (i.e. design test cases.)

Signup and view all the flashcards

Build

Implement the tests (data, scripts, etc.).

Signup and view all the flashcards

Design test input.

Each test exercises one or more test conditions

Signup and view all the flashcards

Determine expected results.

Predict what should result of each test case, what is output, what will change and what wouldn't change.

Signup and view all the flashcards

Prepare test scripts.

Test scripts have to be very detailed if tester has less system knowledge.

Signup and view all the flashcards

Execute prescribed test cases

Testing of important one is first.

Signup and view all the flashcards

Test recording: Compare

Actual results compared to expected results

Signup and view all the flashcards

Check test completion.

Test completion criteria were specified in the test plan.

Signup and view all the flashcards

Test completion criteria.

Completion or exit criteria apply to all levels of testing.

Signup and view all the flashcards

Why Test?

Aims to build confidence, find faults, reduce costs and assess software quality.

Signup and view all the flashcards

A traditional testing approach.

Does what it should, doesn't do what it shouldn't. Shows system is working

Signup and view all the flashcards

A better testing approach

Aims to find faults. Shows system fails

Signup and view all the flashcards

The testing paradox.

Is to find faults and finding faults destroys confidence

Signup and view all the flashcards

Who wants to be a tester.

Bringing Bad News! Destructive process

Signup and view all the flashcards

Tester's have the right to:

Testers deserve good information and respect.

Signup and view all the flashcards

Testers have responsibility to:

Testers should test objectively and document well.

Signup and view all the flashcards

Test your own work?

Finds 30 - 50% of your own faults

Signup and view all the flashcards

Levels of independence

Tests generated by a tool (low quality tests?)

Signup and view all the flashcards

Re-run the same test

Must be exactly repeatable, same environment versions.

Signup and view all the flashcards

Regression testing 1.

Misnomer: anti-regression or progression, standard set of tests, regression test pack.

Signup and view all the flashcards

Regression tests are perform.

After software changes, environment changes, emergency fixes, regression tests are perform.

Signup and view all the flashcards

Maintenance of the regression test pack

Eliminate repetitive test, combine test cases, select subset.

Signup and view all the flashcards

Expected result

Aims to predict in advance as part of the test design process

Signup and view all the flashcards

Ranking criteria.

Test where would be most severe, test where the failures would be most visible.

Signup and view all the flashcards

Study Notes

Principles of Testing

  • Testing entails principles, lifecycle, static testing, dynamic test techniques, management, and tools.

Contents

  • Testing is needed to identify errors, ensure reliability and fulfil expectations.
  • Fundamental test process covers planning, specification, psychology, re-testing, expected results and test prioritisation.

Testing Terminology

  • There isn't a universally accepted set of testing definitions.
  • BS 7925-1 is a new standard.
  • BS 7925-1 focuses on component testing and was developed by the BCS SIGIST.
  • BS 7925-1 has been adopted by the ISEB / ISTQB.

Defining Bugs

  • Error signifies a human action with an incorrect result.
  • Fault represents an error's expression in software.
  • Fault is also known as a defect or bug and can cause a failure if executed.
  • Failure is when software deviates from expected delivery or service.
  • Failure is an event; fault is a state of the software, caused by an error.

Reliability vs. Faults

  • Reliability assesses the likelihood of software not causing system failure within a specific time and under defined conditions.
  • Systems can be reliable even with faults.
  • "Fault-free" software apps aren't always reliable.

Software Faults

  • Software faults occur because software is written by humans beings.
  • Faults occur more increasing pressure, to deliver to strict deadlines
  • Faults may occur if you have ever written software.

Costs of Software Faults

  • Software faults can result in huge sums, examples include: Ariane 5 ($7billion), Mariner space probe to Venus ($250m) and American Airlines ($50m).
  • Incurring software faults can result in very little or nothing at all and minor inconvenience.
  • Software is non-linear, small input, large effect.

Safety-Critical Systems

  • Software faults can result in death or injury.
  • Radiation treatment killed patients in Therac-25.
  • Software faults led to train driver killed and aircraft crashes.
  • Bank system overdraft letters caused suicide.

Testing Necessity

  • Testing is necessary to highlight faults, assess software reliability, prevent expensive failures, avoid customer lawsuits and maintain business operations.

Exhaustive Testing

  • System with 20 screens, average of 4 menus/screen, two input types, 10 fields/screen and 100 possible values -> 480,000 tests
  • At one second per test, 480,000 tests will take 17.7 days.

Exhaustive Testing Defined

  • Exhaustive testing involves testing all combinations of inputs and preconditions.
  • Exhaustive testing takes an impractical amount of time.

Determining Enough Testing

  • Enough testing depends on the risks for your system.

Testing Scope

  • Testing scope depends on the risk of missing significant faults, incurring failure costs, or releasing untested, under-tested software.
  • It's influenced by risks like losing credibility/market share, missing market windows, or over-testing.

Time Constraints on Testing

  • Limited test time requires prioritizing tests based on risk such as: what to test first, what not to test and how thoroughly to test each item

Test Prioritization

  • Prioritize tests so that if testing stops, the best possible testing has been completed in the given time.

Testing and Quality

  • Testing measures software quality.
  • When faults are found and removed, software quality increases.
  • Testing tests system function, reliability, usability, maintainability, reusability, and testability.

Influences of Testing

  • Testing influenced by contractual, legal, and industry-specific requirements.

Test Planning Levels

  • Test Policy & Strategy = Company level
  • High Level Test Plan = Project level (IEEE 829)
  • Detailed Test Plan = Test stage level (IEEE 829)

Test Process

  • The test process stages are planning, specification, execution, recording, and check completion.

Test Planning Particulars

  • Test planning applies how the test strategy and project test plan will apply to the software under test.
  • Test planning documents any exceptions to the test strategy.
  • Test planning outlines software needed for tests, like stubs/drivers, and environment details.
  • Test planning sets test completion criteria.

Test Specification

  • Test specification involves identify conditions, design test cases and build tests.

What Is Good Test Case?

  • A good test case finds faults, represents others, is easy to maintain and is cheap to use.

Breaking Down Effective Test Specification

  • Identify: Determine 'what' to test and prioritize test conditions.
  • Design: Determine 'how' to test 'what' which is to design test cases.
  • Build: Implement the tests, data, scripts, etc.

Identifying Test Conditions

  • List the conditions that we like to test and use the test design techniques specified in the test plan.
  • Prioritize the test conditions, ensure most important conditions are covered.

Design Test Cases

  • Design test input and test data by exercising one or more test conditions.
  • Determine the results expected after predicting the outcome of each test case.
  • Design sets of tests by using regression, building confidence and finding faults.

Build Test Cases

  • Prepare test scripts.
  • Less system knowledge requires more detailed scripts.
  • Scripts for tools specify every detail.
  • Prepare test data that must exist in files/databases at the start.
  • Prepare expected results, defined before execution.

Test Execution

  • Execute prescribed test cases.
  • Execute the most important tests first
  • Execution could be manual or automated.

Follow the Testing Plan

  • Test records contain identities and versions of software under test and test specifications.
  • Follow the plan to mark off progress on the test script.
  • Document actual outcomes from the test and capture any other ideas you have for new test cases.
  • Records are used to establish that all test activities have been carried out as specified.

Test Recording

  • Testing compares actual outcome with expected outcome by logging discrepancies accordinly. Discrepancies may stem from a software fault, test fault, environment, version fault, or incorrect test run.
  • Log coverage levels achieved for measures.
  • After the fault has been fixed, repeat the required test activities, such as executing and designing a plan.

Check Test Completion Particulars

  • Test completion criteria should be specified in the test plan.
  • Repeat test activities if criteria not met to design more tests.

Test Completion Criteria Factors

  • Completion criteria apply to all levels of testing to determine when to stop.
  • Criteria include coverage, faults found, cost, and time.

Intellectual vs Clerical Testing

  • Planning and Specification is more intelectual
  • Execution and Recording is more clerical

Why Testing

  • Testing is done to build confidence, demonstrate compliance with needs, identify faults and reduce costs.
  • Testing meets user needs and assesses the software quality.

Traditional Testing Approaches

  • A traditional testing approach shows that the system does what it should and doesn't do what it shouldn't.
  • Goal of traditional testing is show working.
  • Success is a system's works
  • The outcome of traditional testing is faults left in.

Better Testing Approach

  • To show system does what it shouldn't and doesn't do it should.
  • The goal of this approach is to find faults
  • Fastest achievement: difficult test cases

Testing Paradox

  • The testing paradox is that testing is to find faults.
  • Finding faults is to destroys confidence.
  • Testing should build confidence.

Testers Role

  • Testers bring bad news.
  • Testers face time pressure.
  • Testers need a different view or mindset.
  • Testers communicate fault to authors and managers.

Rights of Testers

  • Testers are entitled to have accurate info about progress and changes, insight, delivered code tested to a standard, be regarded as a professional, challenge specifications and have faults taken serious.
  • Testers can make predictions about future fault levels and improve their testing process.

Responsibilities of Testers

  • Testers are to follow the test plans, scripts, etc. as documented.
  • Testers report faults objectively and factually and objectively assess risk.
  • Testers prioritize what to report and communicate the truth.

Independence of Testing

  • Testers can find 30%-50% of your own faults.
  • Tester needs to take on assumptions and thought processes
  • Tester see what you meant or want to see, not what is there + emotional attachment.

Levels of Independence

  • None: tests designed by the person who wrote the software
  • Tests designed by a different person
  • Tests designed by someone from a different department or team (e.g. test team)
  • Tests designed by someone from a different organisation (e.g. agency)
  • Tests generated by a tool (low quality tests?)

Re-Testing

  • Re-testing happens after faults are fixed.
  • It involves running a test that failed and reported in a new software version.
  • The test must be repeatable with same environment, versions, inputs and preconditions.
  • After it passes, a fault has been fixed correctly.

Regression Test

  • Regression aims to identify unexpected side-effects.
  • It is also referred to as anti-regression or progression.
  • Regression is a standard set of tests.
  • It is worth automating at any level.
  • Consider this a developing asset - must be maintained

When To Perform Regression Tests?

  • Tests are performed after software changes, including faults fixed.
  • Regression tests are ran when the environment changes.
  • Regression tests are ran for emergency fixes.
  • Regression tests evolve, run often, and may become large.

Maintenance

  • To maintain, eliminate repetitive tests, combine test cases, select a subset of full regression suite and eliminate old fault fix tests.

Automating Regression Testing

  • Test execution tools (e.g. capture replay) are regression testing tools.
  • They re-execute tests which have already been executed.
  • Once automated, regression tests can be run as often as desired.
  • Automating tests is not trivial, taking 2-10x longer than manual runs.

Why Have Expected Results?

  • Results should be predicted in advance as part of test design.
  • 'Oracle Assumption' says correct outcome can be predicted.
  • Predicted tests can help to prevent testing bias.

Prioritizing Tests

  • Because everything cannot be tested.
  • There is never enough time to do all the testing you would like..

Possible Criteria

  • Ranking could be risk based such as severe failures, visible failure, etc.
  • Ask customers their priorities.
  • Areas most critical, changed, problems, complexity.

Key Points

  • Testing is necessary because people make errors.
  • Process entails planning, specification, execution, recording, checking completion.
  • Independence and relationships are important in testing.
  • Test fixes; regression test for the unexpected, complete tasks. Prioritize to do the best testing

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser