liveBook · Manning

End-to-end testing

As explained in Build Python Web Apps with Streamlit

An end-to-end test evaluates the behavior of an entire application under conditions that include its real dependencies and external services.

End-to-end testing checks whether an entire application delivers the expected user experience under real-world conditions. Unlike unit and integration tests, it exercises the frontend, backend, and external services together without mocking them. section 11.2.1 section 11.6

A practical end-to-end test can:

  • Start a running Streamlit application with AppTest. section 11.6
  • Enter a realistic search term and trigger the user action. section 11.6
  • Verify that results arrive and the interface renders the expected elements. section 11.6
  • Run repeatedly after code changes, while recognizing that external services can add delay, limits, or cost. section 11.7

Movie search flow

A test creates an AppTest instance from frontend.py, runs the app, enters “Inception” in the sidebar, and clicks the search button. It then checks that session state contains results, at least one result exists, and an expander and title appear for each returned movie. The live TMDB API supplies the data, so no backend patching or mock data is used. section 11.6

How Build Python Web Apps with Streamlit covers it

How deep it goes
Demonstrates a complete AppTest flow with live API data, but stops short of comprehensive condition coverage.
Examples
Uses a MovieScout search, the Inception query, session-state results, expanders, and live TMDB responses.
What it assumes
Assumes a runnable Streamlit application and basic pytest knowledge, while teaching simulated interaction through AppTest.
What you can do after
Diagnose/debug with it by reproducing a user flow and locating failures in the combined application system.
How it connects
Connects unit testing, integration testing, automated testing, Streamlit AppTest, and external dependencies.

Also explained in

Compare how 12 books explain end-to-end testing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.