Dynamic BDD Test: Creation of a GameObject

[File: Creation Of A GameObject Dynamic Scenarios.unity]

You can now open the scene “Creation Of A GameObject Dynamic Scenarios.unity”. This simple scene has two buttons, called “Create” and “Delete”. For now, we are going to understand how to use the integration tests for testing the software.

We are going to test four behaviours:

  1. When I press the button “Create” I expect to see a new object in the scene.
  2. When I press the button “Delete” with the object in the scene, I expect to destroy the object.
  3. When I press the button“Create” when there is already an object in the scene, I expect that nothing is going to change in the scene.
  4. When I press the button “Delete” when there is not an object in the scene, I want to be warned by a message on the screen that there is not an object to destroy.

For each behaviour, there is an integration test in the Integration Test Panel.

Each behaviour can be seen as an Acceptance Criteria, a requirement for the software.

 

Back to: Getting started Read next: Unity Integration Test 01

 

© 2017 Hud Dimension. All Rights Reserved.

Search