Property-Based Testing with PropEr in Elixir

Gain insights into property-based testing with PropEr in Elixir. Learn foundational principles, custom data generators, and advanced concepts for effective real-world application testing.

Intermediate

88 Lessons

17h 30min

Certificate of Completion

Gain insights into property-based testing with PropEr in Elixir. Learn foundational principles, custom data generators, and advanced concepts for effective real-world application testing.

AI-POWERED

Explanations

AI-POWERED

Explanations

This course includes

54 Playgrounds
5 Quizzes

This course includes

54 Playgrounds
5 Quizzes

Course Overview

Property-based testing relies on specifying some property of code, unlike unit tests, which specify the expected output in response to some inputs. In this course, we'll cover the concepts we need to feel confident about using even the most advanced features of PropEr with Elixir. We'll start with the basic and foundational principles of property-based testing, see what the framework offers us to get started, make our way through thinking in properties, write our own custom data generators, and then learn ...Show More

What You'll Learn

Understand the concepts of PropEr.

Understand the role of generators in property in property-based testing.

Have a clear sense where property-based testing has an advantage over Eunit tests and vice versa.

Be able to use stateful properties with ease.

Learn how to write State Machine Properties.

Understand property-based testing

What You'll Learn

Understand the concepts of PropEr.

Show more

Course Content

1.

Foundations of Property-Based Testing

Get familiar with property-based testing principles, frameworks, and their implementation in Elixir.
2.

Writing Properties

Look at writing properties, file and property structures, execution models, and default generators.
3.

Thinking in Properties

Explore transitioning to property-based testing with modeling, generalizing tests, invariants, and symmetric properties.
4.

Custom Generators

Break down complex ideas of custom generators for comprehensive property-based testing.
5.

Responsible Testing

Take a closer look at responsible testing with Elixir, emphasizing adaptable unit testing and CSV parsing.
6.

Properties-Driven Development

9 Lessons

Focus on defining and validating properties, handling special pricing, and using negative testing.
7.

Shrinking

5 Lessons

Master the steps to optimize counterexample handling in PropEr using the shrink and let_shrink macros.
8.

Stateful Properties

8 Lessons

Learn how to use stateful property-based testing for verifying complex system behaviors.
9.

Case Study: Bookstore

11 Lessons

Get started with testing a PostgreSQL-based bookstore in Elixir, focusing on stateful properties.
10.

State Machine Properties

11 Lessons

Examine finite state machines for robust testing, focusing on circuit breakers and model adjustments.
11.

Conclusion

1 Lesson

Apply your skills to implement property-based testing for improved software quality and reliability.

Trusted by 1.4 million developers working at companies

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Evan Dunbar

ML Engineer

Carlos Matias La Borde

Software Developer

Souvik Kundu

Front-end Developer

Vinay Krishnaiah

Software Developer

Eric Downs

Musician/Entrepeneur

Kenan Eyvazov

DevOps Engineer

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Hands-on Learning Powered by AI

See how Educative uses AI to make your learning more immersive than ever before.

Instant Code Feedback

Evaluate and debug your code with the click of a button. Get real-time feedback on test cases, including time and space complexity of your solutions.

AI-Powered Mock Interviews

Adaptive Learning

Explain with AI

AI Code Mentor