Fannie Mae Mission, Testing Layers, and Validating UI Updates
Medium · Behavioral & Leadership · Data Scientist · Onsite
Prompt
You are interviewing for a Data Scientist position at Fannie Mae where you will partner closely with quality-assurance engineers and product managers on analytical reporting tools. Address three connected parts:
- Firm & mission context: Explain Fannie Mae's core business in US housing finance and how its public mandate shapes your day-to-day analytical and engineering discipline.
- Validation layers: Contrast frontend user-interface validation with backend and data-pipeline validation, detailing the distinct objectives and representative tooling suited to each layer.
- Structured validation plan: Walk through how you would construct a comprehensive test plan for an interface update so that both calculation accuracy and end-user usability are protected.
Scope & Expectations
- Accurately describe Fannie Mae's secondary-mortgage-market role and translate regulatory, fairness, and auditability obligations into concrete daily practices.
- Contrast frontend and backend validation layers across risk coverage, execution speed, stability, and standard tooling.
- Present a structured test matrix for a concrete interface update covering SQL/data reconciliation, boundary and null states, usability, permissions, and accessibility.
Step-by-step walkthrough
What this multi-part question is really testing
This prompt combines three questions into one onsite conversation, each testing a distinct skill for a Data Scientist working alongside QA and product teams:
- Explaining Fannie Mae's role and public mandate: Checks whether you understand Fannie Mae's actual function in US housing finance—not a guessed slogan—and whether you translate that mission into disciplined daily habits.
- Contrasting frontend and backend validation layers: Checks whether you understand modern software testing layers well enough to collaborate smoothly with QA engineers rather than throwing models or queries over the wall.
- Building a structured validation plan for an interface update: Checks whether you think systematically about edge cases, usability, and data reconciliation—verifying that numbers displayed on a screen match an independent calculation on the underlying dataset.
For a Data Scientist specifically, your biggest value-add is catching silent numerical bugs where a chart loads cleanly with zero browser errors, yet shows the wrong rate because of a bad filter, a dropped
NULL, or a division-by-zero default.Connect Fannie Mae's mission to how you work
Keep your summary of Fannie Mae crisp, accurate, and grounded in well-known public facts:
- Fannie Mae (the Federal National Mortgage Association) is a government-sponsored enterprise (GSE)—a Congressionally chartered corporation created to serve a public mission in US housing finance, regulated by the Federal Housing Finance Agency (FHFA).
- Secondary mortgage market role: Fannie Mae does not lend money directly to homebuyers. Instead, it buys single-family and multifamily (rental) mortgages from lenders such as banks and credit unions, and packages many of them into guaranteed mortgage-backed securities (MBS)—investment bundles backed by borrowers' monthly payments. Buying those loans replenishes lenders' cash so they can make new mortgages, supporting liquidity, stability, and affordability.
- Lender technology: Lenders across the country interact with Fannie Mae systems such as Desktop Underwriter, its automated underwriting system.
Then connect those facts directly to four working principles:
- Numerical precision: Displayed rates and risk metrics guide real lending, pricing, and portfolio decisions, so displayed figures must reconcile exactly against source data.
- Auditability and reproducibility: In a regulated financial institution, you must be able to reproduce any historical report or model output using versioned code, frozen data snapshots, and documented assumptions.
- Fairness: Housing finance is governed by fair-lending laws (such as the Fair Housing Act and Equal Credit Opportunity Act), so changes to data pipelines or decision tools must be checked for unintended disparities.
- Accessibility and controlled releases: Dashboards and tools must work reliably for every user—including keyboard and screen-reader users—backed by thorough pre-release review.
Contrast frontend validation with backend and data checks
UI tests and backend tests catch different classes of bugs, so healthy teams balance them using the test pyramid—a strategy that puts most coverage in fast, inexpensive unit, API, and data tests at the base, and keeps a smaller set of slower browser-driven UI tests at the top for critical user journeys.
Dimension UI Testing Backend & Data Testing What it checks What users see and do: page flows, Business logic, APIs, SQL math, layout, error/empty states, browser database state, permissions, load rendering, and accessibility capacity, and data pipeline rules Common tools Playwright, Cypress, Selenium (E2E); pytest, JUnit (unit/integration); Jest + Testing Library (components); Postman / Pact (API & contracts); axe-core (accessibility scans); dbt / Great Expectations (data); manual exploratory & usability checks k6, Locust, JMeter (load testing) Speed & stability Slower and more brittle (DOM timing, Fast and deterministic enough to layout shifts, browser differences) run on every pull request Data Scientist's Checking clear labels, rounding, Writing SQL/Python reconciliation sweet spot empty/null states, and misleading UX checks, null/schema guards, and model-output invariantsDesign structured test cases for a concrete UI change
Make your method concrete by walking through a realistic example: adding a Loan Purpose dropdown filter (
Purchase,Refinance,Cash-Out Refinance) to an internal dashboard showing 90-day mortgage delinquency rates by state.Before listing cases, apply three standard QA design tools:
- Equivalence partitioning: grouping inputs that follow the same logic (for example, each valid loan purpose) so you test clean representatives rather than redundant copies.
- Boundary-value analysis: testing exact edges where formulas break, such as
0matching loans (where0 / 0causes division by zero) or1loan. - WCAG AA accessibility: Web Content Accessibility Guidelines requiring keyboard operability, screen-reader labels, and at least a
4.5:1color-contrast ratio for normal text.
Note a crucial analytical distinction in your expected results: loan counts add up across categories, whereas delinquency rates (
delinquent_loans / total_loans) are weighted averages that must be checked against a reference SQL query!ID Category Action / Input Expected Result Pri TC1 Functional Select "Purchase" only Chart & table show Purchase loans; High state rate matches reference SQL within 0.01 percentage points TC2 Data Compare loan counts across each Sum of counts for Purchase + Refi + High reconciliation purpose + "Unknown" vs. unfiltered Cash-Out + Unknown equals unfiltered total loan count exactly TC3 Boundary Filter leaves a state with 0 loans Cell displays "No matching loans" High (0 / 0 edge) (not NaN, crash, or false "0.00%") TC4 Null / missing Dataset contains rows with NULL Handled per spec (grouped under High data loan_purpose "Unknown" or explicitly noted); no silent row drops TC5 Interaction Combine Loan Purpose + Vintage Year Both filters apply together; URL or Med saved view restores both accurately TC6 Accessibility Navigate via Tab/Enter + screen Dropdown reachable without a mouse, High reader; check color contrast active filter announced, >= 4.5:1 text TC7 UX / latency Throttle API response to 3 seconds Loading indicator appears; stale Med unfiltered numbers cannot be misread TC8 Regression Click "Export CSV" with filter on Downloaded CSV rows and rates match High the filtered on-screen table exactly TC9 Authorization Log in as user restricted to Region A Dropdown counts and table expose zero High loans from restricted Region B TC10 Compatibility Render on supported browsers at Labels, tooltips, and dropdown menu Med 200% browser zoom do not clip or overlapFinally, state what to automate versus keep manual: automate deterministic high-risk checks (
TC1–TC4,TC8,TC9at the API/SQL and Playwright smoke layers, plus automatedaxe-corechecks forTC6) on every build, and run a short manual exploratory and screen-reader session for human usability, wording clarity, and zoom layout (TC6,TC7,TC10).Sample answer
Below is a first-person answer (~355 words) tailored for a Data Scientist candidate interviewing at Fannie Mae.
Fannie Mae is a government-sponsored enterprise chartered by Congress to keep housing finance liquid and stable across single-family and rental housing. Rather than lending directly to homebuyers, it buys mortgages from lenders and guarantees mortgage-backed securities built from those loans so lenders have capital to fund more borrowers. Because lenders, investors, and regulators rely on these numbers under strict oversight, that mission shapes my work in three ways: every metric must reconcile accurately, every calculation must be reproducible for an audit, and tools must be accessible to everyone who relies on them.
Comparing test layers: UI testing checks what users see and interact with—page flows, layout, empty states, browser compatibility, and accessibility—using tools like Playwright or Cypress, Jest component tests, axe-core for accessibility scans, and manual usability sessions. Backend testing checks business logic, APIs, database state, and data pipelines using pytest or JUnit, API contract tests, load tools like k6, and data-quality checks. Because browser tests are slower and more brittle, I follow the test pyramid: push calculation and data checks into fast backend tests, and reserve end-to-end UI tests for critical user journeys.
When building a validation plan for an interface update—say, adding a loan-purpose filter to a state delinquency dashboard—I start with testable acceptance criteria and partner with QA across four buckets. Functional and boundary cases check single filters, combined filters, and zero-loan states so empty cells display "No matching loans" rather than a misleading zero percent or NaN. Data reconciliation verifies that filtered delinquency rates match an independent SQL query on the same snapshot and that loan counts across all categories plus missing values sum to the unfiltered total. UX and accessibility cover loading states, keyboard navigation, screen-reader labels, and color contrast. Regression checks verify CSV exports and user permissions.
On my last team's credit-risk dashboard redesign, I owned the SQL reconciliation suite while QA owned Playwright flows. Six of our 42 cases caught pre-release bugs—including a filter join that silently dropped loans with null state codes and skewed one portfolio's reported delinquency rate by 0.30 percentage points.
Handle follow-up probes
Prepare crisp, practical answers for the follow-up questions QA or product interviewers commonly ask next:
- "Which test cases would you deliberately NOT automate?" Visual polish, awkward phrasing, screen-reader flow naturalness, and one-off layout tweaks. Scripts cannot judge whether a chart title confuses an analyst, and brittle pixel-level browser scripts cost more to maintain than a 15-minute exploratory session.
- "How do you prevent automated UI tests from becoming flaky?" Select elements via dedicated
data-testidattributes instead of fragile CSS paths, wait on explicit network or DOM state conditions instead of fixedsleep(5)timers, seed isolated test data snapshots, and quarantine any flaky test immediately with an assigned owner rather than training engineers to hit "rerun." - "How do you build the expected values for your data-reconciliation tests?" Write an independent query against a small, frozen reference dataset whose edge cases (
NULLs, zero-denominator groups, duplicate keys) you have verified by hand—never copy-paste the output of the application code under test as your expected answer.
Intuition & how it works
Think of testing a financial analytics product like inspecting a busy restaurant. UI testing inspects the dining room: can customers read the menu clearly, navigate with a wheelchair, place an order smoothly, and get a clear message when a dish is sold out? Backend and data testing inspects the kitchen: did the chef measure every ingredient accurately, follow food-safety rules, and ring up the exact bill? In a Data Scientist role collaborating with QA at Fannie Mae, your job is making sure a polished dining room never serves a miscalculated number to a lender, regulator, or portfolio manager.
Beginners commonly stumble on all three parts of this question. First, they confuse Fannie Mae with a retail bank that originates mortgages directly to homebuyers, missing its real secondary-market role. Second, they rattle off tool names like Selenium and pytest without explaining why teams run thousands of fast backend checks and only a handful of slower browser checks. Third, they write only "happy-path" test cases ("select Purchase and verify the chart loads"), missing silent analytical bugs where a chart renders cleanly while dropping NULL rows or turning 0 / 0 empty groups into a fake 0.00% delinquency rate.
Here is how structured test design catches both UI and data defects on a new dashboard filter across four steps:
1. Acceptance rule Selecting "Purchase" filters chart, table, and CSV export to match
reference SQL within 0.01 percentage points on a frozen snapshot.
2. Edge & null cases 0 matching loans -> show "No matching loans" (never 0.00% or NaN);
NULL loan_purpose -> bucketed or excluded explicitly without skew.
3. UX & accessibility Loading spinner prevents reading stale numbers; full keyboard +
screen-reader support and >= 4.5:1 text contrast.
4. Smart automation Push math & permission checks to fast API/SQL tests; keep a thin
Playwright smoke suite + manual exploratory usability review.
What interviewers look for
- Accurate, concise knowledge of Fannie Mae: Knowing it is a Congressionally chartered government-sponsored enterprise (GSE) that buys mortgages from lenders and guarantees mortgage-backed securities (MBS) (investment pools backed by home loans) to keep housing credit liquid and stable—not a direct-to-consumer retail lender.
- Mission translated into working habits: Connecting regulatory oversight and housing impact to numerical accuracy, reproducible code and data snapshots, fair-lending checks, and accessible tooling.
- Clear separation of test layers: Contrasting UI checks (user flows, rendering, accessibility) with backend checks (APIs, business logic, database state, data pipelines) using the test pyramid—keeping most tests in fast unit, API, and SQL layers and fewer tests in slower end-to-end browser suites.
- Systematic test-case generation: Deriving cases from testable acceptance criteria using equivalence partitioning (testing one clean representative per logical group) and boundary-value analysis (testing edges like
0or1loan), each with clear preconditions, inputs, checkable expected outputs, and priorities. - A Data Scientist's analytical rigor: Including data reconciliation (matching displayed rates against an independent SQL query and checking that category counts plus
NULLs sum to the unfiltered total) alongside UX, permissions, export parity, and accessibility (WCAG AA, including keyboard navigation and4.5:1text contrast).
Common mistakes
- Getting Fannie Mae's business model wrong: Saying Fannie Mae originates mortgages directly to homebuyers or calling it a federal cabinet agency.
- Stopping at a Wikipedia summary: Reciting historical dates without explaining how regulatory scrutiny and housing impact change the way you validate data and releases.
- Dropping tool names without purpose: Listing Cypress, JUnit, and Postman as buzzwords without explaining what risk each layer catches or why UI suites are slower and flakier.
- Confusing rates with additive totals: Claiming delinquency rates across filter options should add up to the unfiltered rate (loan counts add up; rates are weighted averages).
- Writing vague, untestable expected results: Writing "Verify dashboard works properly" instead of "Displayed rate matches reference SQL within 0.01 percentage points; empty state shows 'No matching loans'."
- Trying to automate 100% of checks in a browser: Building a slow, brittle end-to-end UI suite for filter math that could run 50x faster at the API and SQL layers.
- Treating accessibility as an optional nice-to-have: Forgetting keyboard-only navigation, screen-reader announcements, and color contrast.
Follow-up questions
- How would you validate a new dashboard component that surfaces a machine learning model's credit-risk score? Split testing across three independent layers so failures are easy to isolate. First, test the model artifact offline with deterministic golden inputs (a fixed borrower profile must output an exact expected probability) and distribution checks. Second, test the backend API to confirm the score, model version ID, and timestamp serialize without rounding or type-casting bugs. Third, test the UI for display rounding, missing-score fallback states, explanation tooltips, and exact parity with the API payload.
- Where do you draw the line between checks that run automatically in CI and checks performed manually? Automate checks that are high-priority, deterministic, and repeated on every release—such as SQL data reconciliation, role-based access rules, CSV export parity, and core browser smoke paths—always pushing each test to the lowest, fastest layer that can catch the bug. Keep subjective human judgments manual, including exploratory usability sessions, checking whether chart labels confuse domain analysts, and verifying real screen-reader announcement order.
- How would you confirm that a frontend layout overhaul did not silently alter any underlying analytical numbers? Run both the old production build and the refactored build against the exact same frozen database snapshot across a grid of common filter combinations, and automatically compare every returned API payload and exported CSV table cell by cell. Outside of explicitly documented specification changes, every loan count and rate should match identically, catching accidental query-parameter bugs in seconds before release.
Follow-up questions
- How would you validate a new dashboard component that surfaces a machine learning model's credit-risk score?
- Where do you draw the line between checks that run automatically in CI and checks performed manually?
- How would you confirm that a frontend layout overhaul did not silently alter any underlying analytical numbers?
Similar questions
- Per-Customer Order Aggregates with Null Amounts
- SQL Aggregations, Joins, Pandas Combines, and Nth Highest Salary
- Greenfield Ownership, Two-Way Candid Feedback, Success Metrics, and OpenAI Fit
- Navigating a Principle-Driven Engineering Disagreement
- Updating a Strong Technical View on Evidence
- Applying an Influential Mentor's Engineering Principle