Menu

TestIndex always -1 if all tests of the root scenario is a subscenarios marked as Tests

Roman
2013-01-21
2013-01-23
  • Roman

    Roman - 2013-01-21

    TestIndex always -1 if all tests of the root scenario is a subscenarios that 'marked as Tests'
    may be this is a bug ?
    i try to get testIndex from RunnerStatePersistencyManager.getInstance().getActiveTestIndex();
    may be there is a other way ?

     
  • Itai Agmon

    Itai Agmon - 2013-01-21

    Yeah, it seems to be a bug. I will appreciate if you open a bug in the bug tracker.
    Just on top of my head, a good way to get the test index is to implement the TestListener or ExtendTestListner interfaces and register to the ListenerstManager singleton. This way you will get an event in every test start and end and you can just count the events.
    By the way, a system object is already registered to the ListenerstManager, so all you need to do is to implement one of the interfaces.

     

Log in to post a comment.