Smart kettle

Smart kettle

Boil when the power is cheap

You make tea every morning and your power is cheaper at some hours. Instead of checking the price, you ask for a cheap boil. This tutorial also shows what happens when the price provider goes quiet, because that is when you most need to know what the kettle is doing.

  1. Fill the kettle, set the price you call cheap and tap Boil when cheap.

    The Cheap boil button reads "Waiting for a cheap price".

    Screenshot to come.
    Screenshot to come.
  2. Switch the test provider off.

    The price is replaced by the message "Prices unavailable" and a Retry button. The Cheap boil button reads "Waiting for a cheap price".

    Screenshot to come.
    Screenshot to come.
  3. Switch the test provider back on and tap Retry.

    The price has a green dot.

    Screenshot to come.
    Screenshot to come.
  4. Have the test provider send a price at or below your cheap rate.

    The display reads HEATING and a banner says the price is cheap.

    Screenshot to come.
    Screenshot to come.

Learn more

How this is tested not run

This tutorial is also an acceptance test. Its report has every step, check and screenshot from the last run.

The user story: As a tea drinker, I want the kettle to boil when electricity is cheap, so that my morning cup costs less without me watching the price.

When the user asks for a cheap boil
Then the cheap boil is waiting
When the feed stops answering
Then the price feed is unavailable
  And the cheap boil is waiting
When the feed answers again
Then the price feed is live
When the price drops to the cheap rate
Then the cheap boil is boiling