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

additionalProperties: [true/false] causes crash #822

Open
Marcondiro opened this issue Oct 9, 2023 · 2 comments
Open

additionalProperties: [true/false] causes crash #822

Marcondiro opened this issue Oct 9, 2023 · 2 comments
Labels

Comments

@Marcondiro
Copy link

Hello,
The field additionalProperties of the Schema Object must be a JSON schema itself according to the specification, true and false are valid JSON schemas but they lead to a crash in EvoMaster.

java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class io.swagger.v3.oas.models.media.Schema (java.lang.Boolean is in module java.base of loader 'bootstrap'; io.swagger.v3.oas.models.media.Schema is in unnamed module of loader 'app')
        at org.evomaster.core.output.oracles.SchemaOracle$getSupportedResponse$1.invoke(SchemaOracle.kt:306)
        at org.evomaster.core.output.oracles.SchemaOracle$getSupportedResponse$1.invoke(SchemaOracle.kt:281)
        at org.evomaster.core.output.oracles.SchemaOracle.getSupportedResponse$lambda$19(SchemaOracle.kt:281)
        at java.base/java.util.LinkedHashMap.forEach(Unknown Source)
        at org.evomaster.core.output.oracles.SchemaOracle.getSupportedResponse(SchemaOracle.kt:281)
        at org.evomaster.core.output.oracles.SchemaOracle.generatesExpectation(SchemaOracle.kt:332)
        at org.evomaster.core.output.service.PartialOracles.activeOracles(PartialOracles.kt:174)
        at org.evomaster.core.problem.rest.service.AbstractRestFitness.handleAdditionalOracleTargetDescription(AbstractRestFitness.kt:343)
        at org.evomaster.core.problem.rest.service.AbstractRestFitness.handleResponseTargets(AbstractRestFitness.kt:326)
        at org.evomaster.core.problem.rest.service.BlackBoxRestFitness.doCalculateCoverage(BlackBoxRestFitness.kt:70)
        at org.evomaster.core.problem.rest.service.BlackBoxRestFitness.doCalculateCoverage(BlackBoxRestFitness.kt:15)
        at org.evomaster.core.search.service.FitnessFunction.calculateIndividualWithPostHandling(FitnessFunction.kt:105)
        at org.evomaster.core.search.service.FitnessFunction.calculateCoverage(FitnessFunction.kt:57)
        at org.evomaster.core.search.service.FitnessFunction.calculateCoverage$default(FitnessFunction.kt:48)
        at org.evomaster.core.search.algorithms.RandomAlgorithm.searchOnce(RandomAlgorithm.kt:23)
        at org.evomaster.core.search.service.SearchAlgorithm.search(SearchAlgorithm.kt:66)
        at org.evomaster.core.Main$Companion.run(Main.kt:473)
        at org.evomaster.core.Main$Companion.initAndRun(Main.kt:158)
        at org.evomaster.core.Main$Companion.main(Main.kt:82)
        at org.evomaster.core.Main.main(Main.kt)

Other important info:

  • version of EvoMaster (EM) used 1.6.1
  • how EM is run (eg, if from JAR or from one of its OS installers) deb
@arcuri82 arcuri82 added the bug label Oct 9, 2023
@arcuri82
Copy link
Collaborator

arcuri82 commented Oct 9, 2023

hi,
thanks for reporting this bug.

Until fixed, you can try to run EvoMaster with --expectationsActive false (as it should deactivate that part of the code)

@Marcondiro
Copy link
Author

Thanks! 🙂

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

No branches or pull requests

2 participants