Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cucumber Tests: Improve separation by API #571

Open
dsmf opened this issue Apr 30, 2024 · 0 comments
Open

Cucumber Tests: Improve separation by API #571

dsmf opened this issue Apr 30, 2024 · 0 comments
Labels
hardening measurements to increase resiliency linked_to_feature Issue is linked to a feature policy_store Issues regarding the IRS policy store. testing all testing related topics

Comments

@dsmf
Copy link
Contributor

dsmf commented Apr 30, 2024

As tester / developer,
I want to separate E2E test step definitions by API in a clean way,
so that hooks do not conflict and common steps with state can be shared somehow.

Hints / Details

Before #518 there were only Step-Definitions for the IRS Job API and therefore all were defined in one class E2ETestStepDefinitions but then the Policy Store API steps were created in the new class E2ETestStepDefinitionsForPolicyStoreApi

Workarounds concerning this split-up that should be fixed:

  • We should find a way to re-use the common steps "the IRS URL {string}" and "the admin user api key" (at the moment they had to be copied and given another name because moving to a base class is not allowed) => investigation needed how to do this properly.
  • Limit Before and After hooks to the respective feature (at the moment the Job API After hook gets executed for the Policy Store API feature too and to avoid errors a workaround using NPE check had to be introduced). => maybe use labels here (not done yet because we would have had to edit the existing Job API tests which was not part of the [TEST] Integration Tests Policy Store (Happy Path) #518 story).
  • After this, replace the constructor based initialization in the step definition classes with a Before hook that is only executed for the respective feature.

Acceptance Criteria

  • Common step defs re-used without ugly workarounds.
  • Hooks are only executed for the scenario they refer to.

Out of Scope

  • ...
@dsmf dsmf added testing all testing related topics policy_store Issues regarding the IRS policy store. linked_to_feature Issue is linked to a feature labels Apr 30, 2024
@dsmf dsmf added the hardening measurements to increase resiliency label Apr 30, 2024
ds-jhartmann added a commit to ds-jhartmann/item-relationship-service that referenced this issue Jun 13, 2024
…-release-3.5.2

chore(doc): Prepare release 3.5.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardening measurements to increase resiliency linked_to_feature Issue is linked to a feature policy_store Issues regarding the IRS policy store. testing all testing related topics
Projects
Status: inbox
Development

No branches or pull requests

1 participant