توضیحاتی در مورد کتاب Testing Elixir: Effective and Robust Testing for Elixir and its Ecosystem
نام کتاب : Testing Elixir: Effective and Robust Testing for Elixir and its Ecosystem
ویرایش : 1
عنوان ترجمه شده به فارسی : تست اکسیر: آزمایش موثر و قوی برای اکسیر و اکوسیستم آن
سری :
نویسندگان : Andrea Leopardi, Jeffrey Matthias
ناشر : Pragmatic Bookshelf
سال نشر : 2021
تعداد صفحات : 256
ISBN (شابک) : 1680507826 , 9781680507829
زبان کتاب : English
فرمت کتاب : pdf
حجم کتاب : 7 مگابایت
بعد از تکمیل فرایند پرداخت لینک دانلود کتاب ارائه خواهد شد. درصورت ثبت نام و ورود به حساب کاربری خود قادر خواهید بود لیست کتاب های خریداری شده را مشاهده فرمایید.
فهرست مطالب :
Cover
Table of Contents
Acknowledgments
Andrea Leopardi
Jeffrey Matthias
Introduction
Why Do We Need a Book for Testing in Elixir?
Who This Book Is For
How to Read This Book
About the Code
Online Resources
1. Unit Tests
Defining the Unit in Unit Test
Testing with ExUnit
Organizing Your Tests
Creating Comprehensive Test Coverage
Testing Pure Functions
Refactoring Toward Pure Functions
Isolating Code
Wrapping Up
2. Integration and End-to-End Tests
What Is an Integration Test?
Testing Against Real External Dependencies
Dependency Doubles
Interfacing to External Dependencies with Behaviours
Test Doubles: Stubs, Mocks, and Fakes
The Hidden Benefits of Dependency Doubles
Testing the Actual Interaction with Services
End-to-End Tests
Wrapping Up
3. Testing OTP
Testing a GenServer
Controlling the Life Cycle of OTP Processes in Tests
Testing Periodic Actions
Testing Singleton Resources
Testing Resiliency
Wrapping Up
4. Testing Ecto Schemas
Testing Your Schema Through Changesets
Refactoring to Increase Test Maintainability
Creating a SchemaCase for Shared Test Code
Testing an Ecto Schema as a Data Validator
Testing an Ecto Schema for Database Interactions
Testing Your Schema Through Database Calls
Setting Up Sandbox Mode
Wrapping Up
5. Testing Ecto Queries
Creating a Factory to Help with Setup
Adding a DataCase to Help with Setup
Testing Create
Testing Read
Testing Update
Testing Delete
Wrapping Up
6. Testing Phoenix
The Role of Phoenix in Your Application
Testing JSON-Based APIs
Testing Server-Rendered HTML Applications
Testing Phoenix Channels
Wrapping Up
7. Property-Based Testing
Property-Based Testing in Practice in the Elixir Standard Library
Example-Based Tests
Introducing Randomness and Property-Based Testing
Data Generation
Writing Properties
Shrinking
Strategies for Designing Properties
Stateful Property-Based Testing
Wrapping Up
A1. When To Randomize Test Data
A2. Test Life Cycle
The Life Cycle of an ExUnit Suite
Test Cases
Executing Tests
An Example and a Drawing
A3. Test Coverage
Built-In Test Coverage
Coveralls and the Excoveralls Library
Bibliography
Index
– A –
– B –
– C –
– D –
– E –
– F –
– G –
– H –
– I –
– J –
– L –
– M –
– N –
– O –
– P –
– Q –
– R –
– S –
– T –
– U –
– V –
– W –