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

An error occurred during the execution of RestTestGen, when I try to test Microcks #21

Open
maeve13 opened this issue May 21, 2024 · 3 comments

Comments

@maeve13
Copy link

maeve13 commented May 21, 2024

Task :App.main()
10:58:25.669 [main] INFO io.resttestgen.boot.cli.App - RestTestGen CLI 24.03 started.
10:58:25.814 [main] WARN io.resttestgen.boot.ApiUnderTest - The host from API configuration is currently not supported. Please change the server in the OpenAPI specification to change the destination host.
10:58:25.814 [main] INFO io.resttestgen.boot.Starter - API under test: microcks [microcks]
10:58:26.010 [main] ERROR io.resttestgen.boot.cli.App - An error occurred during the execution of RestTestGen. Please report it on GitHub.
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Map (java.lang.String and java.util.Map are in module java.base of loader 'bootstrap')
at io.resttestgen.core.openapi.OpenApiParser.lambda$inferParameterTypes$3(OpenApiParser.java:175)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at io.resttestgen.core.openapi.OpenApiParser.lambda$inferParameterTypes$4(OpenApiParser.java:174)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at io.resttestgen.core.openapi.OpenApiParser.inferParameterTypes(OpenApiParser.java:172)
at io.resttestgen.core.openapi.OpenApiParser.parse(OpenApiParser.java:98)
at io.resttestgen.core.Environment.setUp(Environment.java:50)
at io.resttestgen.boot.Starter.initEnvironment(Starter.java:88)
at io.resttestgen.boot.Starter.start(Starter.java:29)
at io.resttestgen.boot.cli.App.main(App.java:56)

@davidecorradini
Copy link
Collaborator

Thank you for your report.

To further investigate the origin of the problem, could you share the OpenAPI specification used as input for RestTestGen in this execution?

Thanks.

Davide

@maeve13
Copy link
Author

maeve13 commented May 22, 2024

Here is the OAS file:

microcks.json

@davidecorradini
Copy link
Collaborator

Thank you, I will look into it in the next days.

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

No branches or pull requests

2 participants