Software Testing Flashcards

1
Q

Why do we test software?

A

Validation Testing

Defect Testing

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

Validation Testing?

A

Demonstrate that software meets requirements
Test the main success scenario of each use case
Test the main use-case extensions

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

Defect Testing?

A

Find defects by finding inputs where the software behaviour is incorrect
Test use-case extensions that define error handling
Test how the system operates
Test the boundaries

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

What does testing identify?

A

Deficiencies in requirements, design and implementation

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

Why is Validation needed?

A

Software needs to be demonstrated to be suitable

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

When is Validation performed?

A

Throughout the entire development process, not an end-of-cycle activity

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

Why is Verification Testing needed?

A

Have the software for completeness, does it deliver on all its functional and non-functional requirements

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

inputs causing?

A

anomalous behaviour

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

outputs which reveal?

A

the presence of defects

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

Methods of verifying and validating software?

A

Inspection and Reviews

Testing

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

Inspection and Reviews?

A

Software process artifacts are being statically analyzed for the purpose of being verified and validated

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

Types of Testing?

A

Development Testing
Release Testing
User Testing

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

What is Development Testing?

A

Conducted by software developers as part of the development process

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

What is Release Testing?

A

Conducted by independent testing teams that verifies and validates that the integrate software is correct

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

What is User Testing?

A

Conducted by users or pseudo-users to validate that software is suitable

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

What is Software Inspection?

A

In-depth, errors do not cover
Does not need running code, not complete code
Economical because it does not require any additional test harness
Very effective, 60%-90% of errors

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

Debugging Code?

A

Development activity aimed at solving bugs/issues discovered through software testing
Integral part of software development
Debugging is a critical validation and inspection activity

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

Limitations of Software Inspection?

A

A manual process which prevents regression verification
Hard to inspect complex runtime conditions
Expensive process

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

Complex Runtime Conditions?

A

Unexpected interactions between components
Timing problems
Performance issues

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

Factors that influence the breadth and depth of validation and testing activities include?

A

Software Purpose
User Expectations
Market Environment

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

Unit Testing?

A

Development testing that verifies the functionality of objects and their methods

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

Types of Development Testing?

A

Unit Testing
Component (Interface) Testing
System Testing

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

In agile processes, testing is seen as the?

A

Driving force of the development process through Test Driven Development

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

What does Unit Testing do?

A

Verifies the functionality implemented in objects and their methods by testing all possible states, inputs and outputs
Units are tested in isolation
Automated using unit test framework

25
Q

Unit Testing Frameworks?

A

JUnit
XCTest
Nunit, MSTest, VSTest, xUnit
Mocha, Unit.js

26
Q

Anatomy of a Unit Test?

A
Implemented as a test class with test methods
Test classes represent a cohesive concern of testing one unit
27
Q

Test Methods are organized as follows:

A

Setup (Arrange) Part
Call (Act) Part
Assertion Part

28
Q

Setup (Arrange) Part?

A

Initializes the variables to be used in the test and the list of inputs that will be used
Uses mocks and dependency injection to isolate the component to test

29
Q

Call (Act) Part?

A

Invoke the method being tested the input and environment that has been setup

30
Q

Verification (Assert) Part?

A

Use asserts to compare the result obtained with the expected results and determine the outcome of the test

31
Q

Writing Effective Unit Tests?

A

Determining inputs to be used in unit tests
Partition testing
Guideline-based Testing
Know how much of the code is tested

32
Q

Determining Inputs to be used in unit tests?

A

Choose inputs to reflect normal operation

Choose abnormal inputs to reflect error conditions

33
Q

Partition Testing?

A

Identify groups of inputs with similar behaviour
Test input in the middle of the partition
Test inputs as the boundaries of the partition

34
Q

Unit Testing Guidelines?

A

Single element or no element
Different sizes of collections
First, middle, and last element
Choose inputs that force all error messages

35
Q

Component Testing?

A

Several units are integrated to create a component whose functionality is exposed via interfaces
Interface errors

36
Q

Types of interfaces in Component Testing?

A
  • Methods / Procedure based interface
  • Messaged passing interfaces
  • Shared memory interfaces
37
Q

Interface Errors?

A

Interface Misuse

Timing Errors

38
Q

Interface Misuse?

A

Wrong parameters, calling methods in the wrong order, incorrect state

39
Q

Timing Errors?

A

Prevalent with shared memory and message passing interfaces

40
Q

Component Testing Guidelines?

A

Test the boundaries of interaction with external components
Test arguments just like in a unit test
Testing calling methods in different order and in different states
Stress testing for speed, memory and number of messages

41
Q

System Testing?

A

Components are integrated with each other and with external systems to form the system
Some errors only occur when the entire system is integrated and this is what system testing aims to verify it
Use-case based testing is used to verify the main success scenario

42
Q

System Testing Guidelines?

A

Exhaustive testing not possible/practical
All system functions accessible through menus and UI elements must be tested
Combinations of functions must be determined and tested
Never wait until the end to system test a product

43
Q

Software Testing Process? (Graph)

A

Design test cases
Prepare test data
Run program with test data
Compare results to test cases

44
Q

Test-Driven Development?

A

The most enduring and generalizable practice in (Extreme Programming)
Can be practiced in both Agile and Plan-Based processes
Emphasizes the testability of he system

45
Q

TDD Benefits?

A
Code coverage
Regression testing
Effective and constant refactoring
Effective debugging
Provides elements of requirements analysis and design that leverage only coding
46
Q

TDD Limitations?

A

Not an alternative to requirements analysis
Not an alternative to software architecture and software design and modeling
Hard to use for component and system testing for large enough systems
Hard to use when system uses legacy code or large components

47
Q

Release Testing?

A

Black-box testing using tests derived from the software requirements
Release testing is done by QA team. Must be objective and independent.
Validation testing to demonstrate system meets requirements.

48
Q

Goal of Release Testing?

A

Ensure the system is ready to be delivered to customers and or users

  • Functionality
  • Performance
  • Dependability
  • Robustness
49
Q

How to Conduct Release Testing?

A

Requirements-Based Testing

Scenario-Based Testing

50
Q

Requirement-Based Testing?

A

Requirements should be testable
Consider each requirements and derive a set of tests for it
Demonstrates the system has properly implemented its requirements
Traceability records demonstrates that all requirements have been tested

51
Q

Scenario-Based Testing?

A

Uses real-world usage scenarios when neither use-cases nor stories were used in requirements definition
Release testers run through the scenario using the system to validate the system responds accordingly

52
Q

Performance Testing?

A

Validate that the system can process the intended load
Increase the load on the system until the system performance is unacceptable
Stress Testing

53
Q

Stress Testing?

A

Test how the system behaves when it is subjected to demands outside of the design limits
Particularly useful to distributed systems
Important component of security testing

54
Q

User Testing?

A

Performed by users or customers of the system
Performed in the user environment
Impossible to replicate the complexity of all user environments

55
Q

Types of User Testing?

A

Alpha Testing
Beta Testing
Acceptance Testing

56
Q

Alpha Testing?

A

Select set of users work with developers to test early releases of the software

57
Q

Beta Testing?

A

Larger group of users work with the software aiming to discover defects

58
Q

Acceptance Testing Process>

A
Define acceptance criteria
Plan acceptance testing
Derive acceptance tests
Run acceptance tests
Negotiate test results
Accept or reject system