Using SoapUi I intend to make a call to a MockService and when the Response is configured to return a static message, everything seems to be fine. On the other side, if I add and send a parameter (Eg. ?PName=John), although I also changed the name in the response from "John" to ${PName}, i get nothing (an empty string). Where am I doing it wrong? Please see the attached screenshot
相关问题
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- Laravel 5.1 MethodNotAllowedHttpException on store
- Mockito : How to test my Dao with mocking?
相关文章
- How to replace file-access references for a module
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- Global Exception Handling in Jersey & Spring?
- Mocking nested properties with mock
- Can I use moq's InSequence() with MockBehavior
- REST search interface and the idempotency of GET
- Getting error detail from WCF REST
Here is how I would get the request parameters:
For example, user is passing a query parameter say
test
with valueabc
.Mock Script:
Sample response using the context:
Over all flow of data:
Use concept of properties for parametrisation. Mock Services uses the properties Value. As your property PName is not present in Custom Properties at any level of soapUI, so you are getting NULL response.
Define a property PnameValue Project Level as
Now modify your Test Request value as
Add a Mock Service with response
Start your mock Service and Trigger operation.Also you can you use different Response based on Property Values at any level of SoapUI.
Please Accept answer if it solve your problem.