Skip to main content
Participant
August 3, 2010
Question

How to get the current execution testname?

  • August 3, 2010
  • 1 reply
  • 2176 views

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 has been closed for replies.

1 reply

Participating Frequently
August 3, 2010

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

Participant
August 3, 2010

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

Participating Frequently
August 3, 2010

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