Chapter 9 Flashcards

1
Q

logic error

A

a problem where the program compiles & executes without an obvious error but delivers wrong result

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

testing

A

an activity concerned with finding out whether a segment of code contains any errors

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

debugging

A
  • comes after testing
  • the attempt to pinpoint& fix the source of an error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

unit testing

A

tests of the individual parts of an application, such as methods and classes

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

positive testing

A

the testing of cases that are expected to succeed

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

negative testing

A

testing of cases that we expect to fail

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

test automation

A

simplifies the process of regression testing

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

regression tests

A
  • desirable to run whenever a change is made to software because further errors can be introduced when modifying software
  • involves rerunning tests that have previously passed, to ensure the new version still passes them
  • one of the easiest ways to automate regression tests is to write a program that acts as a test rig or test harness
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

JUnit

A

a popular testing framework to support organized unit testing and regression testing in Java

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

test class

A
  • color is different from the ordinary classes in the diagram
  • annotated as «unit test»
  • attached to ordinary class (reference class) of the same name
  • additional controls in the main window, below compile button
  • right click menu has 3 new sections instead of list of constructors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

assertion

A

an expression that states a condition that we expect to be true.
If the condition is false, we say that the assertion fails. this indicates an error in our program

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

fixture

A

a set of objects in a defined state that serves as a basis for unit tests

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

walkthrough

A
  • an activity of working through a segment of code line by line while observing changes of state and other behavior of the application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

disadvantages of print statements

A
  • not practical to add print statements to every method in a class- only effective if the right methods have been annotated
  • adding too many can lead to info overload. Print statements inside loops are particular source of this problem
  • can be tedious to remove once their purpose is served
  • they may be needed again after removing so frustrating to put back in
How well did you know this?
1
Not at all
2
3
4
5
Perfectly