Software Testing Concepts Quiz
29 Questions
0 Views

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

What is the primary goal of structural testing in software development?

The primary goal of structural testing is to test as much of the program as possible.

In the context of a directed graph, what do nodes and edges represent?

Nodes represent sequential statements or blocks of code, while edges represent the transfer of processing control.

Define 'test coverage' and its importance in software testing.

Test coverage is the minimal set of test cases that ensure certain criteria are satisfied, and it is important to determine how effectively a set of tests validates the program.

What is statement testing, and how does it relate to code execution?

<p>Statement testing involves designing test cases to execute every source statement in the software at least once.</p> Signup and view all the answers

Explain how iterations (loops) affect the concept of paths in a directed graph.

<p>Iterations introduce multiple unique routes as each loop iteration can be considered a different path.</p> Signup and view all the answers

Define software testing in your own words.

<p>Software testing is the process of evaluating and verifying that a piece of software meets its pre-determined purpose.</p> Signup and view all the answers

Explain the difference between an error and a fault in software.

<p>An error is a mistake made by a person, while a fault is a defect in the software caused by that error.</p> Signup and view all the answers

What is the purpose of a good test case?

<p>A good test case is designed to have a high probability of detecting any undiscovered errors in the software.</p> Signup and view all the answers

What is meant by 'structural testing'?

<p>Structural testing, also known as white-box or glass-box testing, involves testing based on the internal code structure of the software.</p> Signup and view all the answers

Describe what a test plan should include.

<p>A test plan should include the testing approach, responsibilities, specific tests to run, and organization of the testing effort.</p> Signup and view all the answers

How does a fault relate to software failure?

<p>A fault may cause a software failure, but it does not always lead to one, as failure is the observed departure from expected behavior.</p> Signup and view all the answers

What is the significance of testing at various stages of software development?

<p>Testing at different stages helps identify defects early, ensuring better quality and reducing costs related to fixing errors later.</p> Signup and view all the answers

What does 'fit for purpose' imply in terms of software quality?

<p>'Fit for purpose' means that the software meets and exceeds the outlined requirements effectively.</p> Signup and view all the answers

What is branch testing and how many tests are required to cover both outcomes for the given code example?

<p>Branch testing ensures each decision has both TRUE and FALSE outcomes executed. In the example, 2 tests are sufficient.</p> Signup and view all the answers

In condition testing, how many test cases are needed to cover all conditions in the expression '(A || B) && C'?

<p>Three test cases are necessary to cover all conditions: A TRUE, B TRUE; A FALSE, B TRUE, C TRUE; A FALSE, B FALSE.</p> Signup and view all the answers

Explain decision/condition testing and its significance.

<p>Decision/condition testing requires that both each condition and each decision outcome are executed at least once, ensuring robust testing of logic.</p> Signup and view all the answers

What is the goal of multiple condition testing?

<p>The goal of multiple condition testing is to design test cases that invoke all possible combinations of TRUE and FALSE outcomes in each decision.</p> Signup and view all the answers

Define path testing in the context of program execution.

<p>Path testing involves designing test cases that execute each unique path from start to end within the program at least once.</p> Signup and view all the answers

What issue arises with loops during testing, and why can it complicate path testing?

<p>The issue with loops is that each iteration is a different path, and if N is infinite, it can lead to a complex testing scenario.</p> Signup and view all the answers

How is data flow classified in programming, particularly in reference to variable occurrences?

<p>Data flow classifies variable occurrences into definitions and uses, specifically identifying when a variable is defined or referenced.</p> Signup and view all the answers

What type of testing would you apply to ensure that all paths through a program are executed at least once?

<p>You would apply path testing to guarantee that each unique route through the program is tested.</p> Signup and view all the answers

What does a d-u pair represent in terms of variable usage in programming?

<p>A d-u pair represents the definition (D) of a variable and its subsequent use (U) in program statements.</p> Signup and view all the answers

How does data flow testing help in identifying variables in a program?

<p>Data flow testing analyzes the use of variables to find issues like undeclared variables or those that are defined multiple times before being used.</p> Signup and view all the answers

What is the primary advantage of data flow testing?

<p>The primary advantage is its ability to identify variables that are declared but not used or declared multiple times.</p> Signup and view all the answers

What is the main weakness of data flow testing?

<p>A main weakness is that it does not effectively handle compound variables, such as arrays.</p> Signup and view all the answers

What is the role of equivalence partitioning (EV) in testing?

<p>Equivalence partitioning divides input data into subsets to reduce the number of test cases while ensuring coverage of all possible scenarios.</p> Signup and view all the answers

Why is boundary value analysis (BVA) important in testing?

<p>Boundary value analysis is important because it focuses on values at the edges of input ranges, which are often where errors occur.</p> Signup and view all the answers

In unit testing, what is the significance of deriving tests from the unit specification?

<p>Deriving tests from the unit specification ensures that the tests are aligned with the intended functionality and requirements of the unit.</p> Signup and view all the answers

What is a potential issue with functional testing based on requirement specifications?

<p>A potential issue is that the quality of functional testing heavily relies on the clarity, completeness, and accuracy of the requirement specifications.</p> Signup and view all the answers

Study Notes

