1 Reply Latest reply on Jul 28, 2011 3:21 AM by Sudhir T S

    FlexUnit Parameterized Runner Bug?

    lukevanin Level 1

      I'm using the FlexUnit paramaterized test runner. One of the tests is failing, but the runner doesn't give any indication of where or what the failure is. All the tests are green, but it displays "Errors: 1" and "Failures: 0" (see screen shot below). There are no errors in the console window. I'm using Flash Builder 4.5.1 Premium with the built-in FlexUnit.

       

      paramaterized runner bug.PNG

      I'm wondering if I'm doing something wrong, or if this is "by design", or if it's a bug?

       

      I manually enabled each test one-by-one until I was able to track down why my code is causing the error so the test is correct, but surely the failing test should be red so I would know where to look? If I had to re-factor my code and something broke, how would I know which test broke?

       

      Here's what the test code looks like (roughly):

       

      [RunWith("org.flexunit.runners.Parameterized")]

      public class SomeTestCase

      {

           [Parameters]

           public static var data:Array = createData(100);


       

           public function ArticleListBehaviorTest(parameter:*)

           {

                super();

                this.parameter = parameter;

           }

       

           [Before]

           public function setup():void

           {  

                     ...

                }

       

       

           [Test]

           public function count_should_return_number_of_articles():void

           {

                ...

           }

      }