내포 된 json이 있지만 요청할 수없는 요청 본문에 변수를 전달하려고합니다.요청 본문의 중첩 된 json에서 변수를 전달하는 방법
Given path 'url'
* request {abc:'ab',pqrs:'{"mno":"data","ijk":"data"}',dcb:'tata'} // Double quotes are required for 'pqrs' because thats the format of the service.
When method post
Then status 200
* def test = response.lmn
* print lmn
* def browser = Java.type('file path')
* def testing = browser.do(parameter) // 'do' function will call a java file which will return a String parameter
* print testing
Given path 'url'
* def nested = {uvw:"value",xyz:'#(testing)',ght:} //We tried storing nested variable in json format but that didn't work.
* request { abc:'ab',pqr:'#(nested)',dcb:'tata' }
When method post
Then status 200
위의 요청에 "잘못된 pqr 개체"라는 오류가 발생했습니다. 해결책을 제안하십시오.
안녕하세요, 지난 질문에 대한 답변을 수락했습니다. 위 질문에 대해 제안하십시오. – Rahul