SeUniVr / RestTestGen

A framework for automated black-box testing of RESTful APIs.
Apache License 2.0
35 stars 8 forks source link

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

Open maeve13 opened 3 months ago

maeve13 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

Here is the OAS file:

microcks.json

davidecorradini commented 3 months ago

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