Skip to content

Test skip when class methods used more than 3 levels priorities and run by XML with package type. #2060

@JFRabbit

Description

@JFRabbit

TestNG Version

6.14.3

Is the issue reproductible on runner?

  • IntelliJ

Test case sample

XML:

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="TestPasXML" verbose="1">
    <test name="Regression">
        <packages>
            <package name="tmp"/>
        </packages>
    </test>
</suite>

2 classes:

package tmp;

import org.testng.annotations.Test;

public class TestNormalClass {

    @Test
    public void a() {
        System.out.println("a");
    }
}
package tmp;

import org.testng.annotations.Test;

public class TestErrorClass {

    @Test(priority = 1)
    public void b() {
        System.out.println("b");
    }

    @Test(priority = 2)
    public void c() {
        System.out.println("c");
    }

    @Test(priority = 3)
    public void d() {
        System.out.println("d");
    }
}
  • Case1: run class "TestNormalClass" by idea
    => OK
  • Case2: run class "TestErrorClass" by idea
    => OK
  • Case3: run XML
    => class "TestErrorClass" ignored

image

  • Case4: remove "priority = 1" or remove one method of class "TestErrorClass", run XML
    ==> OK

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions