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

Questions and Answers

In the context of software testing, what fundamentally constitutes a 'bug'?

  • A coding error made by a programmer during software development.
  • A state of the software that causes it to crash unexpectedly.
  • A deviation of the actual result from the expected result. (correct)
  • A situation where the software does not meet the exact specifications outlined in the requirements document.

Which of the following most accurately describes the relationship between 'error', 'fault', and 'failure' in software?

  • A 'fault' is a deviation from the expected result, caused by a 'failure' that originated from an 'error'.
  • The terms are interchangeable, and any one can lead to the others in a cyclical manner.
  • A 'failure' leads to a 'fault', which is caused by an 'error'.
  • An 'error' is a human action that leads to a 'fault', which can then cause a 'failure'. (correct)

When is software testing considered complete?

  • Upon achieving 100% test coverage.
  • Software testing is a continuous endeavor, and the probability exists that bugs will be missed by testers. (correct)
  • After all planned tests have been executed.
  • When the project's budget for testing is exhausted.

Why does software often contain bugs despite rigorous development processes?

<p>Software complexity makes it impossible to test every possible scenario or condition. (B)</p> Signup and view all the answers

What is the primary goal of software testing?

<p>To check whether the software matches expected requirements and to make sure that the software is without defects. (D)</p> Signup and view all the answers

Which aspect is NOT typically covered by testing specifications?

<p>Software design documents (A)</p> Signup and view all the answers

What is the primary emphasis of 'User Documentation'?

<p>Giving instructions and guides to install and use the software properly. (C)</p> Signup and view all the answers

Which of the following is not a good objective in software testing?

<p>Prevent all defects. (B)</p> Signup and view all the answers

Which of the following statements about software testing is correct?

<p>Testing is a creative task that can be started before debugging is completed. (B)</p> Signup and view all the answers

Functional testing includes different types of testing. Which of the followings is part of it?

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

What are the different types of non-functional testing?

<p>Performance, Usability and Scalability (D)</p> Signup and view all the answers

Which kind of test is not included in 'Levels of Testing'?

<p>Black box Testing (B)</p> Signup and view all the answers

During white box testing, a tester is examining the following code snippet: if (x > 5) { y = x * 2; } else { y = x / 2; }. Which testing technique is best suited to ensure that both branches of the if statement are executed?

<p>Branch Coverage (C)</p> Signup and view all the answers

Given a scenario where a software application must accept user input between 1 and 100 inclusive, which black-box testing technique is most effective for testing the boundaries of the input?

<p>Boundary Value Analysis (A)</p> Signup and view all the answers

If a software project has frequent changes to requirements leading to several bug fixes and updates, which type of testing is crucial to ensure that previously working functionalities haven't been negatively affected?

<p>Regression Testing (C)</p> Signup and view all the answers

In the context of white-box testing, what does 'statement coverage' primarily ensure?

<p>Each line of code in the program is executed at least once. (C)</p> Signup and view all the answers

What is the focus of black box testing?

<p>Applied for functional and non-functional testing, without reference to the internal structure of the system (B)</p> Signup and view all the answers

When applying the Equivalence Partitioning (EP) technique, how should a tester approach the selection of test data?

<p>Choose test data by dividing the input domain into equivalence partitions and selecting one test case from each partition. (B)</p> Signup and view all the answers

Which of the following statements differentiates SDLC from STLC?

<p>SDLC includes the sequence of activities carried out by Developers to design and develop high-quality software, while STLC consists of a series of activities carried out by Testers methodologically to test the software product. (B)</p> Signup and view all the answers

What is the significance of integration testing?

<p>Testing if the modules are communicating the right way. (C)</p> Signup and view all the answers

What is the goal of White Box testing?

<p>The goal of verifying all the decision branches, loops, and statements in the code. (C)</p> Signup and view all the answers

Which of the following are goals of the test cases?

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

Which of the following is NOT a key objective of testing?

<p>Confirming developer's work. (A)</p> Signup and view all the answers

Why is it important to provide quality products?

<p>To avoid user detecting problems. (C)</p> Signup and view all the answers

In the context of State Transition Testing, what does it mean to 'execute invalid state transitions'?

<p>Verifying that the system correctly handles unauthorized or unexpected state changes. (A)</p> Signup and view all the answers

For the presented code, determine how statement coverage would be achieved:

INPUT A & B
C = A + B
IF C>100
PRINT “ITS DONE”

<p>This can be achieved when testing once. (B)</p> Signup and view all the answers

For the presented code, determine how branch coverage would be achieved:

INPUT A & B
C = A + B
IF C>100
PRINT “ITS DONE”
Else
print “Its Pending”

