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

Proxied or subclassed Rest Scenarios cannot be mapped by HttpRequestAnnotationScenarioMapper #242

Closed
tschlat opened this issue Feb 15, 2024 · 0 comments · Fixed by #243
Closed

Comments

@tschlat
Copy link
Collaborator

tschlat commented Feb 15, 2024

Citrus Version
4.X

Expected behavior
In Citrus 4.X, we expect to have the ability to wrap Citrus Scenarios with a proxy, such as CGLIBProxy in the context of Spring AOP. This would allow us to configure aspects using pointcuts on Citrus scenarios. Additionally, scenarios wrapped in proxy classes should remain executable by Citrus.

Actual behavior
However, in the case of Rest scenarios, there is an issue where execution fails. This failure occurs because the HttpRequestAnnotationScenarioMapper attempts to retrieve the @Scenario annotation directly from the scenario class to determine the scenario name. Proxy classes or other scenario subclasses may not provide this annotation directly, even though it exists in the hierarchy. This limitation prevents successful execution of Rest scenarios when wrapped in proxies or extended by subclasses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant