Skip to content

Order for DependsOnGroups has changed after TestNg 7.4.0 #2664

@martinaldrin

Description

@martinaldrin

TestNG Version

7.5 not working
7.4 works

Expected behavior

s3
s1
s2

Actual behavior

s1
s2
s3

Is the issue reproducible on runner?

  • Maven
  • Eclipse
  • IntelliJ

Test case sample

Here is an example for BeforeSuite, but the same problem exists for all configuration methods. The same issue also for dependsOnMethod

    @BeforeSuite(groups = { "g1" })
    public void s3() {
        System.out.println("s3");
    }

    @BeforeSuite(groups = { "g2" }, dependsOnGroups = "g1")
    public void s2() {
        System.out.println("s2");
    }

    @BeforeSuite(groups = { "g2" }, dependsOnGroups = "g1")
    public void s1() {
        System.out.println("s1");
    }

    @Test()
    public void test3() {
        System.out.println("test3");
    }

I have tried to find the commit where the fault was introduced, but my IDE did not like to switch gradle version and I'm new at gradle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions