Great tutorial! A suggestion, perhaps for a follow-up video, might be to discuss the tradeoffs between giving more test-specific data (which test it was, the input, output, expected) and when to show more than one failing test at a time. For example: t.Errorf("Test %d failed: Add(%d, %d) returned %d, expected %d ", i, test.x, test.y, result, test.expected). Some frameworks I've used will show you N failures before it bails out, which is easy to implement yourself in this kind of testing.
Great Videos, thank you. I noticed that I had to clean new lines (got = strings.TrimRight(string(buf), " ")) while you didn't have to; perhaps it's the Go library version?
In my code I'm using time.Now() due to which while comparing the time for two different variables, the value is not same Any solution to handle this case ??
Hey all, I noticed that I'm getting the following error when trying to run specific test files: # golangtestexample/project/testingfolder_test ./main_integration_test.go:1:1: +build comment must appear before package clause and be followed by a blank line # golangtestexample/project/testingfolder ./main_test.go:1:1: +build comment must appear before package clause and be followed by a blank line FAIL golangtestexample/project/testingfolder [build failed] To the best of my ability, my file appears to have been formatted correctly,(no special characters or anything), so I'm not too sure what to do with this error. Has this functionality changed since this version of Golang?
Testing adding x and y is not advanced testing. Testing a network request is not a good practice; intermittent network failures (or build systems with a firewall) will break your build.
Great tutorial! A suggestion, perhaps for a follow-up video, might be to discuss the tradeoffs between giving more test-specific data (which test it was, the input, output, expected) and when to show more than one failing test at a time. For example: t.Errorf("Test %d failed: Add(%d, %d) returned %d, expected %d
", i, test.x, test.y, result, test.expected). Some frameworks I've used will show you N failures before it bails out, which is easy to implement yourself in this kind of testing.
Thank You bro, your well explained tutorials always help me . And Thanks again for adding such informative video Love You Brother 🔥🔥🔥
thank you, a good video which helped me understand all the testing types :)
Great Videos, thank you. I noticed that I had to clean new lines (got = strings.TrimRight(string(buf), "
")) while you didn't have to; perhaps it's the Go library version?
In my code I'm using time.Now() due to which while comparing the time for two different variables, the value is not same
Any solution to handle this case ??
Do you have refrences links to folder structure of testdata/fixutres?
Hi. I have written my tests using groovy and dev code in go lang. is there a way to measure code coverage?
Thank you :)
Can you please provide the link for the directory?
Here go --@@-- github.com/golang/go --@@--
THANKS! AWESOME CHANNEL
awesome videos
omg your accent is like the Peaky Blinders, I love it \m/
12:02 is that mocking ?? Really ??
Hi Brother, Thank-you for these amazing tutorials, could you please teach us how to test microservices in which we are using Kafka.
Thank-You
很方便啊!
Hey all, I noticed that I'm getting the following error when trying to run specific test files:
# golangtestexample/project/testingfolder_test
./main_integration_test.go:1:1: +build comment must appear before package clause and be followed by a blank line
# golangtestexample/project/testingfolder
./main_test.go:1:1: +build comment must appear before package clause and be followed by a blank line
FAIL golangtestexample/project/testingfolder [build failed]
To the best of my ability, my file appears to have been formatted correctly,(no special characters or anything), so I'm not too sure what to do with this error. Has this functionality changed since this version of Golang?
Testing adding x and y is not advanced testing. Testing a network request is not a good practice; intermittent network failures (or build systems with a firewall) will break your build.
its not array, its slice... wtf
testing sucks!
Great tutorial, but for God's sake, don't pronounce FILE as FAIL. See the transcription for FILE - fīl. You pronounce it as fāl, which is FAIL.
The tolerance and understanding for accents across the globe are strong in this one!
I'm tolerant of accents across the globe, but I'm intolerant of incorrect pronunciation of basic words.
@@andrewt.5213 I think it's called Scotish English actually.