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

Support for complex (struct) arguments #377

Open
Nova38 opened this issue Mar 16, 2024 · 6 comments
Open

Support for complex (struct) arguments #377

Nova38 opened this issue Mar 16, 2024 · 6 comments

Comments

@Nova38
Copy link

Nova38 commented Mar 16, 2024

Is your proposal related to a problem?

Currently the config file only allows for the arguments to be of the following types: uuid, randomString$length, randomNumberA_B. However chain codes can also take structs as the arguments instead for using just a list of variables. I have found that using structs instead of positionall arguments is a bit more reliable way to prevent errors when passing parameters.

Describe the solution you'd like

Allow for parameters to take the shape of a yaml object using the same random types to populate the fields

Describe alternatives you've considered

I currently am using hyperledger caliper as its workflows supports arbitrary parameters types

@SamYuan1990
Copy link
Member

SamYuan1990 commented Mar 17, 2024

tape uses golang language, hence is there any go library which supports arbitrary parameters types? fuzz?

@SamYuan1990
Copy link
Member

but how to define the structure in yaml and make golang auto generate the random value via fuzz?
or we want the value in a specific range or ... some thing to make the test meaningful?

@SamYuan1990
Copy link
Member

@Nova38 , could you please try with comments at hyperledger/fabric-chaincode-go#101 (comment) ?

@SamYuan1990
Copy link
Member

@Nova38 , as tape support json format of input https://github.com/Hyperledger-TWGC/tape/blob/master/pkg/infra/trafficGenerator/proposal_test.go#L47 , please help a try and feedback.

@Nova38
Copy link
Author

Nova38 commented Mar 24, 2024

Fantastic thank you! I will try it out this week

@SamYuan1990
Copy link
Member

Fantastic thank you! I will try it out this week

hi @Nova38 , any feedback or result?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants