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
Q

Why is documentation of the testing process so important?

A

So that if problems are encountered later on then test results can be checked and work duplication avoided

26
Q

What is a dry run?

A

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
Q

What is a trace table?

A

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
Q

What is a trace tool?

A

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
Q

Trace tool examples

A

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
Q

What is a breakpoint?

A

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
Q

What types of test data will a test plan include?

A

Normal, Extreme, Exceptional

32
Q

A syntax error is when…

A

The “grammatical” rules of the language have been broken. Usually detected by an interpreter/compiler.

33
Q

Tests and their results should be fully documented so that…

A

Should subsequent problems be discovered they can be checked
Work duplication is avoided

34
Q

Examples of execution errors include…

A

Division by zero

Out of memory

35
Q

Which testing is carried out by end users of a program?

A

Beta Testing

36
Q

Why is it important to document any tests performed during the software development phase?

A

To avoid duplication of tests if errors are discovered later on
To help ensure that testing is both comprehensive and systematic

37
Q

Give examples of syntax errors

A

IF without END IF
WHILE without DO
Missing semi-colon

38
Q

Fit for purpose

A

Software matches the specifications agreed with the client

39
Q

Testing technique which does not involve the use of software to test the value of variables

A

Dry run - A manual check of the value of variables carried out by the programmer

40
Q

Comprehensive Testing

A

Testing normal, extreme and exceptional data

41
Q

What should happen if exceptional data is entered by a user when asked for an integer value?

A

Program should have included error trapping features that inform the user of the fact that the data is not valid

42
Q

Extreme Data

A

Data which is accepted but is on the limits of a valid range

43
Q

Maintenance

A

Results in source code being edited or created afresh, resulting in more testing

44
Q

Analysis stage and testing

A

Test plan is informed by the outcome of discussion between the client and developers

45
Q

Comprehensive testing should focus on

A

The program meets requirements specified in the analysis
Responds correctly to input
Data and calculations processed correctly
Produces required output