Skip to main content
brian_thomas2
Adobe Employee
Adobe Employee
Jul 17, 2009 8:42 PM UTC
Answered

Selectively Running Tests

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 is closed to new replies. Start a new post to keep the conversation going.
mlabriolaCorrect answer
Participating Frequently
Jul 17, 2009 8:45 PM UTC

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

4 replies

mlabriolaCorrect answer
Participating Frequently
Jul 17, 2009 8:45 PM UTC

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

Translate
brian_thomas2
Adobe Employee
Adobe Employee
Jul 17, 2009 9:53 PM UTC

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

Translate
Participating Frequently
Jul 17, 2009 9:58 PM UTC

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

Translate