is_primeexample was too minimal to show how Touca can help us describe the behavior and performance of real-world software workflows. Let us use a Profile Lookup software as another example that takes the username of a student and returns basic information about them, such as their name, date of birth, and GPA.
Studenthas the following properties:
find_studentfunction and capture the properties of its output that are expected to remain the same in future versions of our software.
find_studentthat reported whether the profile was fetched from the cache?
find_studentimplementation to always capitalize student names, we could better visualize the differences to make sure that only the value associated with key
fullnamechanges across our test cases.
assumeto track the
username. Touca does not visualize the values captured as assertion unless they are different.
stop_timerprovide fine-grained control for runtime measurement. If they feel too verbose, we can opt to use
scoped_timeras an alternatives: