Re: [go-nuts] [testing] best practices for the test (client-server)

2023-08-07 Thread Eli Lindsey
net/http/httptest is a great package, either to use if your server is 
http-based or to emulate if you’re testing other protocols. I’ve also found 
io.Pipe to frequently be useful for this kind of testing.

I’d recommend reading through how net/http and x/net/http2 structures their 
tests.

-eli

> On Aug 7, 2023, at 8:27 AM, sumith s  wrote:
> 
> Hi,
> 
> Anyone have suggestion for writing test  cases (best practices ) for client 
> server communication.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/3fcc47e1-9610-4fa9-b2a8-bf7a408f546dn%40googlegroups.com
>  
> .

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8AABDA94-74A2-4D5D-B555-E2EBFA3A2ACF%40siliconsprawl.com.


[go-nuts] [testing] best practices for the test (client-server)

2023-08-07 Thread sumith s
Hi,

Anyone have suggestion for writing test  cases (best practices ) for client 
server communication.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3fcc47e1-9610-4fa9-b2a8-bf7a408f546dn%40googlegroups.com.