-
Notifications
You must be signed in to change notification settings - Fork 55
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
[Junit] Too many constraints error #168
Comments
To solve this problem, I think the number of Junit tests should be limited or the test files should be splitted. |
Sorry, I don't understand what you mean by "too many constraints error". Can you explain? Better yet, can you show a reproducible test case? |
tcases_ocvn.zip The constant pool includes numbers, strings, method names, field names, class names, references to classes and methods. The limit is 65536, so it needs to be split when it exceeds it. I attached the file which is generated by Tcases for the OCVN REST API web service.
|
The best solution is to control the size of the generated test by controlling the amount of the API that is covered. For example, you might consider generating separate tests for each API path.
Or if using Maven:
|
Hi, First of all, thank you for your proposed solution. While I agree with you that exercising each API path should work, unfortunately there are too many end-points in the swagger file (https://github.com/codingsoo/temp_swagger/blob/main/ocvn.json), which would make the proposed solution not suitable for my case. Would it be possible to add a feature for exercising a fat swagger file's every API path? I would greatly appreciate any help regarding this issue. Thank you very much for all the help! |
I'm considering adding an option to automatically generate a separate test class for each API path. Would that resolve your problem? |
Sure! I really appreciate it! |
@codingsoo, unless you have any further requests, I plan to produce a new release containing the 2 new features you suggested. |
Thank you very much! I really like this project. |
Fixed by PR #173 |
@codingsoo, FYI, a new release 3.6.0 containing your suggested features is now available |
I will use 3.6.0! Thank you very much:) Hope you have a wonderful day. |
Hi,
When a swagger file is big, it generates too many constraints error.
I think this is because Junit has limited constraints pool. I tried this project: https://github.com/devgateway/ocvn
The text was updated successfully, but these errors were encountered: