[prev in list] [next in list] [prev in thread] [next in thread] 

List:       esb-java-dev
Subject:    Re: [Dev] Logging the HTTP Response Code in SoapUI
From:       Rajith Vitharana <rajithv () wso2 ! com>
Date:       2016-09-29 7:52:29
Message-ID: CAFoNQBJ1WkGd_nw8z9jUWwUWqqtutQYVoukj26WxyHambzKSAw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 29 September 2016 at 12:28, Malintha Fernando <malinthafe@wso2.com>
wrote:

> Hi Rajith,
>
> Thanks a lot for the input. I enabled the logs on SoapUI and ran the test.
> Yet couldn't see any request or a response printed under the httpLogs tab.
> That's why I thought to go for scripts. That assertion script worked for a
> single request though not for the whole load test. :/ Can't we use the same
> assertion script in load tests?
>
This seems to be available in Pro version as per the link [1]. I'm using
SoapUI 5.0.0 version and AFAIR I didn't do any changes to make http logs
visible.

[1] -
https://www.soapui.org/load-testing/scripting-possibilities.html#1-Setup-and-TearDown-scripts


Thanks,

>
> Thanks & Regards,
> Malintha
>
> On Thu, Sep 29, 2016 at 10:57 AM, Rajith Vitharana <rajithv@wso2.com>
> wrote:
>
>> Can't you use SoapUI httplog for this? (you can find it in the bottom of
>> SoapUI, but it will log the whole http response). Other than that I don't
>> think you can use setup or tear down scripts directly since they run on
>> startup and end of whole load test. In single test you can have assertion
>> script as mentioned in [1](sample will be [2]) and print the http status
>> code(you can see them in script log which again can be found in bottom of
>> SoapUI). But couldn't find a way to run that when executing the load test
>> though.
>>
>> [1] - https://community.smartbear.com/t5/SoapUI-NG/Resolved-Get-
>> HTTP-Response-Code/m-p/44044#M22923
>> [2] - def headers =  messageExchange.getResponseHeaders()
>> log.info headers["#status#"]
>>
>> Thanks,
>>
>> On 29 September 2016 at 10:19, Malintha Fernando <malinthafe@wso2.com>
>> wrote:
>>
>>> Hi All,
>>>
>>> I am doing a SoapUI load test to an APIM HTTP endpoint which has a hard
>>> throttling limit of 25 TPS. Therefore, some of the requests needs to be
>>> flooded out by the APIM and some are needed to be forwarded to the backend.
>>> Consequently, the ones forwarded to backend should return a HTTP 200
>>> response and ones which are throttled out should return a HTTP 503
>>> response.
>>>
>>> I need to log the response for each request to know which ones are
>>> throttled out and which are sent in. Apparently, it needs to be done via a
>>> SoapUI test script. (setup script or a tear down script). I have gone
>>> through their script documentation [1] and couldn't find a method to log
>>> the response code.
>>>
>>> [1]. https://www.soapui.org/load-testing/scripting-possibilities.
>>> html#1-Setup-and-TearDown-scripts
>>>
>>> Any inputs on this are appreciated.
>>>
>>> Thanks & Regards,
>>>
>>> --
>>> Malintha Fernando
>>> Software Engineer
>>> WSO2 Inc. | http://wso2.com
>>> Mobile : +94 718874922
>>> Blog : http://blog.malintha.org
>>>
>>> Lean . Enterprise . Middleware
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rajith Vitharana
>>
>> Senior Software Engineer,
>> WSO2 Inc. : wso2.com
>> Mobile : +94715883223
>> Blog : http://lankavitharana.blogspot.com/
>> <http://wso2.com/signature>
>>
>
>
>
> --
> Malintha Fernando
> Software Engineer
> WSO2 Inc. | http://wso2.com
> Mobile : +94 718874922
> Blog : http://blog.malintha.org
>
> Lean . Enterprise . Middleware
>
>
>
>
>
>
>


-- 
Rajith Vitharana

Senior Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94715883223
Blog : http://lankavitharana.blogspot.com/
<http://wso2.com/signature>

