Forum Discussion
4 Replies
- nmraoCommunity Hero
May be you should create new question instead of posting new question in the closed post.
- nmraoCommunity Hero
I have moved it to new question thought it is not changing the title
- nmraoCommunity Hero
Have you tried adding either of below if it is REST or HTTP SSE service which you wanted to listen to?
- REST Request test step
- HTTP Request test step
Once you add the desired step,and run it. In the raw tab, you would see the response (data) from server.
If you need that response and process it further, no need to use any third party java libraries like this thread says , just do below:
- add a groovy script test step
log.info context.response
One would see the log with response.
You will have a hold of data which you need and act further as needed.
For example:
Data from the server / raw tab shows:
Below code would filter the lines which has data and just get values say Message1, Message 2 etc
def lines = context.response.split('\n')
lines.findAll{it.contains('data')}.each {log.info it.replace('data:','')}