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

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

Closed
sundarlogan opened this issue Feb 9, 2024 · 6 comments

Comments

@sundarlogan
Copy link

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
Copy link
Author

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

@kerrykimbrough
Copy link
Contributor

Investigating now. Stay tuned.

@kerrykimbrough
Copy link
Contributor

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

@kerrykimbrough
Copy link
Contributor

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
Copy link
Contributor

Fixed in release 4.0.4

@sundarlogan
Copy link
Author

Thank you @kerrykimbrough ..

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