Skip to content

sfauvel/documentationtesting

Repository files navigation

Documentation testing

To have more information, you can visit complete documentation.

The behavior of an application is defined at three levels: in the code, in the documentation and in the tests.

This approach allows you to define the behavior in only one place, the code.

The documentation is generated and serves as a reference to ensure non regression.

We used to say that tests are the first documentation.
But a test often looks like that:

@Test
public void player_A_won_1_point_and_then_player_B_win_2_points() {
    game.pointA();
    game.pointB();
    game.pointB();
    assertEquals("15-30", game.score());
}

Is it really what we want as documentation ?
Is it easy to read and to understand for every one in the project ?

Don’t you think it will be a better documentation if this test look like that ?

Tennis

Player A

15 - 30

Player B

About

Project to initiate tests based on documentation

Resources

License

Stars

Watchers

Forks

Packages