Test Driven Development Flashcards

1
Q

Describe testing

A

Executing a program with the intention of finding errors in the code

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

State the steps in the traditional waterfall model

A
Analysis
Design
Implementation
Testing 
Documentation
Evaluation
Maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the problems with the waterfall model?

A

Testing happens late, if at all
Requirements decoupled from code during development
Hard work to test, so problems are not always detected

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

Describe the idea between TDD

A

Identify a small feature to be implemented
Write and run a unit test for it
Write smallest bit of code that will pass the test
Run test
Repeat

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

Describe the approach of TDD

A

Make small improvements frequently
Always have a working system
Incremental design

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

What does YAGNI stand for

A

You ain’t going to need it

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

What should unit tests be?

A

Focused, testing one thing at a time
Fast to run
Independent (of each other, the environment, run order)
Automatic

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

What features of JUnit make it suited to test driven development?

A
  • Framework facilitating writing and running tests
  • Method to check conditions (assertEquals, assertTrue, assertThrows etc)
  • Annotations to declare methods as tests, setup, teardown
  • Parameterized tests
How well did you know this?
1
Not at all
2
3
4
5
Perfectly