EvoMaster icon indicating copy to clipboard operation
EvoMaster copied to clipboard

OpenApi spec default value is ignored

Open Baaamm opened this issue 2 years ago • 3 comments

Hi,

i am trying to generate a black box test via an OpenApi spec. In this spec i have some default values, which i need to create my request post body. This default value are somehow ignored during the EM test generation. Do you maybe know what i am doing wrong?

Example:

LoginDetails: type: object properties: usename: type: string default: myName <------- this value should used at least in one test example: myName required: true

What i espect is, that this default values are used by EM, at least once for generating a testcase.

Thank you for your help.

Baaamm avatar Oct 05 '23 18:10 Baaamm

Hi, thanks for your interest in EM.

At the moment, example(s) and default entries in the schema are ignored. But indeed it would be useful to exploit them if available

arcuri82 avatar Oct 06 '23 11:10 arcuri82

Initial alpha/beta support is now available in latest snapshot, with experimental parameters --probRestDefault and --probRestExamples (off by default)

arcuri82 avatar Nov 20 '23 20:11 arcuri82

Initial alpha/beta support is now available in latest snapshot, with experimental parameters --probRestDefault and --probRestExamples (off by default)

It works. Thank you!

Baaamm avatar Nov 22 '23 19:11 Baaamm