Testing Flashcards

1
Q

What is testing?

A

Set of static and dynamic activities that involve planning, preparing and evaluating a software product to ensure that it meets the requirements. This is done to detect defects and show that the product is fit for purpose.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the objectives of testing?

A
  1. Find defects
  2. Evaluate if the product is fit for purpose
  3. Provide information for decision making
  4. To prevent the same defects from appearing in the future
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is static testing?

A

It is a form of testing that tests the code without actually executing the code.

https://www.cprime.com/resources/blog/static-testing-what-you-need-to-know/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some static testing methods?

A
  1. Code reviews
  2. Code static analysis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is dynamic testing?

A

Testing that involes the execution of code that is being tested

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some dynamic testing examples?

A
  1. Unit testing
  2. Integration testing
  3. System testing

Basically any form of test that requires the code to be executed for it to be evaluated and tested.

https://www.geeksforgeeks.org/software-testing-dynamic-testing/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the principals of testing?

A
  1. Testing highlights defects
  2. Exhaustive testing is impossible
  3. Early testing
  4. Defect clustering
  5. Pesticide paradox
  6. Testing is context dependent
  7. Absence of errors fallacy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the main levels of testing?

A
  1. Component testing
  2. Integration testing
  3. System testing
  4. Acceptance testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is component testing?

A
  • This is mainly done by the developer
  • Uses debugging tools or testing frameworks like JUnit
  • The specification/requirements regarding the component are considered when designing the test cases
  • Focus on testing appropriate functional and non-functional aspects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is integration testing?

A
  • This is done by dedicated testers
  • After testing the individual components, this test is done to ensure that dependent components can interact with each other correctly.
  • This is done to highlight interfacing issues between dependent components
  • Need to consider the system design, use cases, system architecture, etc when designing test cases
  • Focus on testing appropriate functional and non-functional aspects
  • It is better to perform this test incrementally (top-down, etc.) instead of integrating all components at the same time and testing them (big bang) since this can make it harder to identify defects.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is system testing?

A
  • This is done by an independent test team
  • Tests the entire system (with all of its components, etc.)
  • Focuses on ensuring if the system can meet the requirements
  • Need to consider use cases, system and software requirements, functional specifcation, risk analysis reports, etc. when desiging test cases.
  • The test environment must resemble the production environment
  • Need to test functional, non-functional and data quality aspects
  • Need to use most appropriate testing techniues when testing the differetn aspects… Typically a black box test is performed to evaluate the functional requirements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is acceptance testing?

A
  • Usually performed by the customer, users or other related stakeholders
  • This tests the system to ensure that it meets the acceptance criteria and that the customer can accept the final product
  • Main forms of this test include (1) user acceptance testing, (2) operational acceptance testing, (3) contract & regulation acceptance testing and (4) alpha and beta testing
  • Must consider user requirements, system requirements, business processes, use cases, and risk analysis reports when testing
    - Objective is not to mainly find defects, but to establish confidence in the system to ensure it is ready for deployment.
  • This test can occur in various stages of the development life cycle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is alpha testing?

A
  • This is a type of acceptance test
  • Performed by development organization/entity (not development team)
  • Done to find last minute defects and evaluate the system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is beta testing?

A
  • This is a type of acceptance test
  • Performed by external entity like customers
  • Done to find last minute defects and evaluate the system by obtaining feedback from the end-user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is regression testing?

A

A test that is performed to check whether previously tested and working code has been broken or negatively impacted by recent code changes.

Can be performed by QA testers or even developers at times.

https://www.geeksforgeeks.org/software-engineering-regression-testing/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is stress testing?

A
  • Type of performance testing
  • Test performed to evaluate the robustness (how available, stable, reliable, etc.) of the system under a load that is well above that of its normal usage.
  • Helps to highlight risky areas of the system
  • Communicates how the system will perform under a heavy load.
  • Communicates how the system handles errors and recovers from failures
  • Mainly performed by QA testers

https://www.geeksforgeeks.org/stress-testing-software-testing/

17
Q

What is a test condition?

A
  • This is a something (event/item) that you want to verify using a test case(s)
  • It is basically like a condition that you use in your test cases
  • This is part of the test development process

Example: To demonstrate that the date of birth is stored as CCYYMMDD

18
Q

What is a test case?

A
  • This is used to evaluate a test condition
  • Consists of (1) inputs, (2) any pre-conditions, (3) expected results and (4) any post-conditions.
  • This is part of the test design process
  • ## You also design the test data along with test cases
19
Q

What is a test precedure?

A
  • It is a set of clear instructions on how to execute a test case.
  • Documented in the test procedure specification
  • Contains any automated test scripts for the test case
20
Q

What is a test execution schedule

A
  • This is a schedule that conveys who, when and in what order the test procedures (and any scripts included) must be executed
  • Must take into account regression tests, prioritization and technical and logical dependencies
21
Q

What are test design techniques? (remember, test design is about designing test cases and test data)

A
  • Black box techniques (specification-based techniques)
  • White-box techniques (structure-based/structural techniques)
  • Experience-based techniques
22
Q

What is the objective of white box testing?

A
  • ## To test the logical structure of a component/system
23
Q

What is the objective of black-box testing?

A
  • Here we don’t consider the internal structure of the component/system. We only do this to ensure if the component/specification provides the correct output.
24
Q

What are some black-box testing techniques?

A
  • Equivalence Partitioning (EqP)
  • Boundary Value Analysis (BVA)
  • Decision Table Testing
  • State Transition Testing
  • Use case testing
  • Syntax testing
25
Q

What is EqP?

A
  • A black box technique
  • Based on the test basis (requirements, etc.), facts of the test object like inputs, outputs, time based events are identified
  • These factors are classified into equivalence paritions (aka equivalence classes) based on whether they will be processed/handled similarly
  • Done to reduce the number of test cases required by identifying representative values for each partition.
  • To ensure coverage of all possible input types, including valid and invalid data.

https://www.youtube.com/watch?v=4ckZYRvDzLU

EqP stands for Equivalence Paritioning

26
Q

What is BVA

A
  • This complements EqP by mainly focusing on using the values at the inner edges (boundary) of the equivalence paritions
  • Such values are used since they kind of represent edge cases and are more likely to expose defects

BVA stands for Boundary Value Analysis

27
Q

What is decision table testing

A
  • Testing method that highlights all the conditions of the system and the resulting actions
  • Conditions can be business logic related conditions
  • Represented as a table
  • Each column represents a business rule
  • Shows all the main conditions that might get missed out when testing without a decision table
28
Q

What is state transition testing?

A
  • A system has a finite no. of separate and identifiable states
  • It shows all the states of the system
  • It shows the events that are intended to change states
  • It shows the results of state changes
  • Allows testers to design test cases that (1) test all states, (2) tests all transitions, (3) to test invalid transitions, etc.
29
Q

What is use case testing?

A
  • Use cases are used to represent the major (most likely real-world scenarios) events between actors/use cases in the system. These can be used to design test cases that test for defects in the main flow of the system
  • can also help in integration testing to test the interface between dependent use cases
30
Q

What is statement testing?

A
  • This test helps to design test cases to test the statements within the test code and obtain a high test coverage.
  • The statement coverage = no. of statements covered by test case / total statements in code to be tested
  • Aim is to create test case(s) that cover all the statements in the code to be tested (100% statement coverage)
31
Q

What is decision testing?

A
  • Type of control flow testing
  • Focuses on covering all decision paths in the code being tested
  • Decision coverage = no. of decision paths covered by test case / 2 * total no. of decision paths in test code
  • 100% decision coverage= 100% statement coverage. But not vice versa
32
Q

What is cyclomatic complexity?

A
  • A quantitative measure of the no. of independent paths (unique decision paths) in a code sample
  • A control flow graph is analysed to determine the complexity

https://www.geeksforgeeks.org/cyclomatic-complexity/
https://www.youtube.com/watch?v=9RvUj1Psqgk

33
Q

How do you calculate the cyclomatic complexity?

A

cyclomatic complexity = no. edges in the graph - no. of nodes in the graph + 2 (M = E - N + 2)

34
Q

What does a cyclomatic complexity communicate?

A
  • The complexity of the code
  • The require number of test cases to obtain complete branch coverage