Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] NPE when running JUnit tests using custom @Rule and accessing org.junit.runner.Description::getTestClass()

OK, finally I found a workaround. I needed access to the class to read annotations on it. But org.junit.runner.Description is already exposing annotations through getAnnotation() method.
So that's fine for me, sorry for the noise.


De : Julien HENRY <henryju@xxxxxxxx>
À : Tycho User List <tycho-user@xxxxxxxxxxx>
Envoyé le : Mardi 16 juin 2015 16h07
Objet : [tycho-user] NPE when running JUnit tests using custom @Rule and accessing org.junit.runner.Description::getTestClass()

Hi guys,

I'm trying to run a JUnit test suite with tycho-surefire-plugin. My test suite is using a custom JUnit @Rule that is located in a separate bundle and try to access org.junit.runner.Description::getTestClass(). This results in a NPE.
I found some related information:
 but in my case I really need to access the TestClass so the workaround is not acceptable. Do you know any option? I can try to write a simple reproducer if someone think it will help.

Thanks

Julien

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top