Testing LiveView

Learn to test LiveView effectively. Gain trust in your code. Ship confidently.

Write tests that don't slow you down

Phoenix LiveView brings a new set of testing tools and requires a new way of thinking about our tests.

Don't write tests that:

only the original author understands
fail intermittently, costing you hundreds of hours of development time
run so slow you check Twitter every time you run them

Instead, master LiveView's new testing tools, learn the thought process behind what, when, and how to test LiveView, and rediscover the joy of having tests that are

fast ๐ŸŽ
robust ๐Ÿ’ช, and
easy to maintain ๐Ÿ› 

The Course Outline

We'll cover everything you need to know. From fundamentals to mastery. And I'll keep publishing videos for testing-related changes until LiveView hits 1.0!

Testing a twitter clone

Throughout the course we'll test (and build) a twitter clone, a real application full of trade-offs and edge cases.

  • Testing Rendering

    The basics of setting up a LiveView test and making sure the initial page renders the correct information.

  • Scoping Assertions

    Let's get more precise about what we expect from LiveView's UI.

  • Testing Rendering Components

    A parent LiveView renders a list of LiveComponents. What should we test in the LiveView, and how should we test it?

  • Testing Live Components (Parts 1 & 2)

    How to test LiveComponents, what to test in them, and how to target elements that aren't simple text.

  • Testing Page Interactions

    Test interactivity from the perspective of the user. Targeting elements, clicking them, and expecting responses users can see.

  • Testing Live Patch

    When to test and when not to test live patch. And what are the alternatives?

  • Testing Live Navigation

    How to test navigation from LiveViews to other LiveViews and non-LiveViews.

  • Testing Forms

    Testing form submissions, changes, validations, and redirections.

  • Testing Event-Driven UIs

    Testing event-driven updates to our Twitter clone.

  • Displaying New Posts

    Test users interacting with a page to show new posts.

  • Testing a User Can Like a Post (Parts 1-3)

    A deep dive into considering how to test interactions between LiveView, stateful LiveComponents, and the rest of our application.

  • Testing Broadcasting Likes (Parts 1 & 2)

    Seeing our own UI react to changes is not enough. We want to harness the power of Phoenix so that all users can see those changes too.

  • Making tests easy to read and understand

    As developers we spend a large portion of our time reading code. Let's see how to write our tests in a way that our colleagues (and our future selves) will easily understand.

Watwitter (our twitter clone) Timeline

Coming Soon

The course is currently early access, but these videos are already in the works.

  • Complex Assertions with Floki

    How Floki can help us when the built-in testing tools cannot give us what we need. Use with care.

  • Testing JS Hooks

    Testing that we can scroll infinitely with JavaScript hooks.

  • Testing Uploads

    Testing uploading images to our posts.

Terminal showing test error

And even more...

Even more lessons to come like testing isolated, non-routable LiveViews, test-driving LiveViews from the outside-in, testing time-based updates to UIs, where LiveViews fit in the testing pyramid, and any test-related changes to LiveView until it hits v1.0!

Check out a sample lesson

Pricing

The Basic Course

$119
$79
  • All videos (current and future)

  • Access to the source code with detailed commits

The Full Course

$149
$99
  • All videos (current and future)

  • Access to the source code with detailed commits

  • Comment on any lesson along with other Elixirists

  • Detailed notes for all videos, so you can quickly reference anything without having to scrub through the video

  • Suggest topics for future videos

  • Message me about a difficult LiveView testing scenario you're currently experiencing, and I'll do my best to help, or even make a lesson of it!

Team Licenses

Buying for your team? Get the Full Course for your team at discounted prices.

Frequently asked questions

Canโ€™t find the answer youโ€™re looking for?

Send me an email

Who is this course for?
Developers who want to learn to test LiveView effectively, without creating tests that are brittle, slow, and hard to maintain.
What are the videos like?
Tons of live coding. You'll learn from the contents of the videos, but you'll also see my process for testing and interacting with code. You might even get inspired by my TDD flow and the editor setup that lets me run tests at the speed of thought.
How many lessons are there?
So far there are 19 lessons ready to go (over two hours of content). But I have more lessons in the works, and I plan to release content until LiveView hits 1.0!
LiveView is pre-1.0. What about changes in LiveView?
I'll add new videos when testing needs change until LiveView hits v1.0, so you can be confident you'll always know the latest on testing LiveView.
Do I need to know any LiveView?
I assume knowledge of LiveView in the course. Though you don't need to be an expert, it helps if you've seen it before. If you've never used LiveView, I recommend The Pragmatic Studio's LiveView Course.
Can I buy this for my team?
Definitely! Grab a team license (with a discount) that fits your team size.
Can I get a refund if I don't like the course?
Absolutely.
What if the course is too expensive for me because I live in a different country?
No problem, I'm happy to give you a discount. Just send me an email and the country where you live, along with a suggested reasonable price for you in your country.
German Velasco

About Me

German Velasco

I'm a software developer who's been practicing test-driven development for almost a decade.

You might recognize me from my Testing LiveView ElixirConf talk, my TDD Phoenix book, or one of my blog posts.

For the past four years, I've been helping clients deal with slow test suites, intermittent failures, difficult test cases, and more.

Testing is my passion. I love thinking about it, iterating on practices, and figuring out how to write tests that are valuable, stable, and easy to maintain.

Still unsure?

Sign up to find out when new lessons are published

ยฉ 2021, German Velasco