-
Notifications
You must be signed in to change notification settings - Fork 23
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
added feature to generate test cases based on specification #205
Conversation
-added generate number part
-added generate Str based on pattern, maxLength, minLength -fix bugs generate number
-changed openapi handlerTest template to generate handler test case
…e in handler test classes to this class.
-test cases will use ResponseValidator instead of HandlerTestBase, thus removed it.
-now deserialize content string before do validation -fixed a issue when matching a given uri with schema, now remove query parameters from uri -changed some testing content
Would it be possible to remove the dependency on "generex" and implement that type of random string functionality on your own? |
This library "generex" is specific for generating String that matches a given regular expression. |
The generex has a dependency automaton which is licensed under BSD 2-clause. It requires we put the copyright and license file somewhere when distributed. I am not sure how to do that yet. |
@stevehu @NicholasAzar |
I really appreciate the effort to make the test cases closer to the real scenarios; however, there is no way to make it perfect as it would be another full-blown project. If we can generate the values based on the correct type(integer/string) with some limitations(length, max, min etc.), it would be good enough. For the developers who are working on the test cases, they need to modify it anyway. What do you think? |
@BalloonWen as we previously discussed, it would be worth including this dependency for this feature (supporting pattern validation) in my opinion |
@NicholasAzar Do you know how to properly handle the license of automaton which BSD 2 Clause. It is not the direct dependency and it is not part of the light-4j delivery. However, the customers who are using light-4j might be on the hook. To handle this scenario, we have to hire a lawyer to figure out how to handle it properly. So far, we only have Apache 2.0 and MIT licenses in our dependencies. If we include any other licensed library, we are putting our customers in a position that they might be sued. |
If we promote the dependency with this change, we need to advise our respective client(s) before they use this version. I am not sure whether a software such as BlackDuck should flag whether this dependency creates an issue or not |
@stevehu, @NicholasAzar It fixes the generation problem and all APIs at my client are generating and building generated code without errors. This PR has an associated PR in light-rest-4jL: They both can be merged at this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per previous comments
The code was changed to add test ignore. |
related issue: #133