[Attachment #5 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 29 \
September 2016 at 12:28, Malintha Fernando <span dir="ltr">&lt;<a \
href="mailto:malinthafe@wso2.com" target="_blank">malinthafe@wso2.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
style="font-family:tahoma,sans-serif">Hi Rajith,<br><br></div><div \
style="font-family:tahoma,sans-serif">Thanks a lot for the input. I enabled the logs \
on SoapUI and ran the test. Yet couldn&#39;t see any request or a response printed \
under the httpLogs tab. That&#39;s why I thought to go for scripts. That assertion \
script worked for a single request though not for the whole load test. :/ Can&#39;t \
we use the same assertion script in load tests? \
<br></div></div></blockquote><div>This seems to be available in Pro version as per \
the link [1]. I&#39;m using SoapUI 5.0.0 version and AFAIR I didn&#39;t do any \
changes to make http logs visible.</div><div><br></div><div>[1] - <a \
href="https://www.soapui.org/load-testing/scripting-possibilities.html#1-Setup-and-Tea \
rDown-scripts">https://www.soapui.org/load-testing/scripting-possibilities.html#1-Setup-and-TearDown-scripts</a> \
</div><div><br></div><div>Thanks,</div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
style="font-family:tahoma,sans-serif"><br></div><div \
style="font-family:tahoma,sans-serif">Thanks &amp; Regards,<br></div><div \
style="font-family:tahoma,sans-serif">Malintha<br></div><div><div \
class="gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep \
29, 2016 at 10:57 AM, Rajith Vitharana <span dir="ltr">&lt;<a \
href="mailto:rajithv@wso2.com" target="_blank">rajithv@wso2.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">Can&#39;t you use SoapUI httplog for this? (you can find it in the bottom \
of SoapUI, but it will log the whole http response). Other than that I don&#39;t \
think you can use setup or tear down scripts directly since they run on startup and \
end of whole load test. In single test you can have assertion script as mentioned in \
[1](sample will be [2]) and print the http status code(you can see them in script log \
which again can be found in bottom of SoapUI). But couldn&#39;t find a way to run \
that when executing the load test though.<div><br></div><div>[1] -  <a \
href="https://community.smartbear.com/t5/SoapUI-NG/Resolved-Get-HTTP-Response-Code/m-p/44044#M22923" \
target="_blank">https://community.smartbear.<wbr>com/t5/SoapUI-NG/Resolved-Get-<wbr>HTTP-Response-Code/m-p/44044#M<wbr>22923</a></div><div>[2] \
- def headers =   messageExchange.getResponseHe<wbr>aders()</div><div><a \
href="http://log.info" target="_blank">log.info</a> \
headers[&quot;#status#&quot;]</div><div><br></div><div>Thanks,</div></div><div \
class="gmail_extra"><br><div class="gmail_quote"><div><div>On 29 September 2016 at \
10:19, Malintha Fernando <span dir="ltr">&lt;<a href="mailto:malinthafe@wso2.com" \
target="_blank">malinthafe@wso2.com</a>&gt;</span> wrote:<br></div></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div \
style="font-family:tahoma,sans-serif">Hi All,<br><br></div><div \
style="font-family:tahoma,sans-serif">I am doing a SoapUI load test to an APIM HTTP \
endpoint which has a hard throttling limit of 25 TPS. Therefore, some of the requests \
needs to be flooded out by the APIM and some are needed to be forwarded to the \
backend. Consequently, the ones forwarded to backend should return a HTTP 200 \
response and ones which are throttled out should return a HTTP 503 response. \
<br><br></div><div style="font-family:tahoma,sans-serif">I need to log the response \
for each request to know which ones are throttled out and which are sent in. \
Apparently, it needs to be done via a SoapUI test script. (setup script or a tear \
down script). I have gone through their script documentation [1] and couldn&#39;t \
find a method to log the response code. <br><br>[1]. <a \
href="https://www.soapui.org/load-testing/scripting-possibilities.html#1-Setup-and-TearDown-scripts" \
target="_blank">https://www.soapui.org/load-te<wbr>sting/scripting-possibilities.<wbr>html#1-Setup-and-TearDown-scri<wbr>pts</a><br><br></div><div \
style="font-family:tahoma,sans-serif">Any inputs on this are \
appreciated.<br><br></div><div style="font-family:tahoma,sans-serif">Thanks &amp; \
Regards,<span><font color="#888888"><br></font></span></div><span><font \
color="#888888"><div style="font-family:tahoma,sans-serif"><br></div>-- <br><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><div>Malintha \
Fernando<br></div>Software Engineer<br></div>WSO2 Inc. | <span><a \
href="http://wso2.com" \
target="_blank">http://wso2.com</a></span><br><span><div>Mobile : <a \
href="tel:%2B94%20718874922" value="+94718874922" target="_blank">+94 \
718874922</a><br></div>Blog : <a href="http://blog.malintha.org" \
target="_blank">http://blog.malintha.org</a><br><br></span><span>Lean . Enterprise . \
Middleware<br><br></span></div><br></div><div><br></div><br><span><font \
color="#888888"><div><br></div></font></span><br></div></div></div></div></div></div> \
</font></span></div> \
<br></div></div>______________________________<wbr>_________________<br> Dev mailing \
list<br> <a href="mailto:Dev@wso2.org" target="_blank">Dev@wso2.org</a><br>
<a href="http://wso2.org/cgi-bin/mailman/listinfo/dev" rel="noreferrer" \
target="_blank">http://wso2.org/cgi-bin/mailma<wbr>n/listinfo/dev</a><br> \
<br></blockquote></div><span><font color="#888888"><br><br \
clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><span \
style="color:rgb(34,34,34)">Rajith Vitharana</span><br \
style="color:rgb(34,34,34)"><br style="color:rgb(34,34,34)"><span \
style="color:rgb(34,34,34)">Senior Software Engineer,</span><br \
style="color:rgb(34,34,34)"><span style="color:rgb(34,34,34)">WSO2 Inc. :  </span><a \
href="http://wso2.com/" style="color:rgb(136,136,136)" \
target="_blank">wso2.com</a><br style="color:rgb(34,34,34)"><span \
style="color:rgb(34,34,34)">Mobile :  </span><a title="Call Now" \
style="color:rgb(136,136,136)">+94715883223</a><br></div><div \
style="color:rgb(136,136,136)"><span style="color:rgb(34,34,34)">Blog :  </span><a \
href="http://lankavitharana.blogspot.com/" \
target="_blank">http://lankavitharana.blogsp<wbr>ot.com/</a></div><div \
style="color:rgb(136,136,136)"><a href="http://wso2.com/signature" \
target="_blank"><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png" \
alt=""></a><br></div></div></div></div></div> </font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div><div><div>Malintha Fernando<br></div>Software \
Engineer<br></div>WSO2 Inc. | <span><a href="http://wso2.com" \
target="_blank">http://wso2.com</a></span><br><span><div>Mobile : <a \
href="tel:%2B94%20718874922" value="+94718874922" target="_blank">+94 \
718874922</a><br></div>Blog : <a href="http://blog.malintha.org" \
target="_blank">http://blog.malintha.org</a><br><br></span><span>Lean . Enterprise . \
Middleware<br><br></span></div><br></div><div><br></div><br><span><font \
color="#888888"><div><br></div></font></span><br></div></div></div></div></div></div> \
</div></div></div></div> </blockquote></div><br><br clear="all"><div><br></div>-- \
<br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span \
style="color:rgb(34,34,34)">Rajith Vitharana</span><br \
style="color:rgb(34,34,34)"><br style="color:rgb(34,34,34)"><span \
style="color:rgb(34,34,34)">Senior Software Engineer,</span><br \
style="color:rgb(34,34,34)"><span style="color:rgb(34,34,34)">WSO2 Inc. :  </span><a \
href="http://wso2.com/" style="color:rgb(136,136,136)" \
target="_blank">wso2.com</a><br style="color:rgb(34,34,34)"><span \
style="color:rgb(34,34,34)">Mobile :  </span><a title="Call Now" \
style="color:rgb(136,136,136)">+94715883223</a><br></div><div \
style="color:rgb(136,136,136)"><span style="color:rgb(34,34,34)">Blog :  </span><a \
href="http://lankavitharana.blogspot.com/" \
target="_blank">http://lankavitharana.blogspot.com/</a></div><div \
style="color:rgb(136,136,136)"><a href="http://wso2.com/signature" \
target="_blank"><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png" \
alt=""></a><br></div></div></div></div></div> </div></div>



_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic