Créer une activité
Jouer Relier
1. Unit Testing
2. Blackbox Testing
3. Glass Box Testing
4. Stateful Components
5. Stateless Components
6. TDD
7. JUnit

Care must be taken to put them into a known good state before testing

Have a state

Only the interfaces and shell implementation are written before unit tests

Cause side effects

Tests component's functionality only

Have no state

Result may differ depending on what happened previously

Cause no side effects

Also known as Red/Green/Refactor

Ensures that a component does what it promises to do

the de facto standard automated unit test framework in Java

Include all static methods in Java Math class

Has good integration with Netbeans, Eclipse, IntelliJ, and Maven

Act like a math function

Used to test lowest level components of an application

Makes it easy to create unit tests suites for Java components

Is responsibility of software developer for each class they create

Each code path through a component is exercised

Always produce the same result

Test Driven Development

Takes a component's implementation into account

If any unit tests fail, the build fails

Knows nothing of the component's specific implementation

Also known as White Box Testing

Is usually done with an automated framework like JUnit

Tests the interface

Component unit tests are written before actual implementation