1. Junior

    What distinguishes a unit test in a Flutter project?

    A unit test exercises a function or class in isolation quickly, and is suited to domain rules and conversions without running the Flutter engine or the UI.

    Read the full explanation
  2. Junior

    When do you use a widget test in Flutter?

    A widget test runs part of the widget tree and measures visible behavior and interaction with fake dependencies at reasonable speed.

    Read the full explanation
  3. Mid-level

    What is the role of an integration test and when is it worth its cost?

    An integration test verifies a complete flow across the app and platform such as login or payment, but it is slower and more dependent on the environment.

    Read the full explanation
  4. Mid-level

    What is the practical difference between a fake, a mock, and a stub in Flutter tests?

    A test double replaces a dependency; a fake is a simple working implementation, a stub returns fixed answers, and a mock verifies expected interactions.

    Read the full explanation
  5. Senior

    How do you make Flutter tests reliable and not flaky?

    Isolate time, randomness, and the network, wait for a clear condition using test tools instead of sleep, and clean up resources and test data after each case.

    Read the full explanation
  6. Mid-level

    When do you use a golden test in Flutter?

    Use it to compare rendering against a reference image and detect intentional or unintentional visual changes, while fixing the environment factors that affect the image.

    Read the full explanation