Paper 2: Testing Maintainability and Defensive Design Flashcards
What is testing in software development?
Testing is the process of checking if a program works and is free from errors.
What are the two stages of testing during software development?
Terminal testing and Iterative testing.
What is terminal testing?
Terminal testing happens at the end of development to test the final version of the program.
What is iterative testing?
Iterative testing happens throughout the development process, with tests being done after each new feature or change is added to the program.
What are the two main types of errors tested in computer programs?
Logical errors and Syntax errors.
What are logical errors?
Logical errors make the program produce the wrong answer, but the code is still valid and runs without crashing.
What are syntax errors?
Syntax errors prevent the program from running because the code doesn’t follow the correct rules of the programming language.
What is a test plan?
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.
What are the four types of test data?
Valid data, Invalid data, Extreme data, and Abnormal data.
What is code maintainability?
Code maintainability refers to how easy it is to read, understand, update, and fix a program.
Why is well-maintained code important?
Well-maintained code is easier to debug, modify, and extend in the future.
What are some methods to improve code maintainability?
Comments, Functions/Procedures, Indentation, and Naming Conventions.
What is defensive design?
Defensive design is the practice of writing code that is resistant to errors, security threats, and misuse.
What is validation in defensive design?
Validation is the process of checking that user input meets specific rules before it is processed by the program.
What are common types of validation?
- Presence check
- Range check
- Format check
- Length check
What does anticipating misuse mean in defensive design?
It means designing a program to handle intentionally incorrect or accidental inputs and actions by users.
Give an example of anticipating misuse.
A login system limiting the number of failed attempts to prevent brute force attacks.
What is authentication?
Authentication is the process of verifying a user’s identity before allowing access to a system.