Skip to content

Support for custom JUnit rule instead of RunWith #4

@prog110

Description

@prog110

I am planning to use

  1. Spring MVC - For Integration testing
  2. NestedRunner - For nesting test cases
  3. JUnitParams - For DDT
  4. Assumes - for specifying test dependencies
  5. Mockito - For mocking
  6. PowerMockito - For any mocking abuse I may need to do (I mean class/static method mocking)
  7. DBUnit - For fiddling with DB data

Spring MVC in the current milestone version (4.2.0.RC1 or > 4.2 whenever the release happens) uses rules instead of runner to support integration with other runners. PowerMock currently supports Rules. Mockito supports Rule in the current Beta version (2.0.17-beta)

However, AFAIK, all others does not support rules. It would be better if this library can implement the runner using Junit Rule instead of Runner so that it can be compatible with all other runners to make a full blown testing stack. Else, people need to hack around to get most out of Java test frameworks.

Reference:

  1. Creating a custom runner for mockito
  2. Nested Runners Example

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions