Testing And Debugging Programs Flashcards

1
Q

What is an execution error?

A

An error produced when the program is run. Examples include an attempt to use a variable that has not been declared, use of invalid data, attempt to access a non existent file or division by 0.

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

What is a logic error?

A

A logic error occurs is when the code executes but produces the wrong result. Common errors may include AND instead of OR, , code written in the wrong order or loops which repeat the wrong number of times.

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

What is static testing?

A

A form of testing that involves reading the program code and mentally ‘walking through’ it without actually running the program.
Errors are fixed before program execution.

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

What is Dynamic Testing?

A

When code is executed using a set of test data. Variables are listed and the values which they store are tracked as code is executed.

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

What is a breakpoint and which type of testing is it used in?

A

Break points are used in dynamic testing to pause executing code at specific points and allowing current variable values to be executed.

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

Give an example of dynamic testing

A

A trace table, which lists variables in a program and tracks the values they store as code is executed.

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

Give an example of static testing

A

A dry run involves reading the program and going through it mentally without actually running the program. The tester predicts what the program code will produce.

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

Give an example of a test plan for a small program.

A

Dynamic testing to simply check the program copes with a variety of different inputs from normal, extreme and exceptional data.

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

Define normal, extreme and exceptional data

A

Normal - Data within the expected range
Extreme - Data on the boundaries of the unexpected range
Exceptional - Data within the unexpected range

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

What is functional testing?

A

Tests that check to see if particular features work

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

What is alpha testing?

A

Tests performed on completed software at a developers site

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

What is beta testing?

A

Tests performed offsite by those outside the programming team

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

What is acceptance testing?

A

Tests performed by the customer using their own environment and hardware

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

What is compatibility testing?

A

Tests that check softwares compatibility with other apps or OS

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

What is installation testing?

A

Tests which ensure the software installs correctly on customer hardware.

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

What is usability testing?

A

Checks the usability of a user interface

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

What is accessibility testing?

A

Checks that software is compatible with disability legislation

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

Why is software tested?

A

To identify errors in code

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

What is a syntax error?

A

When rules regarding how each instruction must be written or formatted are broken a syntax error is created which prevents execution of the instruction.

20
Q

What is systematic testing?

A

When testing is planned and can be documented as a result

21
Q

What is comprehensive testing?

A

When every aspect of the software is tested

22
Q

What is the purpose of a test plan?

A

A set of test data created in order to systematically and comprehensively test the software in which the client requested to ensure it meet standards when delivered.
Mostly created during design stage as this is the stage when inputs, outputs and user interface should be known.

23
Q

A test plan includes…

A

The software specification which was created at the analysis stage.
A schedule for the testing process
Details of what is and what is not to be tested
Test data and expected results
Documentation of the testing process

24
Q

Why is acceptance (beta) testing important?

A

There will always be unidentifiable errors within software until it is in the use of clients/users (who can then report it)

25
Why is documentation of the testing process so important?
So that if problems are encountered later on then test results can be checked and work duplication avoided
26
What is a dry run?
The user self checks the program by going through its Pseudocode/source code themselves. User ensures that all variables produce what they are supposed to at various stages of the code. Table is usually drawn out on paper or using a computer as execution may be difficult.
27
What is a trace table?
Similar to a dry run but is often used when a user wishes to check various values of a variable in a specific sub-program.
28
What is a trace tool?
Programming environments can have trace facilities in order to allow the programmer to see which lines of code are being run which variables values are changing
29
Trace tool examples
A watch - Takes a variable and displays its value as the program progresses. The user can go through each statement one at a time and the value of the variable being traced is displayed on the watch screen. This can be set to stop when the variable reaches a particular value. Some may allow investigation of actual memory locations and in particular the contents of a stack. By examining such data, any errors occurring in the order of procedure calling from the main program can be checked and corrected as the stack is used to store all procedure calls during execution.
30
What is a breakpoint?
A point in the source code where the program will stop execution allowing the values of variables to be examined These can be set to stop execution at a particular point in the code, when the variable has a particular value (watch) or a particular key is pressed Once stopped, the values can be examined or written to a file for study later
31
What types of test data will a test plan include?
Normal, Extreme, Exceptional
32
A syntax error is when...
The "grammatical" rules of the language have been broken. Usually detected by an interpreter/compiler.
33
Tests and their results should be fully documented so that...
Should subsequent problems be discovered they can be checked Work duplication is avoided
34
Examples of execution errors include...
Division by zero | Out of memory
35
Which testing is carried out by end users of a program?
Beta Testing
36
Why is it important to document any tests performed during the software development phase?
To avoid duplication of tests if errors are discovered later on To help ensure that testing is both comprehensive and systematic
37
Give examples of syntax errors
IF without END IF WHILE without DO Missing semi-colon
38
Fit for purpose
Software matches the specifications agreed with the client
39
Testing technique which does not involve the use of software to test the value of variables
Dry run - A manual check of the value of variables carried out by the programmer
40
Comprehensive Testing
Testing normal, extreme and exceptional data
41
What should happen if exceptional data is entered by a user when asked for an integer value?
Program should have included error trapping features that inform the user of the fact that the data is not valid
42
Extreme Data
Data which is accepted but is on the limits of a valid range
43
Maintenance
Results in source code being edited or created afresh, resulting in more testing
44
Analysis stage and testing
Test plan is informed by the outcome of discussion between the client and developers
45
Comprehensive testing should focus on
The program meets requirements specified in the analysis Responds correctly to input Data and calculations processed correctly Produces required output