How can I test for a Connection refused error
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2010
01:51 PM
01-27-2010
01:51 PM
How can I test for a Connection refused error
I have a test case where the expected action is that the server should not be accessable and therefore a Connection refused return is expected.
The Java system reports an error as below:
Thu Jan 28 09:57:47 NZDT 2010:ERROR:Exception in request: java.net.ConnectException: Connection refused
Is there any thing I can do to trap this error or to allow the error to occur and still have the tests validate that nothing was returned, in response to the call.
Thanks
Kevin
The Java system reports an error as below:
Thu Jan 28 09:57:47 NZDT 2010:ERROR:Exception in request: java.net.ConnectException: Connection refused
Is there any thing I can do to trap this error or to allow the error to occur and still have the tests validate that nothing was returned, in response to the call.
Thanks
Kevin
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2010
03:59 AM
01-28-2010
03:59 AM
You need to write a script which will look at the MessageExchange object to check if the connection exists.
/Nenad
http://eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
/Nenad
http://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
03-16-2010
04:30 PM
03-16-2010
04:30 PM
Hello
I have finally had a chance to get back to this. The problem with the suggestion is that because the connection is refused, an exception is thrown and no MessageExchange object is available to be queried.
I have looked at trying a groovy script following the failing step, but because of the exception, there again is no MessageExchange object to be used.
A second issue is that because of the exception, the script is shown to have failed, even though this is the correct expected result.
Cheers Kevin
I have finally had a chance to get back to this. The problem with the suggestion is that because the connection is refused, an exception is thrown and no MessageExchange object is available to be queried.
I have looked at trying a groovy script following the failing step, but because of the exception, there again is no MessageExchange object to be used.
A second issue is that because of the exception, the script is shown to have failed, even though this is the correct expected result.
Cheers Kevin
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2017
07:26 AM
01-10-2017
07:26 AM
I'm currently facing the same problem and was not able to find a solution so far... after all these years have you figure out a way to solve this issue?