Software Quality and Testing

  • Critical awareness/evaluation/assessment involves comparing, contrasting, and justifying judgments with evidence.
  • Software is a list of instructions executed on a computer to fulfill a predetermined purpose.
  • Software Testing is the process of evaluating and verifying if software fulfills its intended purpose.
  • Errors are mistakes made by people that can lead to faults.
  • Faults are caused by errors in software and may or may not lead to failures.
  • Failures are observed deviations from the expected behavior of software, dependent on user expectations.
  • Quality meets and exceeds requirements.

Software Quality

  • External and internal quality are aspects of software quality.
    • Functionality, reliability, usability, efficiency, maintainability, and portability are examples of aspects of external quality.
    • Suitability, maturity, accuracy, interoperability, reliability, completeness, testability, compatibility, complaince are all part of aspects of external quality. Other aspects of internal quality include: Understandability, learnability, usability, efficiency, maintainability, portability, adaptability, installability, resource utilization, testability, replaceability, and compliance.

A good test

  • A good test case has a high probability of finding undiscovered errors.

Testing and Reviewing

  • Testing is the dynamic execution of software towards the end of the process.
  • Reviewing is a static examination of an output and can be done earlier in the process.

Test Plan

  • A test plan organizes and manages the testing effort, outlines the testing approach, and specifies tests to run.
  • Contains the information of what is to be tested, personnel required, schedules, test tools, test failure reporting process, regression testing, records, and outcomes of each test.
  • Test cases define aspects of software for testing and should be written for invalid and unexpected input conditions.
  • Test data includes planned inputs, starting conditions, and expected outputs for each test.

Stages of Testing

  • Different stages of testing include: unit testing, integration testing, system testing, acceptance testing, beta testing, and field trials. Regression testing is almost always a stage.

Testing Techniques

  • Structural (white-box/glass-box) testing analyzes software based on its internal structure. Testing focuses on control flow and/or data flow using a directed graph in order to execute a large portion of possible code paths.
  • Functional (black-box) testing is based on the software's requirements specification without examining its internal structure. Tests are designed to exercise paths through the unit that evaluate the functionality of the program.
  • Path testing is a method of designing test cases that cause each possible path through the program to be executed.
  • Test Coverage is the minimal set of cases that satisfy the testing criteria.
  • Statement testing executes every statement in the software at least once.
  • Branch testing executes both true and false outcomes of each decision in the program.
  • Condition testing tests all possible combinations of true and false values for each condition in a decision statement in the code.
  • Decision/Condition testing ensures each decision has both TRUE and FALSE outcomes executed at least once.
  • Multiple condition testing involves testing all possible combinations of conditions in each decision.
  • Data flow testing analyzes the data flow for each variable, choosing test cases.

Dealing with Loops

  • The number of iterations in a loop can be infinite, which can be a problem for testing.

Functional Testing

  • Equivalence partitioning divides inputs into subsets where the program behaves the same way.
  • Boundary value analysis focuses on input values at the boundaries.
  • Combinatorial testing examines combinations of input parameters.
  • Pairwise testing covers pairs of input parameter combinations.
  • N-way testing tests all possible combinations of parameters.

System Testing

  • Functional testing evaluates functions, volume, load, usability, security, performance, and recovery.

Additional Testing Concepts

  • Beta testing uses real users to test products.
  • Test scaffolding is used in unit and integration testing with stubs and drivers.
  • Stubs simulate unavailable components (modules).
  • Drivers execute tests of lower level modules.
  • Incremental testing combines modules for testing.
  • Top-down testing starts testing control modules first.
  • Bottom-up testing starts testing a lower-level unit first and uses drivers to test those modules/units.
  • Cause of test failure can be faults in software, the test itself, or the expected results.

Software Maintenance and Quality

  • Maintainability depends on the ease of changing software. Issues such as maintenance and debugging should be the developer's responsibility.
  • Error seeding is deliberately introducing faults into software to see how well tests find faults.
  • Code style has impacts on code maintainability.
  • Technical review is an assessment of technical outputs (requirements, code, documentation, plans).
  • Walkthrough is similar to inspection where engineers trace inputs through the code.
  • Fagan inspection is a structured review to detect defects.
  • Reporting test failures is a summary of testing issues with what was tested and what the issues were.

Exploratory Testing

  • Exploratory testing is used when specifications are poor or time is limited. It is a semi-structured testing method that helps understand the software.
  • By using different criteria, a researcher can compare techniques based on effectiveness, efficiency, and cost.
  • Review techniques are used to separate and identify types of fault in the software.
  • Quality is an important part of maintaining software as maintaining it efficiently and easily can have an important impact on a project.
  • Stopping testing at a reasonable point is an interesting factor as it is not easy to know when to stop testing effectively and efficiently. Software defects are often assessed as a ratio to the size of the software being tested.

Studying That Suits You

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

Quiz Team

Related Documents

Description

This quiz covers essential concepts in software testing, including structural testing, test coverage, and the significance of test cases. Explore various testing techniques and their importance throughout the software development lifecycle. Ideal for software development students and professionals looking to test their knowledge.

More Like This

Software Testing Essentials Quiz
10 questions
Software Testing II Flashcards
7 questions
Pseudo Code and Testing Concepts
15 questions
Use Quizgecko on...
Browser
Browser