Execution Tracing Flashcards

1
Q

How to know when a program is correct

A
  • any given input can take and create the right answer and the program has the ability to stop at any point
  • implementation of algorithms meet specifications set out for them
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Types of software testing

A

white/glass box

black box

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

White box testing

A
  • structural or code based testing
  • full knowledge of the code being tested and how it was written
  • usually by code developers or someone allowed to examine the code in detail
  • small components of larger software tested in isolation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Boundary testing

A
  • test data is chosen for its proximity to any max/mins written into the program
  • test a list length to approach its limit, to reach or exceed it and then fix with errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Black box testing

A
  • aka behavioural testing
  • assumes testers ignorance of internal source code
  • conduct tests to check program against specification
  • test for ease of use, aesthetics, performance etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

automated testing

A
  • a lot of research effort goes into software that tests together
  • the goal is to automate some repetitive but necessary testing in the formalized process or testing difficult to do manually
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Execution tracing

A
  • tracking the course of a running program’s execution

- temporarily insert print() statements to show the values of certain variables at certain points

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

pausing execution

A

simple technique without any debugging tools to insert a print() followed by keyboard input

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

issues with manually pausing execution

A
  • need to insert a lot of code for line-by-line investigation
  • need to tidy up code after tracing (IE deleting the testing code)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

IDE Debugging Tools

A
  • suspend program execution temporarily at designated places called breakpoints
  • allow viewing values of variables in scope at a breakpoint
  • set and clear breakpoints
  • suspend program
  • debugger
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

IDLE debug control

A
Go
stop
over
out
quit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Go

A

resume execution, stop at next breakpoint if any or to end of program

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

step

A

execute the current instruction and suspend execution again

if the current instruction is or contains a function call, then step into that function and suspend execution there

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

over

A

same as step, except if the current instructions is or contains a function that call will be “stepped over” and the program will be suspended at the start of the next instruction in the current block

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

out

A

resume execution until the current block is finished executing or step out of a function if the execution is currently one

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

quit

A

exit program