Skip to content

Integration Tests - Use @Rule instead of @ClassRule for JenkinsRule unless required #501

@gbhat618

Description

@gbhat618

General best practice around using @Rule vs @ClassRule for JenkinsRule is

  • if the jenkins configuration is being modified between different tests; then it is preferred to use the @Rule
  • if it was simply requiring jenkins without doing jenkins modification itself, then use @ClassRule.

In that sense, currently majority of the integration tests are all modifying the JenkinsRule (in the init method), as well as various small assertions being put in different test methods.

This is actually causing issues,

  • for extending the tests
  • and other configurations around tests such as using @WithTimeout (currently being compensated by putting timeout configs in pom.xml file)

It is better to simplify the integration tests such that it is easier to follow.

Also see #495 (comment)

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