wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AS_Testing

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.
What is iterative testing?
a)
Testing done after all coding is completed
b)
Testing done during development in stages
c)
Testing done by end-users
d)
Testing done only once before delivery
2.
What is terminal testing?
a)
Testing done at each stage of development
b)
Testing done only on small parts of code
c)
Testing done after coding is finished
d)
Testing done automatically by the IDE
3.
What is the main purpose of testing?
a)
To make the code faster
b)
To find and fix errors or vulnerabilities
c)
To design the program interface
d)
To reduce the amount of code
4.
Which of the following is NOT a category of program errors?
a)
Syntax errors
b)
Runtime errors
c)
Semantic errors
d)
Logic errors
5.
What is a logic error?
a)
An error where the program doesn’t compile
b)
An error where the program does not run as intended
c)
An error flagged by the IDE
d)
An error caused by invalid input
6.
What makes logic errors hard to detect?
a)
They are flagged by the IDE
b)
They only occur during compilation
c)
The program seems to work but produces wrong output
d)
They happen due to invalid syntax
7.
What is a common cause of logic errors?
a)
Incorrect syntax
b)
Missing libraries
c)
Incorrect logic or understanding
d)
Running out of memory
8.
What does zero indexing mean?
a)
Counting starts from 1
b)
Counting starts from 0
c)
The array contains no elements
d)
Arrays cannot store data
9.
What is a syntax error?
a)
An error caused by incorrect program logic
b)
An error flagged during compilation
c)
An error caused by invalid input
d)
An error caused by memory overflow
10.
Which of the following is an example of a syntax error?
a)
Forgetting a semicolon
b)
Using invalid input data
c)
Program running out of memory
d)
An infinite loop
11.
What is a runtime error?
a)
An error flagged by the IDE
b)
An error during execution of the program
c)
An error caused during input validation
d)
An error caused by invalid syntax
12.
Which situation could cause a runtime error?
a)
Using valid inputs
b)
Running out of memory
c)
Correct syntax
d)
A logical flow error
13.
What kind of input does boundary test data involve?
a)
Normal input
b)
Invalid input
c)
Inputs on the edge of acceptability
d)
Inputs exceeding all boundaries
14.
What type of data is deliberately invalid?
a)
Normal test data
b)
Boundary test data
c)
Erroneous test data
d)
Trace table test data
15.
What does erroneous test data check?
a)
If the program handles valid inputs correctly
b)
If the program can handle edge cases
c)
If the program crashes due to invalid inputs
d)
If the program follows syntax rules
16.
What does defensive programming aim to achieve?
a)
Adding comments to all lines of code
b)
Producing code that is robust and hard to break
c)
Reducing program execution time
d)
Using only validated data
17.
What is validation in programming?
a)
Changing the data to make it valid
b)
Ensuring the data meets specific criteria
c)
Matching data against passwords
d)
Testing data during execution
18.
What is sanitization in programming?
a)
Modifying input to make it valid
b)
Checking if data meets criteria
c)
Improving the speed of data processing
d)
Testing invalid data
19.
Which is an example of sanitization?
a)
Validating user input
b)
Forcing an invalid file name to be valid
c)
Looping until correct data is entered
d)
Ignoring invalid data
20.
What is the difference between validation and sanitization?
a)
Validation modifies input; sanitization checks it
b)
Validation checks data; sanitization modifies input
c)
They are the same
d)
Validation processes valid data
21.
What do trace tables help identify?
a)
Syntax errors
b)
Runtime errors
c)
Logic errors
d)
Memory errors
22.
What do trace tables record?
a)
Compilation errors
b)
Variable values at each step
c)
Types of runtime errors
d)
Function call flow
23.
How does indentation improve readability?
a)
It reduces runtime errors
b)
It helps identify syntax errors
c)
It visually shows nesting of control structures
d)
It eliminates the need for comments
24.
Which of the following is an example of a descriptive identifier?
a)
X for a variable storing age
b)
Count for a variable counting numbers
c)
Dog for a loop index
d)
Temp for a username variable
25.
What are comments in programming used for?
a)
Speeding up code execution
b)
Helping the compiler execute code
c)
Explaining the code to other humans
d)
Debugging syntax errors
26.
What does maintainability in code mean?
a)
Making the code run faster
b)
Ensuring code can be easily understood and edited later
c)
Reducing the number of functions
d)
Eliminating the need for comments
27.
What is the purpose of test plans?
a)
To execute all program functions
b)
To document testing requirements systematically
c)
To validate user inputs
d)
To check errors during program runtime
28.
What information does a test plan NOT include?
a)
Expected results
b)
Actual results
c)
Test data
d)
Program interface design
29.
What type of error occurs during compilation?
a)
Syntax error
b)
Runtime error
c)
Logic error
d)
Validation error
30.
What is an example of boundary test data?
a)
Using a random date
b)
Using invalid data like -1
c)
Using the edge case of 29th February
d)
Using valid input like 5
31.
What is the main focus of defensive programming?
a)
Preventing syntax errors
b)
Anticipating user misuse and errors
c)
Creating smaller code files
d)
Testing edge cases
32.
How can an infinite loop affect a program?
a)
It can cause a syntax error
b)
It will crash during runtime
c)
It will fix runtime errors
d)
It improves performance
33.
What does sanitization ensure?
a)
Data matches a password
b)
Data cannot cause harm during processing
c)
The program executes faster
d)
Data input is skipped
34.
What is the role of authentication in programming?
a)
To check if data meets criteria
b)
To validate and loop user input
c)
To match user credentials for access
d)
To fix logical errors
35.
Why is indentation important even if a language does not require it?
a)
It reduces runtime errors
b)
It helps visually separate nested code blocks
c)
It reduces the need for comments
d)
It forces code compilation
36.
What type of error happens when an array index is accessed incorrectly?
a)
Syntax error
b)
Runtime error
c)
Logic error
d)
Boundary error
37.
What does a test plan's actual results column contain?
a)
The expected output
b)
The inputs provided
c)
The observed program output
d)
The description of test cases
38.
What is the main advantage of trace tables in testing?
a)
They identify syntax issues
b)
They help debug runtime crashes
c)
They systematically track variable values to detect logic errors
d)
They reduce the amount of code
39.
Why is boundary test data important?
a)
It tests invalid inputs
b)
It tests input on the edge of expected values
c)
It validates normal input
d)
It helps identify syntax errors
40.
What kind of testing is done during development stages?
a)
Terminal testing
b)
Boundary testing
c)
Iterative testing
d)
Trace table testing