Paper 2: Testing Maintainability and Defensive Design Flashcards

1
Q

What is testing in software development?

A

Testing is the process of checking if a program works and is free from errors.

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

What are the two stages of testing during software development?

A

Terminal testing and Iterative testing.

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

What is terminal testing?

A

Terminal testing happens at the end of development to test the final version of the program.

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

What is iterative testing?

A

Iterative testing happens throughout the development process, with tests being done after each new feature or change is added to the program.

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

What are the two main types of errors tested in computer programs?

A

Logical errors and Syntax errors.

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

What are logical errors?

A

Logical errors make the program produce the wrong answer, but the code is still valid and runs without crashing.

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

What are syntax errors?

A

Syntax errors prevent the program from running because the code doesn’t follow the correct rules of the programming language.

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

What is a test plan?

A

A test plan is created before we run/create the code and lists how we are going to test the code, what data we are going to enter and what we expect to happen.

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

What are the four types of test data?

A

Valid data, Invalid data, Extreme data, and Abnormal data.

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

What is code maintainability?

A

Code maintainability refers to how easy it is to read, understand, update, and fix a program.

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

Why is well-maintained code important?

A

Well-maintained code is easier to debug, modify, and extend in the future.

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

What are some methods to improve code maintainability?

A

Comments, Functions/Procedures, Indentation, and Naming Conventions.

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

What is defensive design?

A

Defensive design is the practice of writing code that is resistant to errors, security threats, and misuse.

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

What is validation in defensive design?

A

Validation is the process of checking that user input meets specific rules before it is processed by the program.

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

What are common types of validation?

A
  • Presence check
  • Range check
  • Format check
  • Length check
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does anticipating misuse mean in defensive design?

A

It means designing a program to handle intentionally incorrect or accidental inputs and actions by users.

17
Q

Give an example of anticipating misuse.

A

A login system limiting the number of failed attempts to prevent brute force attacks.

18
Q

What is authentication?

A

Authentication is the process of verifying a user’s identity before allowing access to a system.