New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerMockRunner should run tests defined in super class #352

Closed
johanhaleby opened this Issue Jul 24, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@johanhaleby
Collaborator

johanhaleby commented Jul 24, 2015

public abstract MyAbstractTest {

    //some setup code here

   @Test
   public abstract test1();

   @Test
   public abstract test2();

}

I've a test class:

@PowerMockIgnore ( {"javax.*" , "org.bouncycastle.*"} )
@RunWith( PowerMockRunner.class )
@PrepareForTest ( {MyStaticClass.class} )
public class MyTest extends MyAbstractTest {

  //some setup code here

  @Override
  public void test1(){
      //some test code here
  }

 @Override
  public void test2(){
      //some test code here
  }

 @Test
 public void test3(){
   // some test code here
 }

}

When I run this with a JUnitRunner, 3 tests are executed.
When I run this with PowermockRunner, only the tests annotated with
@test in the concrete class are executed. The @test annotation is not
inherited from the superclass.

@thekingnothing thekingnothing modified the milestone: PowerMock 1.6.5 Feb 26, 2016

@thekingnothing thekingnothing self-assigned this Mar 18, 2016

@thekingnothing thekingnothing self-assigned this Mar 30, 2016

thekingnothing added a commit that referenced this issue Apr 19, 2016

thekingnothing added a commit that referenced this issue Apr 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment