Chapter 9: Testing

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 47

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

48 Terms

1

Software Testing

A process in which you execute your program using data that simulates user inputs. ​

New cards
2

The 2 Causes of Programming Bugs

  • Programming Errors

  • Understanding Errors

New cards
3

Programming Errors

You have accidentally included faults in your program code.

New cards
4

Understanding Errors

You have misunderstood or have been unaware of some of the details of what the program is supposed to do.

New cards
5

The 4 Testing Types

  • Functional

  • User

  • Performance and Load

  • Security

New cards
6

Functional Testing

Test the functionality of the overall system.

New cards
7

User Testing

Test that the software product is useful to and usable by end-users.

New cards
8

Performance and Load Testing

Test that the software works quickly and can handle the expected load placed on the system by its users.

New cards
9

Security Testing

Test that the software maintains its integrity and can​protect user information from theft and damage; aims to find vulnerabilities that may be exploited by an attacker and to provide convincing evidence that the system is sufficiently secure.

New cards
10

Functional Testing Cycle

  1. Unit Testing

  2. Feature Testing

  3. System Testing

  4. Release Testing

New cards
11

Unit Testing

Test program units in isolation.

New cards
12

Feature Testing

Test code units that have been integrated to create features.

New cards
13

System Testing

Check that there are no unexpected interactions between the features in the system; testing the system as a whole, rather than the individual system features. ​

New cards
14

Release Testing

Atype of system testing where a system that’s intended for release to customers is tested; the system is packaged for release to customers and the release is tested to check that it operates as expected

New cards
15

Code Unit

Anything that has a clearly defined responsibility.

New cards
16

Equivalence Partition

A set of inputs; used during unit testing.

New cards
17

Incorrectness Partitions

Sets of inputs that are deliberately incorrect; used during unit testing.

New cards
18

Unit Testing Guidlines

  • Test Edge Cases

  • Force Errors

  • Fill Buffers

  • Repeat Yourself

  • Overflow and Underflow

  • Don’t Forget Null and Zero

  • Keep Count

  • One is Different

New cards
19

Fill Buffers

Choose test inputs that cause all input buffers to overflow.​

New cards
20

Keep Count

When dealing with lists and list transformations, keep​count of the number of elements in each list and check​ that these are consistent after each transformation.

New cards
21

One is Different

If your program deals with sequences, always test with​ sequences that have a single value.

New cards
22

The 2 Types of Feature Tests

  • Interaction Tests

  • Usefulness Tests

New cards
23

Interaction Tests

These test the interactions between the units that implement the feature.

New cards
24

Usefulness Tests

These test that the feature implements what users are likely to want.

New cards
25

The 3 Parts of Automated Testing

  • Arrange

  • Action

  • Assert

New cards
26

Arrange

Set up the system to run the test.

New cards
27

Action

Call the unit that is being tested with the test parameters. ​

New cards
28

Assert

Make an assertion about what should hold if the unit being tested has executed successfully.

New cards
29

The Test Pyramid (from Top to Bottom)

  • System tests

  • Feature tests

  • Unit tests

New cards
30

Test-Driven Development (TDD)

An approach to program development that is based around the general idea that you should write an executable test or tests for code that you are writing before you write the code. ​

New cards
31

Test Driven Development Cycle

  1. Identify New Functionality

  2. Identify Partial Implementation of Functionality

  3. Write Code Stub that will Fail Test

  4. Run All Automated Tests

  5. Implement Code that Should Cause Failing Test to Pass

  6. Run All Automated Tests

  7. Refactor Code If Required

New cards
32

Identify Partial Implementation

Break down the implementation of the functionality required into smaller mini-units.

New cards
33

Write Mini-Unit Tests

Write one or more automated tests for the mini-unit​that you have chosen for implementation.

New cards
34

Write Code Stub that will Fail Test

Write incomplete code that will be called to​implement the mini-unit.

New cards
35

Benefits of Test-Driven Development

  • A systematic approach to testing in which tests are clearly linked to sections of the program code.

  • Should be possible to understand what the program does by reading the tests. ​

  • Debugging is simplified.

  • Leads to simpler code.

New cards
36

Disadvantages of TDD

  • Discourages radical program change.

  • Focus is shifted towards tests rather than the problem trying to be solved.

  • Focus is shifted towards implementation details rather than the programming problem.

  • It is hard to write “bad data” tests.

New cards
37

Risked-Based Security Testing

Involves identifying common risks and developing tests to demonstrate that the system protects itself from these risks. Also consists of risk analysis.

New cards
38

Risk Analysis

Consists of analyzing risks to assess how they might arise and developing tests to check some of these possibilities.

New cards
39

Code Reviews

Involve one or more people examining the code to check for errors and anomalies and discussing issues with the developer. ​

New cards
40

Code Review Activities

  • Set Up Review

  • Prepare Code

  • Distribute/Code Tests

  • Check Code

  • Write Review Report

  • Discussion

  • Make To-Do List

  • Make Code Changes

New cards
41

Set Up Review

The programmer contacts a reviewer and arranges a review date.

New cards
42

Prepare Code

The programmer collects the code and tests for review and annotates them with information for the reviewer about the intended purpose of the code and tests.

New cards
43

Distribute Code/Tests

The programmer sends code and tests to the reviewer.

New cards
44

Check Code

The reviewer systematically checks the code and tests against their understanding of what they are supposed to do.

New cards
45

Write Review Report

The reviewer annotates the code and tests with a report of the issues to be discussed at the review meeting.

New cards
46

Discussion

The reviewer and programmer discuss the issues and agree on the actions to resolve these.

New cards
47

Make To-Do List

The programmer documents the outcome of the review as a to-do list and shares this with the reviewer.

New cards
48

Make Code Changes

The programmer modifies the code and tests to address the issues raised in the review.​

New cards

Explore top notes

note Note
studied byStudied by 38 people
910 days ago
4.0(1)
note Note
studied byStudied by 4 people
58 days ago
5.0(1)
note Note
studied byStudied by 72 people
199 days ago
5.0(1)
note Note
studied byStudied by 8 people
954 days ago
5.0(1)
note Note
studied byStudied by 20 people
1006 days ago
4.0(1)
note Note
studied byStudied by 13 people
890 days ago
5.0(1)
note Note
studied byStudied by 34 people
848 days ago
5.0(1)
note Note
studied byStudied by 767 people
708 days ago
4.0(4)

Explore top flashcards

flashcards Flashcard (71)
studied byStudied by 2 people
747 days ago
5.0(1)
flashcards Flashcard (49)
studied byStudied by 3 people
302 days ago
5.0(2)
flashcards Flashcard (27)
studied byStudied by 4 people
828 days ago
5.0(1)
flashcards Flashcard (57)
studied byStudied by 40 people
465 days ago
5.0(1)
flashcards Flashcard (30)
studied byStudied by 34 people
497 days ago
5.0(1)
flashcards Flashcard (25)
studied byStudied by 62 people
793 days ago
5.0(2)
flashcards Flashcard (82)
studied byStudied by 100 people
515 days ago
5.0(1)
flashcards Flashcard (68)
studied byStudied by 97 people
23 days ago
5.0(1)
robot