Cornutum / tcases

A model-based test case generator
MIT License
218 stars 54 forks source link

TestWriter: Decimal values given in the example are ignored in the generated tests #289

Closed sundarlogan closed 8 months ago

sundarlogan commented 8 months ago

Tcases Version: 4.0.2 OpenAPI Version: 3.0.0 OpenAPI Spec File: Attached - openapi-example.json Writing API tests using `TestNgTestWriter[] and RestAssuredTestCaseWriter[]

We have a decimal value in example for post api call field -- "paymentAmount": 10.03. In the generated test body, decimal value .03 is ignored.

image

sundarlogan commented 8 months ago

@kerrykimbrough Can you pls. help with this, did we missed anything here or any other way to define decimals.

kerrykimbrough commented 8 months ago

Investigating now. Stay tuned.

kerrykimbrough commented 8 months ago

Not sure why this is happening, but I don't think it's an error in your OpenAPI definition.

kerrykimbrough commented 8 months ago

I have found the source of the problem, which also exists in the latest version=4.0.3. A fix will be coming soon.

BTW, why are you not using version 4.0.3?

kerrykimbrough commented 8 months ago

Fixed in release 4.0.4

sundarlogan commented 8 months ago

Thank you @kerrykimbrough ..