Testing framework #584
janaakhterov
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
@rbair23 please see above |
Beta Was this translation helpful? Give feedback.
2 replies
-
while looking at unit tests on a different project, I came across gRPC mocking frameworks which could be used to mock the hedera services (at least in Java). I have a small sample project that appears to work as a test (see attached ZIP) https://github.com/Fadelis/grpcmock There is also a more complex "over the wire" solution: https://trafficparrot.com/tutorials/mocking-and-simulating-grpc.html which could support all the SDKs. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Objective: Create a testing framework where all integration tests are defined in one place, and can be run on any SDK and on any network.
Current workflow:
*InfoQuery
.ResponseCode.proto
.Proposed Behavior:
Benefit:
Option 1: Build a single testing framework that uses a REST API to execute request on each SDK
Pros:
Cons:
e.g.
Option 2: Build a single testing framework that uses a CLI tool to execute request on each SDK
Pros:
Cons:
Notes:
Option 3: Build the testing framework in each SDK language
Pros:
Cons:
Option 4: Centralized location for test, but no testing framework
Pros:
Cons:
Option 5: Do nothing
Pros:
Cons:
Example test configuration file which defines the current a test on the expected behavior of a
ContractBytecodeQuery
The equivalent test in Java would look like:
Configuration file keywords
constant
accounts
key
andid
stepProperty
clientProperty
Client
assertNotNull
assertNull
assertEquals
assert*
is usedBeta Was this translation helpful? Give feedback.
All reactions