Elixir Test Genserver

Download Elixir Test Genserver PDF/ePub or read online books in Mobi eBooks. Click Download or Read Online button to get Elixir Test Genserver book now. This website allows unlimited access to, at the time of writing, more than 1.5 million titles, including hundreds of thousands of titles in various foreign languages.
Testing Elixir

Author: Andrea Leopardi
language: en
Publisher: The Pragmatic Programmers LLC
Release Date: 2021-07-13
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.
Mastering the Art of Elixir Programming: Unraveling the Secrets of Expert-Level Programming

Unlock the full potential of Elixir with "Mastering the Art of Elixir Programming: Unraveling the Secrets of Expert-Level Programming." This comprehensive guide meticulously explores advanced techniques and practices essential for crafting resilient and scalable applications. Written for experienced developers, this book delves deep into Elixir's most powerful features—from its impressive concurrency model and dynamic pattern matching to its robust fault tolerance and real-time communication capabilities. Each chapter is crafted to enhance your understanding of Elixir's unique offerings. You'll discover how to leverage the power of OTP, craft elegant code with advanced pattern matching, and streamline development with essential libraries and tools within the Elixir ecosystem. Cutting-edge topics such as metaprogramming, system design, profiling, and optimization provide you with the knowledge to build high-performance applications that excel in today’s demanding environments. With an emphasis on practical applications and real-world scenarios, this guide empowers you to apply these concepts with confidence in your projects. Whether you're looking to raise the standard of your current Elixir applications or seeking to explore new possibilities within the language, this book is an indispensable resource. "Mastering the Art of Elixir Programming" is not just about learning techniques; it's about gaining a deep understanding that allows you to innovate and excel in the rapidly evolving world of software development. Equip yourself with the expertise needed to lead in crafting cutting-edge, efficient, and reliable software solutions with Elixir.
Functional Web Development with Elixir, OTP, and Phoenix

Author: Lance Halvorsen
language: en
Publisher: The Pragmatic Programmers LLC
Release Date: 2018-01-25
Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web applications. For decades OTP has helped developers create incredibly robust, scalable applications with unparalleled uptime. Make the most of them as you build a stateful web app with Elixir, OTP, and Phoenix. Model domain entities without an ORM or a database. Manage server state and keep your code clean with OTP Behaviours. Layer on a Phoenix web interface without coupling it to the business logic. Open doors to powerful new techniques that will get you thinking about web development in fundamentally new ways. Elixir and OTP provide exceptional tools to build rock-solid back-end applications that scale. In this book, you'll build a web application in a radically different way, with a back end that holds application state. You'll use persistent Phoenix Channel connections instead of HTTP's request-response, and create the full application in distinct, decoupled layers. In Part 1, start by building the business logic as a separate application, without Phoenix. Model the application domain with Elixir functions and simple data structures. By keeping state in memory instead of a database, you can reduce latency and simplify your code. In Part 2, add in the GenServer Behaviour to make managing in-memory state a breeze. Create a supervision tree to boost fault tolerance while separating error handling from business logic. Phoenix is a modern web framework you can layer on top of business logic while keeping the two completely decoupled. In Part 3, you'll do exactly that as you build a web interface with Phoenix. Bring in the application from Part 2 as a dependency to a new Phoenix project. Then use ultra-scalable Phoenix Channels to establish persistent connections between the stateful server and a stateful front-end client. You're going to love this way of building web apps! What You Need: You'll need a computer that can run Elixir version 1.5 or higher and Phoenix 1.3 or higher. Some familiarity with Elixir and Phoenix is recommended.