testng-team/testng

ListenerComparator doesn't work

Closed this issue ยท 4 comments

TestNG Version

7.10.1

Expected behavior

ListenerComparator should order listeners

Actual behavior

ListenerComparator doesn't order listeners

Test case sample

<properties>
  <property>
    <name>listenercomparator</name>
    <value>base.listeners.order.AnnotationBackedListenerComparator</value>
  </property>
  <property>
    <name>listener</name>
    <value>base.listeners.ReportPortalListenerOverwritten, 
      base.listeners.AttachFilesListener, base.listeners.TestRailListener, base.listeners.MixPanelListener
    </value>
  </property>
</properties>

Contribution guidelines

I tried many combinations but had no success. Listeners still are starting without any order

@SergiyBelevitnevSFLY - Thank you so much for filing this issue. This was a miss in the feature implementation. I have raised a PR for fixing this.

@SergiyBelevitnevSFLY - This is now fixed and released as part of TestNG 7.10.2.

https://repo1.maven.org/maven2/org/testng/testng/7.10.2/

@missedone - I had to release TestNG v7.10.2 to include the fix for this bug.

I have checked the code against TestNG v7.10.2 and can confirm that the issue has been resolved. I am grateful for the feature delivery!