Priority broken in 6.8.8 and 6.9.6

21 views
Skip to first unread message

Martijn Hiemstra

unread,
Jul 24, 2015, 9:32:15 AM7/24/15
to testng-users
Hi all,

I am using Testng and nearly everything is working really well. There is one serious issue with priority. No matter what I do priority is ignored.

When I say

@Test( groups ="testA", priority=123 )
public void testMethodA() {
  // Do nothing
}

I see this in the output:

my.package.CalendarPage
  @BeforeMethod AbstractPageTest.beforeMethod()[pri:0, instance:my.package.CalendarPage@183b7230]
    @Test CalendarPage.testCalendarItems()[pri:0, instance:my.package.CalendarPage@183b7230]

priority isn't being read.

So I tried a IMethodInterceptor and a IAnnotationTransformer and in each listener I execute

annotation.setPriority ( 999 );

and still it says

my.package.CalendarPage
  @BeforeMethod AbstractPageTest.beforeMethod()[pri:0, instance:my.package.CalendarPage@183b7230]
    @Test CalendarPage.testCalendarItems()[pri:0, instance:my.package.CalendarPage@183b7230]

My xml contains this:

<suite name="Redactie tool test suite" parallel="false">

<listeners>
            <listener class-name="my.package.TestAnnotationTransformerListener" />
  </listeners>

<test name="WebsiteTests" verbose="3">
<parameter name="browser" value="firefox" />

<groups>
<run>
<include name="testA" />
</run>
</groups>

<packages>
<package name="my.package.*" />
</packages>
</test>
</suite>

Either there is a bug in testng with priorities or a configuration conflict.

Anybody got an idee.

Yours sincely,
Martijn Hiemstra

Cédric Beust ♔

unread,
Jul 24, 2015, 10:22:13 AM7/24/15
to testng...@googlegroups.com
The output seems wrong but is it running correctly?

Can you post a quick class I can run that shows the problem?



-- 
Cédric


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages