Testing Elixir: Effective and Robust Testing for Elixir and Its Ecosystem
暫譯: 測試 Elixir:有效且穩健的 Elixir 及其生態系統測試
Leopardi, Andrea, Matthias, Jeffrey
- 出版商: Pragmatic Bookshelf
- 出版日期: 2021-08-17
- 售價: $1,575
- 貴賓價: 9.5 折 $1,496
- 語言: 英文
- 頁數: 220
- 裝訂: Quality Paper - also called trade paper
- ISBN: 1680507826
- ISBN-13: 9781680507829
-
相關分類:
Functional-programming
立即出貨 (庫存=1)
買這商品的人也買了...
相關主題
商品描述
Elixir offers new paradigms, and challenges you to test in unconventional ways. Start with ExUnit: almost everything you need to write tests covering all levels of detail, from unit to integration, but only if you know how to use it to the fullest - we'll show you how. Explore testing Elixir-specific challenges such as OTP-based modules, asynchronous code, Ecto-based applications, and Phoenix applications. Explore new tools like Mox for mocks and StreamData for property-based testing. Armed with this knowledge, you can create test suites that add value to your production cycle and guard you from regressions.
Write Elixir tests that you can be proud of. Dive into Elixir's test philosophy and gain mastery over the terminology and concepts that underlie good tests. Create and structure a comprehensive ExUnit test suite, starting from the basics, and build comprehensive test coverage that will provide safety for refactoring and confidence that your code performs as designed. Use tests to make your software more reliable and fault tolerant.
Explore the basic tool set provided by ExUnit and Mix to write and organize your test suite. Test code built around different OTP functionality. Isolate your code through dependency injection and by using Mox. Write comprehensive tests for Ecto projects, covering Ecto as a database tool as well as a standalone data validation tool. Test Phoenix channels from end to end, including authentication and joining topics. Write Phoenix controller tests and understand the concepts of integration testing in Elixir. Learn property-based testing with StreamData from the author who wrote the library.
Code with high confidence that you are getting the most out of your test suite, with the right tools that make testing your code a pleasure and a valuable part of your development cycle.
What You Need:
To get the most out of this book, you will need to have installed Elixir 1.8 or later and Erlang/OTP 21 or later. In order to complete the relevant chapters, you will also need Ecto 3.1 or later, EctoSQL 3.1 or later and Phoenix 1.3 or later.
商品描述(中文翻譯)
Elixir 提供了新的範式,並挑戰您以非常規的方式進行測試。從 ExUnit 開始:幾乎所有您需要的測試工具都涵蓋了從單元測試到整合測試的所有細節,但前提是您知道如何充分利用它——我們將告訴您如何做到。探索 Elixir 特有的測試挑戰,例如基於 OTP 的模組、非同步代碼、基於 Ecto 的應用程式以及 Phoenix 應用程式。探索新的工具,如 Mox 用於模擬和 StreamData 用於基於屬性的測試。掌握這些知識後,您可以創建測試套件,為您的生產週期增值並防止回歸。
撰寫您可以引以為傲的 Elixir 測試。深入了解 Elixir 的測試哲學,掌握良好測試所需的術語和概念。從基礎開始,創建和結構一個全面的 ExUnit 測試套件,並建立全面的測試覆蓋率,為重構提供安全保障,並確保您的代碼按設計運行。利用測試使您的軟體更可靠且具容錯性。
探索 ExUnit 和 Mix 提供的基本工具集,以編寫和組織您的測試套件。測試圍繞不同 OTP 功能構建的代碼。通過依賴注入和使用 Mox 隔離您的代碼。為 Ecto 專案撰寫全面的測試,涵蓋 Ecto 作為數據庫工具以及獨立的數據驗證工具。從端到端測試 Phoenix 通道,包括身份驗證和主題加入。撰寫 Phoenix 控制器測試,並理解 Elixir 中整合測試的概念。向撰寫該庫的作者學習使用 StreamData 進行基於屬性的測試。
自信地編寫代碼,確保您充分利用測試套件,使用正確的工具使測試代碼變得愉快,並成為開發週期中有價值的一部分。
您需要的條件:
為了充分利用本書,您需要安裝 Elixir 1.8 或更高版本以及 Erlang/OTP 21 或更高版本。為了完成相關章節,您還需要 Ecto 3.1 或更高版本、EctoSQL 3.1 或更高版本以及 Phoenix 1.3 或更高版本。
作者簡介
Andrea Leopardi is a software developer and engineer with a passion for programming and code design. He loves beautiful and thoroughly tested code. He's a member of the core team of the Elixir programming language. He's also a frequent public speaker and trainer.
Jeffrey Matthias is a software engineer and industrial designer who loves modularity and quick feedback loops, two things that testing can help facilitate in code. When he's not coding, he's (helping his awesome wife with) raising his two kids and starting projects that he might finish someday.
作者簡介(中文翻譯)
安德烈亞·利奧帕爾迪是一位軟體開發者和工程師,對程式設計和程式碼設計充滿熱情。他喜愛美觀且經過徹底測試的程式碼。他是Elixir程式語言核心團隊的成員,同時也是一位經常公開演講和授課的講者。
傑佛瑞·馬提亞斯是一位軟體工程師和工業設計師,熱愛模組化和快速反饋迴圈,這兩者都是測試能夠促進程式碼品質的關鍵因素。當他不在編寫程式碼時,他會(幫助他出色的妻子)撫養兩個孩子,並開始一些他可能有一天會完成的專案。