eclipse-edc / MinimumViableDataspace

Guidance on documentation, scripts and integration steps on using the EDC project results
Apache License 2.0
58 stars 167 forks source link

Using Variables to Carry Over ID's of Responses in the Postman Collection #351

Closed paullatzelsperger closed 3 weeks ago

paullatzelsperger commented 1 month ago

Discussed in https://github.com/eclipse-edc/MinimumViableDataspace/discussions/350

Originally posted by **nikschul** October 1, 2024 Currently - when executing the REST requests inside the Postman collection in the order described in step 7 of the README.md - some IDs of previous responses have to be copied over manually to the next request. Even though this could have a certain learning effect for new users as they have to understand which ID has to be used when, this could also be simplified by automating it with Postman variables. Here is an example: ![image](https://github.com/user-attachments/assets/11c08c31-c161-4cb5-b2dc-ca4a1c977a69) Instead of manually copying the "contractAgreementId" over to the next request, it could be automatically carried over to the next request. This could be accomplished with post-request scripts: https://blog.postman.com/extracting-data-from-responses-and-chaining-requests/
paullatzelsperger commented 1 month ago

@nikschul created an issue here. can you assign yourself?

nikschul commented 1 month ago

I don't think I currently have the permission to assign myself, but I am currently working on the issue. Therefore my colleague @ronjaquensel assigned herself for now. :)

nikschul commented 1 month ago

@paullatzelsperger regarding the Postman Flows: I think there is currently not way to export the flows in Postman (https://community.postman.com/t/export-postman-flow/60756/3), so I guess we would have to create a Postman Workspace for the repository in order to share flows or do you see another option?

regarding software tests: would you suggest to test the pre- and postscript with Postman and also to implement some integration tests for the postman collection?

paullatzelsperger commented 1 month ago

I think there is currently not way to export the flows in Postman

yeah, seems that way. we'll have to hold off on that, but maybe we could document that possibility in the README somewhere, like "hey, you can either follow the sequence in this document, or you define a flow to chain together the requests" and an explanation on how to do it.

we would have to create a Postman Workspace for the repository

this gets complicated quickly and will likely involve cost etc. not likely to happen, TBH.

would you suggest to test the pre- and postscript with Postman and also to implement some integration tests for the postman collection?

Thats a good idea, maybe we just add a CI workflow that runs all requests in the "ControlPlane Management" folder using the newman tool. Basically the same thing that the TransferEndToEndTest does from JUnit. That could be done in a separate PR though.