Top Banner
Rasmus Møller Selsmark Team Lead, Infrastructure [email protected] Model Based Testing a 3D game engine
10

Model Based Testing a 3D game engine

Dec 31, 2016

Download

Documents

lamkien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Model Based Testing a 3D game engine

Rasmus Møller SelsmarkTeam Lead, [email protected]

Model Based Testinga 3D game engine

Page 2: Model Based Testing a 3D game engine

2

Simple game object physics

Page 3: Model Based Testing a 3D game engine

3

Model Actions

● SetMass (float)

Sets mass of rigid body. Higher mass requires higher force to move it.

● AddForce (vector, mode)

Adds specified force (vector) to object, in order to make it move.

Page 4: Model Based Testing a 3D game engine

4

Force Modes

● ForceAdd a continuous force to the rigidbody, using its mass.

● AccelerationAdd a continuous acceleration to the rigidbody, ignoring its mass.

● ImpulseAdd an instant force impulse to the rigidbody, using its mass.

● VelocityChangeAdd an instant velocity change to the rigidbody, ignoring its mass.

Page 5: Model Based Testing a 3D game engine

5

A Basic Physics Model

Page 6: Model Based Testing a 3D game engine

6

Model Implementation using Spec Explorer

Page 7: Model Based Testing a 3D game engine

7

Limiting the Model Outcome State Space

Page 8: Model Based Testing a 3D game engine

8

Unity Runtime Test Framework

Test Case

plus more ...

Runtime PlayersRuntime Players

Runtime Test Framework

Page 9: Model Based Testing a 3D game engine

9

Connecting the Model and Framework

Model /Spec Explorer

Runtime Test Framework UnityRuntime

C# Unit Test Code Runtime Test Code

Page 10: Model Based Testing a 3D game engine

10

Connecting the Model and Framework - solution

● Spec Explorer generates C# unit tests

● Runtime Test Framework requires one class per test case

● Dynamic code generation from model generated test cases