MockService: How to anser a request with special HTTP status
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2011
11:56 PM
04-13-2011
11:56 PM
MockService: How to anser a request with special HTTP status
Hi,
first I have to say that I really like soapUI. I use MockService for testing client software.
I would like to answer a request with another HTTP status code than 200. I already used script inside response. Here you find my snippet:
In dialog "MockResponse Properties" I can observe the value 401 in property "Response HTTP-Status"
After sending a request to MockService by jMeter I always see "Response code: 200".
Could you please give me a hint? Thanks in advance.
Best Regards
Dirk O. Schweier
first I have to say that I really like soapUI. I use MockService for testing client software.
I would like to answer a request with another HTTP status code than 200. I already used script inside response. Here you find my snippet:
mockResponse.setResponseHttpStatus("401")
In dialog "MockResponse Properties" I can observe the value 401 in property "Response HTTP-Status"
After sending a request to MockService by jMeter I always see "Response code: 200".
Could you please give me a hint? Thanks in advance.
Best Regards
Dirk O. Schweier
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2011
06:40 AM
04-18-2011
06:40 AM
Hi Dirk!
I just tested with soapUI 3.6.2 nightly build and it works just fine. Could you please send your project to support@eviware.com?
(I find kind of strange that you use an external load testing tool (JMeter) to functionally test a soapUI mock service. Functional testing is probably the single area where soapUI shines the most.)
Best regards
/Henrik
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
I just tested with soapUI 3.6.2 nightly build and it works just fine. Could you please send your project to support@eviware.com?
(I find kind of strange that you use an external load testing tool (JMeter) to functionally test a soapUI mock service. Functional testing is probably the single area where soapUI shines the most.)

Best regards
/Henrik
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2011
11:02 PM
04-18-2011
11:02 PM
Hi Henrik,
thanks for your answer.
It is not a question that I do not trust in soapUI and its functionality. In my case I set up a MockService as a testing tool for client software. Whenever I have to insert scripts or code into test tools I am very strict regarding validation of these tools. So, by using another tool I think I avoid side effects.
But okay, I will never again call another tool by name. I just talk about another tool.
In my post I really forgot to mention that I am using soapUI 3.6.1. Sorry for that. I think I will stick to this version because using a nightly build should cause some trouble regarding configuration management in our project. We have to make sure that every tester uses the same snapshot.
I am looking forward to read your answer on my mail to your support account. Thanks in advance.
Best Regards
Dirk O. Schweier
thanks for your answer.
It is not a question that I do not trust in soapUI and its functionality. In my case I set up a MockService as a testing tool for client software. Whenever I have to insert scripts or code into test tools I am very strict regarding validation of these tools. So, by using another tool I think I avoid side effects.
But okay, I will never again call another tool by name. I just talk about another tool.

In my post I really forgot to mention that I am using soapUI 3.6.1. Sorry for that. I think I will stick to this version because using a nightly build should cause some trouble regarding configuration management in our project. We have to make sure that every tester uses the same snapshot.
I am looking forward to read your answer on my mail to your support account. Thanks in advance.
Best Regards
Dirk O. Schweier
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019
10:58 PM
02-18-2019
10:58 PM
[SoapUI 5.5.0] uses:
mockResponse.setResponseHttpStatus(401)
without the quotes
