-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Description
I am currently developing a mcp server (oci-jms-mcp-server) and during e2e testing, I noticed that the shared Behave e2e suite currently aborts during step loading before any scenarios run because two different step files register the same step text:
@then("the response should contain a list of listeners")
This causes Behave to raise AmbiguousStep and exit before feature execution begins.
Files involved
- tests/e2e/features/steps/oci-load-balancer-mcp-server-steps.py
- tests/e2e/features/steps/oci-network-load-balancer-mcp-server-steps.py
Observed behavior
Running a targeted feature such as:
cd tests
.venv/bin/behave e2e/features/oci-jms-mcp-server.feature
fails immediately with:
Exception AmbiguousStep: @then('the response should contain a list of listeners') has already been defined in
existing step @then('the response should contain a list of listeners') at e2e/features/steps/oci-load-balancer-mcp-server-steps.py:138
...
behave.step_registry.AmbiguousStep
Expected behavior
Behave should load the step registry successfully and execute the requested feature file.
Impact
This blocks unrelated e2e runs as well, including JMS feature execution, because Behave loads all step definition files globally before running
any scenario.
Suggested fix
Rename one of the duplicate step texts to be service-specific, for example:
- the response should contain a list of load balancer listeners
- the response should contain a list of network load balancer listeners
and update the corresponding feature file to match.
Notes
This appears to be a shared test-harness issue.