<p>To achieve this, we need to test TRUE or FALSE in the conditional statement. (C)</p> Signup and view all the answers

Which type of testing is suitable to detect memory leaks?

<p>Performance Testing (C)</p> Signup and view all the answers

What are valid reasons why there will be bugs in SW?

<p>All of the above (D)</p> Signup and view all the answers

What's true about unit testing?

<p>Testing one module in particular. (A)</p> Signup and view all the answers

What's the difference between White box and Black box testing?

<p>In White box tests are based of the code, and Black box tests are solely based on functionality and/or requirements. (B)</p> Signup and view all the answers

What type of documentation do you have?

<p>All of the above (D)</p> Signup and view all the answers

Black box testing techniques consists of which ones?

<p>All of the above (E)</p> Signup and view all the answers

Which of the following is NOT a purpose of testing?

<p>To demonstrate correctness (A)</p> Signup and view all the answers

Which is NOT considered testing levels?

<p>Functional Testing (B)</p> Signup and view all the answers

Which best explains the V model?

<p>Shows relationship of development and testing (B)</p> Signup and view all the answers

In White box testing, what ensures maximum coverage?

<p>Branch coverage to ensure maximum coverage (B)</p> Signup and view all the answers

Flashcards

What is Software Testing?

Software Testing is a method to check if the software matches expected requirements and is defect-free.

Why is Testing Important?

Testing finds defects, confirms user needs, averts problems, and delivers quality products.

What is a Bug?

Bugs are deviations of the software's actual result from the expected result.

What is a Error in SW?

An error is a human action that produces an incorrect result, leading to a fault.

Signup and view all the flashcards

What is a Bug in SW?

The presence of error at the time of execution of the software.

Signup and view all the flashcards

What is a Fault in SW?

State of software caused by an error.

Signup and view all the flashcards

What is Failure in SW?

Deviation of the software from its expected result. It is an event.

Signup and view all the flashcards

Black box vs White box testing?

Black box testing tests functionality without internal knowledge. White box testing requires knowledge of internal design and code.

Signup and view all the flashcards

What is Black Box Testing?

Black box testing is applied for functional and non-functional testing, without reference to the internal structure of the system.

Signup and view all the flashcards

Equivalence Partitioning and Boundary Value Analysis?

Equivalence partitioning divides input data into valid and invalid partitions. Boundary value analysis tests at the edges of these partitions.

Signup and view all the flashcards

Decision Table Testing

Examine input combinations and their corresponding system behaviors using tables.

Signup and view all the flashcards

What is White Box Testing?

The goal of white box testing in software engineering is to verify all the decision branches, loops, and statements in the code.

Signup and view all the flashcards

What is SDLC?

SDLC is Software Development Life Cycle. It is the sequence of activities carried out by Developers to design and develop high-quality software.

Signup and view all the flashcards

What is STLC?

STLC is Software Testing Life Cycle. Consists of activities carried out by testers to methodologically test the your software product.

Signup and view all the flashcards

What is objective of software testing?

Ensure requirement alignment with customer.

Signup and view all the flashcards

Why define defects?

Defects are defined so that they may be prevented..

Signup and view all the flashcards

What is a Defect?

A defect will cause the program to stop working or cause it to work incorrectly.

Signup and view all the flashcards

What is User Documentation?

Documentation about how to use the software.

Signup and view all the flashcards

What is Technical Documentation?

Documentation with the software's internal information

Signup and view all the flashcards

What does software testing do?

Testing checks that the actual software matches expected requirements

Signup and view all the flashcards

Why Software has Bugs?

Miscommunication, time pressure, programming mistakes and changing requirements

Signup and view all the flashcards

Why is testing important?

Testing find and correct defects, check user needs and provide quality

Signup and view all the flashcards

Error free software

The testers must ensure 100% working, but there will always be tests missed

Signup and view all the flashcards

Areas of Software Testing

Functional, non-functional and maintenance are key areas of sw testing

Signup and view all the flashcards

Functional Testing types?

Integration, unit, and UAT

Signup and view all the flashcards

Non-functional Testing Types?

Scalability, usability, performance

Signup and view all the flashcards

Maintenance Testing Types?

Regression and maintenance

Signup and view all the flashcards

Black box testing

Program design not needed; requirements and functionality.

Signup and view all the flashcards

White box testing

Testing internal program design and the code.

Signup and view all the flashcards

What are Test cases objectives?

Happy and Bad scenarios

Signup and view all the flashcards

Study Notes

Agenda

  • The topics include: Software, testing, bugs, errors, software engineering, levels, methodology, SDLC, STLC, and the V model.

Documentation Types

  • User Documentation
  • Technical Documentation
  • Marketing Documentation

What is Software Testing

  • Software Testing is a method to check whether the actual software product matches expected requirements and to ensure the software product is defect-free.

Why Testing is Important

  • Testing is important to find and correct defects.
  • Testing is important to check whether the user's needs are satisfied.
  • Testing is important to avoid users detecting problems.
  • Testing is important to provide quality products.

Objectives

  • Ensure the requirement matches what the customer needs.
  • Define defects.
  • Prevent defects.
  • Ensure best quality.
  • Generate high-quality test cases.

Why Software has Bugs

  • Software has bugs due to miscommunication or a lack of communication.
  • Lack of clarity about what an application should or shouldn't do contributes to bugs.
  • Time pressure can cause bugs.
  • Programming Mistakes can cause bugs.
  • Changing Requirements can cause bugs.

Software Testing Misunderstanding

  • Testing is not debugging.
  • Testing would still be necessary even if programmers were more careful.
  • Testing activities should start before the coding is complete.
  • Testing never ends.
  • Testing is a creative task.
  • Manual testing is not the only option.

What is a Bug and How to Find Bugs

  • A Bug is the deviation of the actual result from the expected result.

Types of Errors in Software

  • An Error is a human action that produces an incorrect result that results in a fault.
  • A Bug is the presence of an error at the time of execution of the software.
  • A Fault is a state of software caused by an error.
  • A Failure: Deviation of the software from its expected result; it is an event.
  • A fault/bug refers to when code intended to square a number, instead multiplies it by 2.
  • For the integer 2 the code gives the correct result of 4.
  • For the integer 3 the code gives the incorrect result of 6, which is a failure.

Testing Specification

  • This section refers to test cases

Software Free Error

  • Testers must ensure that 100% of the software is working fine and error-free.
  • There is always the probability that bugs will be missed by testers.
  • Testing cannot cover 100% of the possibilities of how software can operate.

Types of Software Testing in Software Engineering

  • Functional Testing: Unit Testing, Integration Testing, UAT (user accepted testing)
  • Non-Functional Testing: Performance, Usability, Scalability
  • Maintenance: Regression, Maintenance

Testing Methodology

  • Black box testing: does not need knowledge of internal program design and tests are based on requirements and functionality.
  • White box testing: needs knowledge of the internal program design and code, and tests are based on coverage of code statements, branches, paths, conditions.

Black box testing techniques

  • Equivalence Partitioning (EP): If the range of data is between 1 and 100, then print 'Pass'.

  • Boundary value analysis (BVA): If the range of data is between 1 and 100 (inclusive), then print 'Pass'.

  • Boundaries: Find the lower and upper boundaries

  • Testing: Test one value above and below the boundaries

  • Application: Applicable for numeric fields and date

  • Decision Table Testing

  • Used to test system behavior for different input combinations.

  • Decision Table: A tabular representation of inputs versus rules/cases/test conditions.

  • State Transition Testing

  • Used in which outputs are triggered by changes to the input conditions.

  • Designed to execute valid and invalid state transitions.

White box testing techniques

  • Verifies all the decision branches, loops, and statements in the code.

  • Statement Coverage: would only need one test case to check all the lines of the code.

  • Consider TestCase_01 to be (A=40 and B=70), then all the lines of code will be executed.

  • Consider INPUT A & B, C = A + B, IF C>100, PRINT "ITS DONE"

  • Branch Coverage: evaluates the "FALSE" conditions and ensures maximum coverage.

  • TestCase_01: A=33, B=45; TestCase_02: A=25, B=30

  • Consider INPUT A & B, C = A + B, IF C>100, PRINT "ITS DONE", ELSE print "Its Pending" if C is not over 100

  • Path Coverage: tests the complex code snippets and involves loop statements or a combination of loops and decision statements.

  • Use 4 test cases to ensure maximum coverage.

  • Consider INPUT A & B, C = A + B, IF C>100, PRINT “ITS DONE”, END IF, IF A>50, PRINT "ITS PENDING", END IF

  • TestCase_01: A=50, B=60; TestCase_02: A=55, B=40; TestCase_03: A=40, B=65, TestCase_04: A=30, B=30

Test Cases Objectives

  • Test to pass (Happy scenario): Assures that the software minimally works and applies simple and straightforward test cases.
  • Test to fail (Bad scenario): Chooses test cases to reveal weaknesses in the software by designing test cases with the sole purpose of breaking the software.

SDLC and STLC

  • SDLC (Software Development Life Cycle) is the sequence of activities carried out by Developers to design and develop high-quality software.
  • STLC (Software Testing Life Cycle) is a series of activities carried out by Testers methodologically to test a software product.

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