Skip to main content
brian_thomas2
Adobe Employee
Adobe Employee
July 17, 2009
Answered

Selectively Running Tests

  • July 17, 2009
  • 1 reply
  • 2092 views

Hey all,

My goal is to build a UI that will present a tree view of all my available test suites/cases and allow the user to choose what tests they want to run.

I need a push in the right direction as to the best way to start programmatically building out partial test suites while preserving all the great metadata funtionality in my test cases that FU4 adds. Any suggestions?

Thanks!
Brian

This topic has been closed for replies.
Correct answer mlabriola

Brian,

The docs aren't here for this yet, but if you take a look at the Request static class it allows you to grab pieces of classes or filter them in order to create a 'Request' which is really a sub-group of tests.

For example:

Request.method( TestTwo, "testTwo3" )

Mike

1 reply

mlabriolaCorrect answer
Participating Frequently
July 17, 2009

Brian,

The docs aren't here for this yet, but if you take a look at the Request static class it allows you to grab pieces of classes or filter them in order to create a 'Request' which is really a sub-group of tests.

For example:

Request.method( TestTwo, "testTwo3" )

Mike

brian_thomas2
Adobe Employee
Adobe Employee
July 17, 2009

Thanks Mike, looks like that'll work perfectly!

A follow-up question: Is there something in FlexUnit4 I can reference to do the annotation processing when generating my list? Otherwise I can always jump into describeType() and do it myself.

Brian

Participating Frequently
July 17, 2009

Once more tidbit, this is not in the code base yet, but there will be a similar request which parses a known XML format and runs all of the tests... watch for it in the future versions (this was created for the builder integration)

There are several classes in the flex.lang.reflect package which are similar to the java.lang.reflect classes which allow you access to classes and provide the added benefit of caching them in case they are needed again later. Check these out. There are some minor updates to these coming soon to add more functionality, but they are close to final versions now.

Mike