Podcast
Questions and Answers
Which of the following is the primary goal of software testing?
Which of the following is the primary goal of software testing?
- To demonstrate that software is error-free.
- To increase the lines of code written by developers.
- To ensure the software meets the aesthetic preferences of the end-users.
- To identify defects or bugs in the software. (correct)
A software fault, often referred to as a 'bug' or 'defect,' is best described as which of the following?
A software fault, often referred to as a 'bug' or 'defect,' is best described as which of the following?
- An erroneous software or hardware element causing system failure. (correct)
- An unexpected delay in project completion.
- An erroneous hardware component causing system failure.
- An intentional feature added to improve user experience.
What is the main difference between testing conducted haphazardly and testing conducted systematically?
What is the main difference between testing conducted haphazardly and testing conducted systematically?
- Haphazard testing guarantees more comprehensive coverage.
- Systematic testing is cheaper to implement.
- Haphazard testing requires less documentation.
- Systematic testing is guided by a plan, while haphazard testing relies on random trial and error. (correct)
In Test-Driven Development (TDD), what is the initial step in the 'Red-Green-Refactor' cycle?
In Test-Driven Development (TDD), what is the initial step in the 'Red-Green-Refactor' cycle?
What is the primary purpose of the 'Green' phase in the TDD 'Red-Green-Refactor' cycle?
What is the primary purpose of the 'Green' phase in the TDD 'Red-Green-Refactor' cycle?
After the test case passes, what is the main goal of the 'Refactor' step in the TDD cycle?
After the test case passes, what is the main goal of the 'Refactor' step in the TDD cycle?
According to the principles of Test-Driven Development (TDD), which of the following should a developer NOT do?
According to the principles of Test-Driven Development (TDD), which of the following should a developer NOT do?
Which of the following is a key benefit of Test-Driven Development (TDD)?
Which of the following is a key benefit of Test-Driven Development (TDD)?
Which of the following is considered an example of a test case?
Which of the following is considered an example of a test case?
Why is it generally impossible to completely test any non-trivial system?
Why is it generally impossible to completely test any non-trivial system?
What is the goal when designing test cases?
What is the goal when designing test cases?
In the context of software testing, what is the significance of 'test coverage'?
In the context of software testing, what is the significance of 'test coverage'?
Which type of testing explores the input space of functionality defined by an interface specification?
Which type of testing explores the input space of functionality defined by an interface specification?
What is the focus of White-box testing?
What is the focus of White-box testing?
Which level of testing focuses on verifying that the software meets the needs of its users and stakeholders?
Which level of testing focuses on verifying that the software meets the needs of its users and stakeholders?
A team is developing a system where each component is tested individually before being combined. What type of testing is this?
A team is developing a system where each component is tested individually before being combined. What type of testing is this?
Which of the following refers to testing how different components of a system work together?
Which of the following refers to testing how different components of a system work together?
What does System Testing (end-to-end) primarily evaluate in a software application?
What does System Testing (end-to-end) primarily evaluate in a software application?
Which type of testing is concerned with non-functional requirements such as security, usability, performance, and scalability?
Which type of testing is concerned with non-functional requirements such as security, usability, performance, and scalability?
Which of the following best describes Installation testing?
Which of the following best describes Installation testing?
Which of the following testing techniques divides the input data into groups and tests one or more scenarios from each?
Which of the following testing techniques divides the input data into groups and tests one or more scenarios from each?
What is the assumption made during equivalence testing?
What is the assumption made during equivalence testing?
What is the purpose of boundary value analysis in the context of software testing?
What is the purpose of boundary value analysis in the context of software testing?
What is the main goal of control-flow testing?
What is the main goal of control-flow testing?
Why is 100% statement coverage not sufficient to ensure 100% edge coverage?
Why is 100% statement coverage not sufficient to ensure 100% edge coverage?
In State-based testing, what does the term 'state' refer to?
In State-based testing, what does the term 'state' refer to?
Which of the following is NOT a type of state-based coverage?
Which of the following is NOT a type of state-based coverage?
What does Unit testing ensure?
What does Unit testing ensure?
What is the purpose of mock-objects in Unit testing?
What is the purpose of mock-objects in Unit testing?
What is tested in Integration Testing?
What is tested in Integration Testing?
Which integration testing approach links units at once?
Which integration testing approach links units at once?
Why is Big Bang Testing typically avoided?
Why is Big Bang Testing typically avoided?
When is Bottom-up testing typically used?
When is Bottom-up testing typically used?
What is most frequently used to test top level systems?
What is most frequently used to test top level systems?
Which integration testing method combines top-down and bottom up approaches?
Which integration testing method combines top-down and bottom up approaches?
What is the primary goal of testing a module with front end component testing?
What is the primary goal of testing a module with front end component testing?
What testing evaluates component responsiveness and efficiency?
What testing evaluates component responsiveness and efficiency?
Which Integration Testing focuses on testing layers of a system?
Which Integration Testing focuses on testing layers of a system?
What is the testing strategy of vertical integration testing
What is the testing strategy of vertical integration testing
What is the primary goal of continuous integration?
What is the primary goal of continuous integration?
A large portion of Continous intergration is which of the following?
A large portion of Continous intergration is which of the following?
During quality tests, what is tested when running a compability test?
During quality tests, what is tested when running a compability test?
Flashcards
Software Testing
Software Testing
The process of evaluating a software solution to ensure it behaves as expected and meets the requirements, involving controlled conditions and identifying defects or bugs.
Bug (or Fault/Defect)
Bug (or Fault/Defect)
An erroneous software or hardware element that can cause a system to fail.
Test-Driven Development (TDD)
Test-Driven Development (TDD)
A software development approach where tests are written before the actual implementation code.
Write a failing test (Red)
Write a failing test (Red)
Signup and view all the flashcards
Write code to pass test (Green)
Write code to pass test (Green)
Signup and view all the flashcards
Refactor the code (Refactor)
Refactor the code (Refactor)
Signup and view all the flashcards
Fault/Defect
Fault/Defect
Signup and view all the flashcards
Test Case
Test Case
Signup and view all the flashcards
Test
Test
Signup and view all the flashcards
White-box Testing
White-box Testing
Signup and view all the flashcards
Black-box Testing
Black-box Testing
Signup and view all the flashcards
Coverage
Coverage
Signup and view all the flashcards
Test Coverage
Test Coverage
Signup and view all the flashcards
Code Coverage
Code Coverage
Signup and view all the flashcards
Equivalence Testing
Equivalence Testing
Signup and view all the flashcards
Boundary Testing
Boundary Testing
Signup and view all the flashcards
Control-flow Testing
Control-flow Testing
Signup and view all the flashcards
State-based Testing
State-based Testing
Signup and view all the flashcards
State
State
Signup and view all the flashcards
Event
Event
Signup and view all the flashcards
Action
Action
Signup and view all the flashcards
Transition
Transition
Signup and view all the flashcards
Guard
Guard
Signup and view all the flashcards
Unit
Unit
Signup and view all the flashcards
Unit Testing
Unit Testing
Signup and view all the flashcards
Test Driver
Test Driver
Signup and view all the flashcards
Test Stub
Test Stub
Signup and view all the flashcards
Integration Testing
Integration Testing
Signup and view all the flashcards
Big Bang integration
Big Bang integration
Signup and view all the flashcards
Bottom-up testing
Bottom-up testing
Signup and view all the flashcards
Top-down testing
Top-down testing
Signup and view all the flashcards
Sandwich testing
Sandwich testing
Signup and view all the flashcards
Front-end component testing
Front-end component testing
Signup and view all the flashcards
Integration Testing
Integration Testing
Signup and view all the flashcards
Snapshot Testing
Snapshot Testing
Signup and view all the flashcards
End-to-End Testing
End-to-End Testing
Signup and view all the flashcards
The smallest possible part of a system.
The smallest possible part of a system.
Signup and view all the flashcards
Continuous Integration
Continuous Integration
Signup and view all the flashcards
System Tests
System Tests
Signup and view all the flashcards
Functional testing
Functional testing
Signup and view all the flashcards
Study Notes
Software Testing Basics
- Software testing is the process of evaluating a software solution to ensure it behaves as expected and meets specified requirements.
- It involves executing software under controlled conditions and assessing its behavior to identify defects or bugs.
- A fault, referred to as a bug or defect, is an erroneous software or hardware element in a system that can cause the system to fail.
- Software testing identifies defects, ensures quality, validates requirements, and improves user experience.
- Software testing helps identify defects/bugs, functionality/performance errors, or interface inconsistencies.
The Importance of Testing
- Testing ensures the software meets quality standards and stakeholder requirements, providing reliable and robust products for end-users.
- Testing verifies the software behaves according to specifications and meets user/stakeholder needs.
- Testing enhances the software's overall user experience.
- Testing shows the presence of bugs, not the absence; 100% certainty that software is bug-free is unattainable, but proper testing methodology assists in getting very close.
- The tests should be conducted with a systematic plan instead of random trial and error
Test-Driven Development (TDD)
- Test-Driven Development (TDD) involves writing tests before writing the actual implementation code.
- The first principle of TDD: Every step requires a plan to verify the result meets a goal.
- The second principle of TDD: A software artifact shouldnt be created unless the developer can test it.
- TDD follows the "Red-Green-Refactor" cycle:
- First, write a failing test case that specifies the desired behavior/functionality of the code (Red).
- Then, write the minimal code necessary to pass the test (Green).
- Finally, refactor the code to improve design, readability, and maintainability while keeping tests passing.
- TDD is an iterative process where, after refactoring code, the cycle repeats with modifications to existing tests of additional test cases.
TDD Benefits
- Improved code quality
- Reduced bugs
- Faster feedback loop
- Better documentation
Key Definitions
- A fault/defect/bug is an erroneous hardware/software element that can cause system failure.
- Test case: A particular choice of input data for testing a program, including the expected output/behavior.
- Test: A finite collection of test cases.
- White-box testing: Testing that exploits the internal structure of a program, assuming code is available.
- Black-box testing: Testing that explores the input space of functionality defined by an interface specification.
Why Testing is Hard
- Nontrivial systems cannot be completely tested, and the goal is to find faults as quickly and inexpensively as possible.
- The ideal is to create a single test case that exposes each fault and runs it, but in practice many unsuccessful test cases may be necessary.
- Testing strikes a balance between maximizing test coverage and minimizing economic costs.
- The idea is that correct behavior on "critical" test cases represents the correct behavior on untested parts of the state space.
Logical Organization of Testing
- Testing can be organized a white box or black box.
- White box is the internal structure, design, and code being tested.
- With white box, the internal workings of the system are transparent to the tester.
- Quality testing, the software system is tested from an end-user perspective
- Whereby The internal workings of the system are hidden from the tester.
- White box is the internal structure, design, and code being tested.
- The testing may include unit test, integration testing, system test, function, quality acceptance, installation testing
- Note the orders are not necessarily strict
Unit Testing
- Unit Testing applies to the smallest part of the system - aka the unit , which is independently tested.
- Unit is sometimes referred to as a fixture.
- To test a unit in isolation mock objects which refers to components external to the unit are created.
- They are created as a test driver - simulating parts of a system that invoke operations.
- Unit testing cycle - consists of The unit
- Create the unit, test, driver and test stub(s) and have the test driver invoke an operation on the unit that ensures expected results.
Test Cases
- Acceptance test: A black-box testing approach, which includes:
- Testing with a valid key of a current tenant on their apartment (pass).
- Testing with a valid key of a current tenant on someone else's apartment (fail).
- Testing with an invalid key on any apartment (fail).
- Testing with the key of a removed tenant on their previous apartment (fail).
- Testing with the valid key of a newly added tenant on his/her apartment (pass).
Testing Granularity
- Unit Testing: Smallest possible part of a software or system is tested individually and independently.
- Integration Testing: Tests how different components of a system interact with each other and operate together.
- System Testing (end-to-end): The complete system or integrated set of components is tested to verify it satisfies specified requirements and performs as expected as a whole.
- Functional Testing: Tests the system or component which verifies it meets the specified functional requirements.
- Quality Testing: Non-functional testing that evaluates security, performance usability etc
- Acceptance Testing: The customer verifies the requirements have been met.
- Installation Testing: That tests the way the system works and its intended operations and deployment.
Coverage
- Coverage: The degree to which testing has been exercised by tests.
- Test Coverage (AKA Big picture): Focuses on the specifications and checks testing of the input without checking the other parts.
- Code Coverage (Implementation details): Code of coverage Degree to which the program source code has been tested.
Heuristics for High Testing Coverage
- Some tests can more easily pinpoint problems than others, and test cases should be prioritized.
- Equivalence Testing (Mostly Black-box testing)
- It is a testting method that divides all possiblie inputs into an equivalence group
- Boundary Testing (Mostly Black-box testing)
- Test the bounds of the inputs
- Control-flow Testing (Mostly White-Box testing)
- State-based Testing (Mostly White-Box testing)
Equivalence
- A black-box testing method
- Divides the input of all possible classes for the system to behave on each same input from the same group
- Assumes the developer may have made mistakes on classes of the input values.
- The steps are;
- Partitions what's needed inside the inputs in valid equivalence classes.
- One or more inputs from each equivalence
Heuristics for finding equivalence classes
- Specified over a range with a Boolean value or not
- Partition that makes two values equivalent
Boundary Testing
- AKA Boundary Value analysis
- It is part of a special case of Equivalence as it touches on the input parameters.
- Such that Developers fail to see the special cases at the boundary of equivalence classes.
- Selects inputs from edges of each class or outliers such as zeroes or mins.
Control-Flow Testing
- Organizes testing based on the control flow of the software and its white box.
- The goal to draw a control flow graph to that every statement has a node and transition between edge statements
- In order to measure the code, we use code coverage.
Types of code coverage
- Statement coverage
- Edge coverage
- condition coverage
- Path coverage
State-Based Testing
- Defines a testing method and abstracts the behavior by abstracting object
- It testing behavior by comparing actual states of expected states.
- Usually is used with Object-Oriented Programming but may be incomplete.
- The state of an object defines it values of attributes and an object may be unit tested even without the values.
State-Based Testing Components
- State is a constraint on a values of an objects attribues.
- Event is an input given to the a system.
- Action is a result output or operation with the event.
- Transition is a chance of state caused by the event.
- Guard is a condition with an event which depends on the transition.
Test Cases
- It includes all the relevant event:
- What happens if the User entered a valid key
- What happens if the User entered an invalid key
State-Based Faults (Control)
- Missing transitions
- Incorrect Transitions
- Inconsistent State transitions
- Loping and infinite Transitions
- Missing/Incorrect Actions Actions
- Traps and paths
- Deadlocks and Livelocks
Integration Testing
- Testing the integration of multiple functions together.
- Includes Big Bang Integration - which unites multiple systems together.
- Should not do as this should mean to test the faults only at the whole system. -Includes Bottom testing - lower testing as it relies on top-level execution simulation.
- Good as a disjoint subsytem tested.
- Includes Top testing - as the lower levels simulte.
- Good in terms of functional component
- Includes Big Bang Integration - which unites multiple systems together.
Horizontal Integration Testing
- Assuming a test can be assumed.
Vertical Integration Testing
- Test all components to realis a stories which include the use of inter feedback and outter feedback.
Continous integration
- Software dev has the code integrated into a shared, which trigger build process.
Continous Integration (CI)
- Running test is big part of Continious Integrations
- Every time as built the run of;
- Unit test as a change component.
- Regression test on the change component
- Runs integration test.
Front End Component Testing
- Tests an individual element (UI) or interafce on the website.
- It unit tests.
- Uses integration
- The tool used can snapshot and ensure accessibilty
- Some even ensure performance test.
Setup Tools For Testing
- Includes Tools related to;
- Testing Framework
- Assert Library
- Hedless Browsers
System Tests
- Quality testing that ensures backwards campatibility
- Followed by attempt to violate test.
- Testing the limits as a measure to see how the system. Acceptance Testing - tests on an development enviroment to get a realistic test in a enviroment. Testing is an art and a science, can hardily guarentee a bug, but tools help make the bugs tractable.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.