+
Skip to content

Unexpected behaviour JUnit4 rules in combination with the ConcordionRunner #245

Open
@GoGoris

Description

@GoGoris

I have an integration test written in Concordion which needs Spring, so it has the junit spring class and method rules. In this test I need to initialize the database before running my specification but when I try to use a bean inside the @BeforeSpecification method, it is not initialized yet.

It does work when I make the initialization @BeforeExample, but then I can only use
1 example or the database will be initialized multiple times.

I think junit class rules should be ran before the @BeforeSpecification method.

These are the spring rules I am using:

	@ClassRule
	public static final SpringClassRule SPRING_CLASS_RULE = new SpringClassRule();

	@Rule
	public final SpringMethodRule springMethodRule = new SpringMethodRule();

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载