Skip to content

Missing coverage for backwards compatibility tests #515

@Whathecode

Description

@Whathecode

Ideally, all potential requests are covered by logged test requests for BackwardsCompatibilityTest's. These are generated from the application service tests, e.g. DeploymentServiceTest. But, there are two issues:

  1. This is tedious. There is a lot of overlap with the tests operating directly on the domain objects, e.g. all StudyDeployment tests would almost need to be duplicated on DeploymentServiceTest.
  2. This is not possible with the current setup. The current setup logs/replays requests of a single application service. But, the RecruitmentService redirects output of DeploymentService (StudyDeploymentStatus) in its ParticipantGroupStatus. It is not possible by doing requests to RecruitmentService alone (i.e., in a RecruitmentServiceTest) to get the StudyDeploymentStatus contained in ParticipantGroupStatus in all possible states. A direct request to DeploymentService is needed to achieve that, but these requests aren't logged by OutputTestRequests.

Regardless of whether full coverage of application services is needed when there is already extensive testing on domain objects, it's always sensical to add coverage when changes are introduced which need to be handled by ApiMigration. It is nice to first see backwards compatibility tests fail, before implementing the necessary API migration.

But, this potentially highlights a bigger issue regarding synchronous requests between application services (RecruitmentService embeds output of a request it does to DeploymentService) when it comes to versioning. If different backend subsystems should be allowed to run on different versions (currently there has been no real need, but is has been envisioned as a potential use case), there are likely more complications due to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNice to have, non-functional requirements.needs discussionThis cannot yet be implemented since it requires further conversation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions