2. Introduction to Software Testing Flashcards

1
Q

What does testing check?

A

Testing checks whether the program implementation agrees with the program specification

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

Automated vs Manual testing

A

Automated Testing

  • Find bugs more quickly
  • No need to write tests
  • If software changes, no need to maintain tests

Manual Testing

  • Efficient test suite
  • Potentially better coverage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Black-box vs White-box testing

A

Black-box:

  • Tester knows nothing about the tested programs
  • Can work with code that cannot be modified
  • Does not need to analyze or study code
  • Code can be in any format (managed binary, obfuscated)

White-box:

  • Tester can see the internal details of the program being tested
  • Efficient test suite
  • Potentially better coverage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a pre-condition? What is a post-condition?

A

A pre-condition is a predicate that is assumed to hold before a function executes.

A post-condition is a predicate that is expected to hold after a function executes, whenever the pre-condition also holds.

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

What are the types of code coverage?

A
  • Function coverage: which functions were called?
  • Statement coverage: which statements were executed?
  • Branch coverage: which branches were taken?
  • Others include line coverage, condition coverage, basic block coverage, path coverage…
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is mutation analysis?

A

Test variations (mutants) of the program (e.g., replace x > 0 with x < 0). If the test suite is good, it should report failed tests in the mutants.

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