Final validation

Let us imagine that a different person worked on the code that should fulfill the requirements set by our scenarios. This person picked one scenario at the time, developed the code, ran that scenario, and confirmed that his implementation was correct. Once the implementation of all scenarios has been done, it is time to run the whole story and do the final validation.

For that matter, the application has been packed as a Docker file and we have prepared a virtual machine with Vagrant for executing the application.

Check out the branch at https://bitbucket.org/vfarcic/tdd-java-ch08-books-store/branch/03-validation and run Vagrant:

$ vagrant up
  

The output should be similar to the following:

==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
...
==> default: Running provisioner: docker...
    default: Installing Docker (latest) onto machine...
    default: Configuring Docker to autostart containers...
==> default: Starting Docker containers...
==> default: -- Container: books-fe

Once Vagrant is finished, we can see the application by opening http://localhost:9001 in our browser of choice:

Now, let us run our scenarios again:

$ gradle clean test

This time there were no failures and all scenarios ran successfully:

Once all scenarios are passing, we meet the acceptance criteria and the application can be delivered to production.

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

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