Skip to main content
Participant
Aug 3, 2010 4:36 PM UTC
Question

How to get the current execution testname?

Hello,

I was wondering if it is possible (well it should be somehow) to get the name of the current execution test.

For example when I use FlexUnit 3 (0.90) then I have to extend the TestCase class and then I have access to its member var methodName.

But when I use flexunit 4, then I don't need to extend TestCase, my methods are just annotated with [Test]

And when I have a Helper class that wants to know which [Test] myName is currently being executed, how can I do that?

Thanks

Radi

This topic is closed to new replies. Start a new post to keep the conversation going.

8 replies

Participating Frequently
Aug 3, 2010 4:40 PM UTC

Radi,

It isn't quite as easy in FlexUnit 4 as it is a very different programming model.

What version are you using presently 4.0 or one of the 4.1 betas? I ask because there are some ways I can help you get this data cleanly, but it will be *much* cleaner in the 4.1 versions.

Mike

Translate
Participant
Aug 3, 2010 4:42 PM UTC

Hi,

I am using just 4 not the 4.1 because it is beta, but it would be nice, when you tell me both ways

Regards

Radi

Translate
Participating Frequently
Aug 3, 2010 5:15 PM UTC

Radi,

Not so easy as that.

In the 4.1 stuff, I can show you how to write a very simplistic rule that gives you the information you want. I will need to think of a way to get you this in 4.0

Mike

Translate