views:

39

answers:

1

FlexUnit is quite an impressive framework for testing and with the new integration in Flash Builder 4 it's a no brainer to use it. However, I'm not sure why it's necessarily exclusive to just unit testing. In my opinion, I think the tools are great candidates for performance testing as well.

It should also be mentioned that by performance testing I'm not talking about testing whole systems. Rather, I'm more interested in testing actual units in a library. For instance, stress testing data structures in order to determine scalability issues.

Is this being done or is there any reference material out there that touches on this subject?


In order to further clarify the question, let me describe a possible scenario.

Let's say we're creating a library of data structures, for instance collections. These structures are meant to focus on efficiency rather than features. While they certainly need testing in live or as-close-to-live scenarios, I can imagine that some bottlenecks may be easily caught before going to acceptance testing.

So the question is, what's considered best practice for stress testing individual units? Is unit testing useful for stress testing individual units or is the data collected from such test insignificant, making it just a waste of time and energy?

+1  A: 

"Is unit testing useful for stress testing individual units"

Why not have one of your unit tests create a few thousand instances, exercise them a bit, and then destroy them. Time the whole sequence and fail the test if it takes too long.

At least then you are putting bounds on it.

Tom Chiverton
Concise and sound advice, thanks!
macke