Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PowerMock TestNG module depends on deleted class and not working with latest version of test library #1173

@tsvetelin-petrov

Description

@tsvetelin-petrov

Background
When trying to use PowerMock (2.0.9) with the latest version of TestNG (7.11.0) no tests are found due to a java.lang.NoClassDefFoundError: org/testng/IObjectFactory. After looking at TestNG's docs, saw that the referenced IObjectFactory interface was deprecated starting version 7.5.0 and deleted in 7.10.0.

Used dependencies

<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>7.11.0</version>
    <scope>test<scope>
</dependency>            
<dependency>
    <groupId>org.powermock</groupId>
    <artifactId>powermock-module-testng</artifactId>
    <version>2.0.9</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.powermock</groupId>
    <artifactId>powermock-api-mockito2</artifactId>
    <version>2.0.9</version>
    <scope>test</scope>
</dependency>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions