Forwarded from Go Casts 🚀
دوستان سلام، در مورد تست نویسی در golang یه سری مقاله خیلی خوب بهتون معرفی میکنم، با خوندن این سری مقاله، عملا هر آنچه که در مورد تست نویسی در گولنگ باید بدونید رو یاد میگیرد، بقیه ش دیگه میشه تمرین و تجربه در کار...
Testing in Go: First Principles
https://ieftimov.com/post/testing-in-go-first-principles/
Testing in Go: Failing Tests
https://ieftimov.com/post/testing-in-go-failing-tests/
Testing in Go: Writing Practical Failure Messages
https://ieftimov.com/post/testing-in-go-writing-practical-failure-messages/
Testing in Go: go test
https://ieftimov.com/post/testing-in-go-go-test/
Testing in Go: Table-Driven Tests
https://ieftimov.com/post/testing-in-go-table-driven-tests/
Testing in Go: Subtests
https://ieftimov.com/post/testing-in-go-subtests/
Testing in Go: Fixtures
https://ieftimov.com/post/testing-in-go-fixtures/
Testing in Go: Dependency Injection
https://ieftimov.com/post/testing-in-go-dependency-injection/
Testing in Go: Test Doubles by Example
https://ieftimov.com/post/testing-in-go-test-doubles-by-example/
Testing in Go: Golden Files
https://ieftimov.com/post/testing-in-go-golden-files/
Testing in Go: Clean Tests Using t.Cleanup
https://ieftimov.com/post/testing-in-go-clean-tests-using-t-cleanup/
Testing in Go: HTTP Servers
https://ieftimov.com/post/testing-in-go-testing-http-servers/
Testing in Go: WebSockets
https://ieftimov.com/post/testing-in-go-websockets/
Testing in Go: Stop Leaking Files
https://ieftimov.com/post/testing-in-go-stop-leaking-files/
#golang #test #unit_test #integration_test #tdd
@gocasts
Testing in Go: First Principles
https://ieftimov.com/post/testing-in-go-first-principles/
Testing in Go: Failing Tests
https://ieftimov.com/post/testing-in-go-failing-tests/
Testing in Go: Writing Practical Failure Messages
https://ieftimov.com/post/testing-in-go-writing-practical-failure-messages/
Testing in Go: go test
https://ieftimov.com/post/testing-in-go-go-test/
Testing in Go: Table-Driven Tests
https://ieftimov.com/post/testing-in-go-table-driven-tests/
Testing in Go: Subtests
https://ieftimov.com/post/testing-in-go-subtests/
Testing in Go: Fixtures
https://ieftimov.com/post/testing-in-go-fixtures/
Testing in Go: Dependency Injection
https://ieftimov.com/post/testing-in-go-dependency-injection/
Testing in Go: Test Doubles by Example
https://ieftimov.com/post/testing-in-go-test-doubles-by-example/
Testing in Go: Golden Files
https://ieftimov.com/post/testing-in-go-golden-files/
Testing in Go: Clean Tests Using t.Cleanup
https://ieftimov.com/post/testing-in-go-clean-tests-using-t-cleanup/
Testing in Go: HTTP Servers
https://ieftimov.com/post/testing-in-go-testing-http-servers/
Testing in Go: WebSockets
https://ieftimov.com/post/testing-in-go-websockets/
Testing in Go: Stop Leaking Files
https://ieftimov.com/post/testing-in-go-stop-leaking-files/
#golang #test #unit_test #integration_test #tdd
@gocasts
Ilija Eftimov 👨🚀
Testing in Go: First Principles
If you have any programming experience, whether that’s as a student or a professional, there’s a good chance you have heard about testing.
Forwarded from Go Casts 🚀
اساسا تست نویسی مقوله ای بسیار ساده، بسیار لذت بخش و در عین حال بسیار کارآمد هست.
دقت کنید وقتی صحبت از تست نویسی میشه منظور tdd نیست، tdd صرفا یک approach هست برای تست نوشتن، شما میتونید این روش رو استفاده کنید و یا نکنید
تست نویسی انواع مختلفی داره:
unit test
integration test
end to end test
که هر کدوم ارزش و جایگاه خودشونو دارن
تست نویسی واسه وقتایی که حوصله development ندارید مثل کافئین میمونه 😃
و وقتی ارزش خودشو نشون میده که لازم باشه یه چیزی رو refactor کنید، مخصوصا اگه refactor بزرگ باشه خیلی ریسک انجامش بالا میره، اگه از قبل تست های قابل اطمینان و جامعی براش نوشته باشید دیگه خیالتون میتونه تا حدود خیلی زیادی بابت refactor کردن راحت باشه
#golang #test #unit_test #integration_test #tdd
@gocasts
دقت کنید وقتی صحبت از تست نویسی میشه منظور tdd نیست، tdd صرفا یک approach هست برای تست نوشتن، شما میتونید این روش رو استفاده کنید و یا نکنید
تست نویسی انواع مختلفی داره:
unit test
integration test
end to end test
که هر کدوم ارزش و جایگاه خودشونو دارن
تست نویسی واسه وقتایی که حوصله development ندارید مثل کافئین میمونه 😃
و وقتی ارزش خودشو نشون میده که لازم باشه یه چیزی رو refactor کنید، مخصوصا اگه refactor بزرگ باشه خیلی ریسک انجامش بالا میره، اگه از قبل تست های قابل اطمینان و جامعی براش نوشته باشید دیگه خیالتون میتونه تا حدود خیلی زیادی بابت refactor کردن راحت باشه
#golang #test #unit_test #integration_test #tdd
@gocasts