-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Protocol tests generate suites with request input setting #3376
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
Conversation
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.
Note: 1 test client has been removed as the originally added c2j test client model definition was corrupted in source and added by mistake.
c262f0d
to
33112c8
Compare
@@ -22,20 +24,21 @@ | |||
import java.io.IOException; | |||
import java.io.StringWriter; | |||
import java.nio.charset.StandardCharsets; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.*; |
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.
nit: no star imports
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.
aahh, default IDE config.
} | ||
} | ||
|
||
public ProtocolTestModel convert(C2jTestSuite c2jTestSuite) { |
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.
instead of creating a seperate Transformer
class maybe it would be a good idea to call a function .from()
on ProtocolTestModel
that takes a C2J test suite as a model.
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.
I just followed the existing pattern within the project.
/** | ||
* A JSON hash representing the structure of the parsed response. Either this or error (not both) must appear in the test case. | ||
*/ | ||
private Optional<JsonNode> result; |
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.
is there a way to model it? raw JsonNode
should only be used if we cannot model it as a object.
33112c8
to
57382d3
Compare
Issue #, if available:
Protocol tests WIP
Description of changes:
Continue working on the protocol tests generation.
This change adds generation of test suites with tests from the model, with client creation and request input filling.
This change follows 2 ideas:
Note: 1 test client has been removed as the originally added c2j test client model definition was corrupted in source and added by mistake.
Note: No response validation / no http mocking in this PR.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.