Contributions
Dynamically create teststep from list
From an API Mgmt Bank Service we are calling an operation (let's call it getAccounts) to get the number of - and which - accounts exist for a certain customer. In the response we collect the list of accounts. From the list of accounts we would like to check balance of each accounts with another operation (let's call it getAccountBalance) from the same API Mgmt Bank Service. The getAccountBalance operation have not been execeuted in any teststep previously in the testcase, but the request is defined from the service in the project. How can we in Groovy create a new teststep from every element in the list of accounts using the template from the getAccountBalance? Attached you can see the operations, the teststeps and the Groovy Script. Would appreciate some advice or hints on how to solve it. It is the OpenSource version of SOAPUI I am using (5.4.0) I am new to this and not so good at programming in general so excuse me if the question is too trivial. Thanks in advance!757Views0likes0CommentsUse value in JSON response (from Post HTTP) for next test step GET HTTP
I have tried to search on Google for a solution to this and it might exist (I am very new to this!) but I haven't been able to find it. This is what it´s all about: I want to create a test suite where I create a consent with the post operation "postConsent" sent in to the operation as a JSON: 1)Sent as POST https://<apim-address>/axs/v1/consents/ And the response come back as JSON: { "consentStatus": 3, "consentId": "91d99eb6-4442-4a88-82b2-752ca8d01406", "scaMethods": [ { | | The value of 'consentId' (91d99eb6-4442-4a88-82b2-752ca8d01406) - of course different for every new POST sent - is used in next test step where we want to check the status of the consent. That is done by 2) GET https://<apim-address>/axs/v1/consents/91d99eb6-4442-4a88-82b2-752ca8d01406/status Where the response from the GET come back as JSON as well. And also in a third step it would be feasible to use the consentId again in a GET operation 3)GEThttps://<apim-address>/axs/v1/consents/91d99eb6-4442-4a88-82b2-752ca8d01406 And maybe even in a 4th step if we want to delete the consentId: 4) DELETEhttps://<apim-address>/axs/v1/consents/91d99eb6-4442-4a88-82b2-752ca8d01406 I have tried with property transfer but have not been able to store the value of consentId in a variable to put into each of the following GET and DELETE operations. I guess it´s possible? The property transfer window seem to have no groovy support. Thanx in advance! /Nisse494Views0likes0Comments