Initial unit test definitions

The development team first transcribed the requirements into some basic unit tests. As nothing had been designed or written yet, these mostly take the form of noting what functionality should be validated. As the design and development progress, these tests will also evolve toward completion; for example, there is a requirement for adding inventory:

An add inventory command ("a", "addinventory") is available:
  • The name parameter of type string.
  • Add an entry into the database with the given name and a 0 quantity.

To capture this requirement, the development team created the following unit test to serve as a placeholder:

[TestMethod]
private void AddInventoryCommand_Successful()
{
// create an instance of the command
// add a new book with parameter "name"
// verify the book was added with the given name with 0 quantity

Assert.Inconclusive("AddInventoryCommand_Successful has not been implemented.");
}

As the application design becomes known and development starts, the existing tests will expand and new tests will be created, as follows: 

The importance of the inconclusive tests is that they communicate what needs to be accomplished to the team and provide a measure as the development proceeds. As the development progresses, inconclusive and failing tests will indicate work to be undertaken and successful tests will indicate progress toward completing the current set of tasks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.193.232