Название: Testing Elixir: Effective and Robust Testing for Elixir and Its Ecosystem Автор: Andrea Leopardi, Jeffrey Matthias Издательство: Pragmatic Bookshelf Год: July 2021 (Version: P1.0) Страниц: 256 Язык: английский Формат: pdf (true) + pdf (conv), mobi, epub Размер: 10.1 MB, 10.1 MB
Elixir is an interesting and fairly unique programming language. It provides features and concepts that can be hard to test if you’ve never dealt with anything like them. Some of those features are common in other programming languages but are more prominent in Elixir (and Erlang), such as concurrency and immutability. Other features, such as resiliency or the OTP framework, are more unique to Erlang and Elixir and can be challenging to test effectively.
From a more practical perspective, Elixir is a great language to write a testing book about because the tools and patterns we use when testing Elixir code are pretty consolidated in the Elixir community. One reason for this is that Elixir comes equipped with its own testing framework, ExUnit. We’ll explore ExUnit inside and out and we’ll learn how to use it in many different situations in order to test our applications on different levels.
Elixir is closely tied to its “parent” language, Erlang. As you likely know, Elixir compiles to the same bytecode as Erlang and runs on the Erlang virtual machine (commonly known as the BEAM). Elixir code often seamlessly calls out to Erlang code, and Elixir applications almost always depend on a few Erlang libraries. However, testing seems to be an area where the two languages have a bit less in common. The sets of tools and libraries used by the two languages don’t intersect much. For these reasons, we won’t really talk about testing in Erlang and will focus exclusively on testing in Elixir. We feel this statement is worth clarifying since the two languages are so close to each other.
Some developers write tests for their software. Some developers don’t. There is code running all over the world that doesn’t have a single test behind it. So, why do we test? We do it for a plethora of reasons, but they fit into just a few categories. First of all, we test to increase confidence that our software does what it’s supposed to do. Testing gives us confidence that our code works as expected. This is true for all kinds of testing, whether for automated tests performed by a machine or for manual tests performed by a human.
In this book we’ll focus on automated testing. Manual testing, such as QA (Quality Assurance), is fundamental for many reasons, but as developers we often get more value from automated testing. A good automated test suite allows us to have a fast feedback cycle during development and gives us tight control over how we test specific parts of our applications.
Testing Elixir is an incredible resource for developers of all skill levels. Whether you are beginning your Elixir journey and are designing your first test suite or are an experienced Elixir developer looking for reference material, there is something here for you. This book breaks down a wide range of testing concepts into modular chunks so that you can grab what you need and be on your merry, happily tested way. -Sundi Myint
Who This Book Is For: This book was written for people with a basic Elixir background who want to get better at the testing tools and practices in the Elixir ecosystem. We will skim over most Elixir concepts, such as the language constructs and data types, OTP, Ecto, and Phoenix. Instead of covering those, we’ll learn how to test those concepts and tools. Whether you’ve used Elixir just for a bit or you’re an Elixir expert, we think you’ll learn a few new things throughout the book.
Скачать Testing Elixir: Effective and Robust Testing for Elixir and Its Ecosystem
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.