Skip to content

Use tags instead of suites to separate tests #183

Closed
@steve-todorov

Description

@steve-todorov

Task Description

In #140 we introduced the concept of "suites". Unfortunately this doesn't seem to be working very well and the unit tests are not being triggered at all. Furthermore, it has complicated our dependencies since we also need to use JUnit 4 to run those "suites":

@RunWith(JUnitPlatform.class)
@IncludeTags({ "s3-integration-test" })
@SelectPackages({ "org.carlspring.cloud.storage.s3fs" })
public class AmazonS3ITSuite {}

/** 
 * ......
 * Please note that test classes and suites annotated with
 * @RunWith(JUnitPlatform.class) cannot be executed directly on
 * the JUnit Platform (or as a "JUnit 5" test as documented in some IDEs). Such
 * classes and suites can only be executed using JUnit 4 infrastructure.
 * ......
 */
org.junit.platform.runner.JUnitPlatform 
{
}

Since there is no official support for suites yet (junit-team/junit5#744 which is supposed to be fixed via junit-team/junit5#2416), we will have to fall back to simply @Tag instead.

Tasks

The following tasks will need to be carried out:

  • Revert changes made via Investigate if and how we can extract the integration tests into suites #140.
  • Create MinioIntegrationTest and S3IntegrationTest annotations which can be used per class or method
  • Setup proper profiles which run these annotations
  • Tag integration tests with the appropriate annotation
  • Make sure build actually fails when there NO tests run to prevent false-positive green builds
  • Run integration tests in GH Actions.
  • Change gh issue templates to use -Pit-s3 instead of -Pintegration-tests
  • Change documentation to use -Pit-s3 instead of -Pintegration-tests

Task Relationships

This task:

Help

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions