BDD2 tests not running as per @priority in QAF 3.1.0

83 views
Skip to first unread message

santhosh shetty

unread,
Aug 6, 2022, 2:36:38 AM8/6/22
to qaf users
I have recently upgraded qaf to 3.1.0, my tests are in BDD2 with each scenario outline tagged with priorities like few with @priority: 1 and few with @priority: 2 or @priority: 3 etc.,

But when tests run from testngsuite.xml, I don't see they are running as per priority order, previously it's running in order of p1, p2, p3.   Please let me know if any configs required

Message has been deleted

cjayswal

unread,
Aug 6, 2022, 3:22:45 AM8/6/22
to qaf users
AFAIK there are no changes related to priority in latest release. Which version of qaf you were using earlier where you seen different behavior? Also make sure you are using same version of testng when comparing.

santhosh shetty

unread,
Aug 6, 2022, 4:35:50 AM8/6/22
to qaf-...@googlegroups.com
I found it's due to testng version. In previous version 6.10 sorting is by priority where as in 7.4.0 is based on scenario description(alphabetical).  Here is my findings,

Scenario Outline Priority
Test AB p1
Test B p2
Test AA p3
Testng/qaf Run order
6.10/3.0.0 Test AB, Test B, Test AA
7.4.0/3.1.0 Test B, Test AB, Test AA

With testng 6.4 and qaf 3.1.0 also working as per priority order. Is there any alternative/fix apart from reverting testng to old version?



--
You received this message because you are subscribed to the Google Groups "qaf users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qaf-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qaf-users/96cd3e45-bbf9-4a2d-9594-74f0501954ffn%40googlegroups.com.

cjayswal

unread,
Aug 8, 2022, 3:31:33 PM8/8/22
to qaf users
When providing priority use number instead of string. For example, instead of p1 use 1. Regarding testng versions, refer similar post. For test authored in java (TestNG test) qaf has @Priority annotation, which is used in MethodPriorityComparator. You can have similar implementation as workaround for bdd2.
Reply all
Reply to author
Forward
0 new messages