ورود به حساب

نام کاربری گذرواژه

گذرواژه را فراموش کردید؟ کلیک کنید

حساب کاربری ندارید؟ ساخت حساب

ساخت حساب کاربری

نام نام کاربری ایمیل شماره موبایل گذرواژه

برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید


09117307688
09117179751

در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید

دسترسی نامحدود

برای کاربرانی که ثبت نام کرده اند

ضمانت بازگشت وجه

درصورت عدم همخوانی توضیحات با کتاب

پشتیبانی

از ساعت 7 صبح تا 10 شب

دانلود کتاب The Power of Go Tests

دانلود کتاب تست های قدرت برو

The Power of Go Tests

مشخصات کتاب

The Power of Go Tests

ویرایش:  
نویسندگان:   
سری:  
 
ناشر:  
سال نشر: 2022 
تعداد صفحات: 269 
زبان: English 
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) 
حجم فایل: 4 مگابایت 

قیمت کتاب (تومان) : 76,000



ثبت امتیاز به این کتاب

میانگین امتیاز به این کتاب :
       تعداد امتیاز دهندگان : 1


در صورت تبدیل فایل کتاب The Power of Go Tests به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.

توجه داشته باشید کتاب تست های قدرت برو نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.


توضیحاتی درمورد کتاب به خارجی



فهرست مطالب

Praise for The Power of Go: Tests
Introduction
1. Programming with confidence
	Self-testing code
	The adventure begins
	Verifying the test
	Running tests with go test
	Using cmp.Diff to compare results
	New behaviour? New test.
	Test cases
	Adding cases one at a time
	Quelling a panic
	Refactoring
	Well, that was easy
	Sounds good, now what?
2. Tools for testing
	Go\'s built-in testing facilities
	Writing and running tests
	Interpreting test output
	The ``magic package\'\': testing functions that don\'t exist
	Validating our mental models
	Concurrent tests with t.Parallel
	Failures: t.Error and t.Errorf
	Abandoning the test with t.Fatal
	Writing debug output with t.Log
	Test flags: -v and -run
	Assistants: t.Helper
	t.TempDir and t.Cleanup
	Tests are for failing
	Detecting useless implementations
	Feeble tests
	Comparisons: cmp.Equal and cmp.Diff
3. Communicating with tests
	Tests capture intent
	Test names should be sentences
	Failures are a message to the future
	Are we testing all important behaviours?
	The power of combining tests
	Reading tests as docs, with gotestdox
	Definitions: ``does\'\', not ``should\'\'
	A sentence is about the right size for a unit
	Keeping behaviour simple and focused
	Shallow abstractions: ``Is this even worth it?\'\'
	Don\'t worry about long test names
	Crafting informative failure messages
	Exercising failure messages
	Executable examples
4. Errors expected
	Ignoring errors is a mistake
	Unexpected errors should stop the test
	Error behaviour is part of your API
	Simulating errors
	Testing that an error is not nil
	String matching on errors is fragile
	Sentinel errors lose useful information
	Detecting sentinel errors with errors.Is
	Wrapping sentinel errors with dynamic information
	Custom error types and errors.As
	Conclusions
5. Users shouldn\'t do that
	Constructing effective test inputs
	User testing
	Crafting bespoke bug detectors
	Table tests and subtests
	Table tests group together similar cases
	Using dummy names to mark irrelevant test inputs
	Outsourcing test data to variables or functions
	Loading test data from files
	Readers and writers versus files
	The filesystem abstraction
	Using t.TempDir for test output with cleanup
	Managing golden files
	Dealing with cross-platform line endings
	What about the inputs you didn\'t think of?
6. Fuzzy thinking
	Generating random test inputs
	Randomly permuting a set of known inputs
	Property-based testing
	Fuzz testing
	The fuzz target
	Running tests in fuzzing mode
	Failing inputs become static test cases
	Fuzzing a risky function
	Adding training data with f.Add
	A more sophisticated fuzz target
	Using the fuzzer to detect a panic
	Detecting more subtle bugs
	What to do with fuzz-generated test cases
	Fixing the implementation
7. Wandering mutants
	What is test coverage?
	Coverage profiling with the go tool
	Coverage is a signal, not a target
	Using ``bebugging\'\' to discover feeble tests
	Detecting unnecessary or unreachable code
	Automated mutation testing
	Finding a bug with mutation testing
	Running go-mutesting
	Introducing a deliberate bug
	Interpreting go-mutesting results
	Revealing a subtle test feebleness
	Fixing up the function
	Mutation testing is worth your while
8. Testing the untestable
	Building a ``walking skeleton\'\'
	The first test
	Solving big problems
	Designing with tests
	Unexported functions
	Concurrency
	Concurrency safety
	Long-running tasks
	User interaction
	Command-line interfaces
9. Flipping the script
	Introducing testscript
	Running programs with exec
	Interpreting testscript output
	The testscript language
	Negating assertions with the ! prefix
	Passing arguments to programs
	Testing CLI tools with testscript
	Checking the test coverage of scripts
	Comparing output with files using cmp
	More matching: exists, grep, and -count
	The txtar format: constructing test data files
	Supplying input to programs using stdin
	File operations
	Differences from shell scripts
	Comments and phases
	Conditions
	Setting environment variables with env
	Passing values to scripts via environment variables
	Running programs in background with &
	The standalone testscript runner
	Test scripts as issue repros
	Test scripts as… tests
	Conclusion
10. Dependence day
	Just don\'t write untestable functions
	Reduce the scope of the dependency
	Be suspicious of dependency injection
	Avoid test-induced damage
	``Chunk\'\' behaviour into subcomponents
	Reassemble the tested chunks
	Extract and isolate the key logic
	Isolate by using an adapter
	Example: a database adapter
	Fakes, mocks, stubs, doubles, and spies
	Don\'t be tempted to write mocks
	Turn time into data
11. Suite smells
	No tests
	Legacy code
	Insufficient tests
	Ineffective code review
	Optimistic tests
	Persnickety tests
	Over-precise comparisons
	Too many tests
	Test frameworks
	Flaky tests
	Shared worlds
	Failing tests
	Slow tests
	A fragrant future
About this book
	Who wrote this?
	Cover photo
	Feedback
	Mailing list
	For the Love of Go
	The Power of Go: Tools
	Know Go: Generics
	Further reading
	Credits
Acknowledgements




نظرات کاربران