playMaker

Author Topic: Automated Tests for FSM's?  (Read 2343 times)

nitro52

  • Playmaker Newbie
  • *
  • Posts: 2
Automated Tests for FSM's?
« on: May 21, 2013, 02:32:00 AM »
Hey, i'm new to Playmaker but it looks impressive. What i do worry about though is adding to much logic to a FSM without a way to have automated tests to ensure game logic stays the way it was intended, especially if you are doing iterative development. And i guess the actual meaningful logic could cover more than one FSM.

So first how is the FSM stored? can an FSM's logic be executed from code? if so has anyone had any luck integrating it with a test framework.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Automated Tests for FSM's?
« Reply #1 on: May 21, 2013, 02:41:07 AM »
Hi,

There are two Test Unit system I am aware of on the asset store:

 Test Star and uUnit.

 this is not within the playmaker environment, but you will be able to interface with PlayMaker to run tests.

 Fsm ONLY execute at runtime, so there is no way to test a particular fsm within running a scene.

 then within the scene, you run Fsm by calling events or instanciate a gameObject with a Fsm. PlayMaker Api allows you to reference Fsm, and fire events to it, that's how it works.

Fsm are regular Monobehavior components in the end, so you deal with them like any other components.


bye,

 Jean

nitro52

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Automated Tests for FSM's?
« Reply #2 on: May 21, 2013, 05:05:42 AM »
ok thanks for the info, it sounds like you may also be able to integrate it with .net testing frameworks like nunit as long as you instantiate the object with an Fsm component.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Automated Tests for FSM's?
« Reply #3 on: May 21, 2013, 05:45:02 AM »
Hi,

 Yes, very much so.

 Also, for simple tests, I found that playmaker itself is actually really well suited for simple tests, because of it's event system, it very easy to test other fsm behaviore and quickly built case tests, all built in Fsm, it's of course not automated or anything, bu I ten to always have a Fsm that I build specifically to test a feature that I am currently building.

bye,

 Jean