19

I've started using Akka with Scala to develop a set of interacting components in a bus-oriented architecture. I need to test the fault-tolerance of the system, and for that I was wondering if there is any way to use a probabilistic model of failure (i.e., set some failure parameters for each Actor) within a Scala test framework. Any ideas? Any framework out there that already implements this?

Hugo Sereno Ferreira
  • 8,665
  • 6
  • 41
  • 88
  • Not that I know of. What exactly is it that you want to inject (and when), and what exactly are the properties you wish to ascertain? Depending on these answers, it might be interesting to explore possible additions to Akka. – Roland Kuhn Dec 11 '11 at 10:48
  • this isn't really close but:http://mir.cs.illinois.edu/setak/ – Gene T Dec 11 '11 at 18:43

1 Answers1

1

I assume you know thinks like Testkit and read the documentation at http://akka.io/docs/akka/1.3/scala/testing.html#akka-testkit (see also http://roestenburg.agilesquad.com/2011/02/unit-testing-akka-actors-with-testkit_12.html )

You don't need Akka in the test setup, if I understood your problem right. Assume that Akka itself is tested and works OK. Now you only have to test your code. Since you didn't show code it's hard to give advice, but I will try:

you can test your method calls in different sequences, and assert the results. I would hardcode the sequences, but you can also randomize that.

show some code and I will clarify what I mean. I also could be wrong, if I understood your question wrong.

Josh Crozier
  • 202,159
  • 50
  • 343
  • 273
Jörg Beyer
  • 3,447
  • 19
  • 35