Skip to main content
EDGE CASES

What is an edge case? Examples, and how to find them in business rules before you build

Updated · By Adam Polak, founder

An edge case is a situation at or beyond the boundary of what a system or process normally handles: an extreme value, an unusual combination or a rare event. In software it's the input at the limit, such as an empty field or February 29; in a business process it's the exception the expert handles from memory, such as a return that comes in a day late because the store was closed for a holiday. Many can be found before you build: test each boundary and ask the person who decides about real cases, yourself or with RuleFoundry, which interviews them and links every rule to where it was said.

Edge case vs corner case vs boundary case vs exception vs negative test

The terms overlap. What the standard sources say, and where everyday usage differs:

TermWhat it meansExample (made up)Where usage differs
Edge caseWikipedia: a situation that occurs only at an extreme (maximum or minimum) operating parameter. ISTQB Glossary: a test condition within the defined operational limits that is uncommon, extreme or atypical.A company name at the field's 255-character maximum.ISTQB: inside the limits. Everyday use: also just past them.
Corner caseWikipedia: an edge case pushes one variable to a minimum or maximum; a corner case pushes several at once.The largest order allowed, from an account at its credit limit, on the last day of the quarter.Not an ISTQB term; often used as a synonym.
Boundary caseTesters say boundary value: in the ISTQB Glossary, a minimum or maximum value of an ordered equivalence partition.A purchase of exactly $10,000 when the department head's approval starts over $10,000.Not every edge case sits on a boundary.
ExceptionIn code, an event that breaks the normal flow of execution (Wikipedia, Exception handling). In a business process, a case the standard rule treats differently.A refund issued after the 30-day window because the carrier lost the customer's return in transit.A business exception can be common.
Negative test caseISTQB Glossary, negative testing: the system is used in a way it is not intended.A quantity of -1, or letters in a date field.Edge cases can be valid input.

Definitions from the ISTQB Glossary and Wikipedia's Edge case, Corner case and Exception handling articles, read on 2026-11-30.

Edge case examples

Made up but typical: software inputs, business rules and processes. Each raises a question someone has to answer before it is built.

Edge caseExampleThe question it raises
Software: empty inputA required name field submitted with only spaces.Saved blank, or rejected with what message?
Software: leap dayAn annual contract that starts on February 29.Does it renew on February 28 or March 1?
Software: time zones and DSTJobs set for 2:30 a.m. and 1:30 a.m. local time.In most of the US, 2:30 a.m. doesn't exist the night clocks spring forward, and 1:30 a.m. happens twice in the fall. Skip or run late? Once or twice?
Software: currency rounding$100.00 split into three payments.Three payments of $33.33 make $99.99. Which takes the extra cent?
Software: empty listThe average of an empty list of orders.Divide by zero, return 0, or show “no orders”?
Business rule: exactly at the thresholdA $10,000 purchase when “big purchases” need the department head.“Over $10,000” or “$10,000 or more”?
Business rule: two segmentsA customer who is both a nonprofit (10% off) and a reseller (15% off).Add them, take the larger, or does one segment win?
Business rule: a window that closes on a holidayA return on day 31 of a 30-day window; the store was closed for a holiday on day 30.Does the window end on day 30, or at the next opening day?
Process: the approver is the requesterThe department head requests a $20,000 purchase they would normally approve.Who approves it instead?

To check a whole set of rules for cases two rules answer differently or none answers, see finding conflicting or missing business rules.

Where business-rule edge cases hide: in “usually”

An expert describes the common case and the exceptions they remember, and the boundaries stay vague. A made-up example. What the expert said: “Big purchases usually need the department head to sign off, unless it's a renewal, and anything really large goes to the CFO.” The same knowledge, after the follow-up questions, written one rule per sentence:

  • Term. Purchase amount: total contract value over the full term, in US dollars, before tax.
  • Rule 1. A purchase over $10,000, up to $50,000, needs the department head's approval.
  • Rule 2. A purchase over $50,000 needs the CFO's approval.
  • Rule 3. A purchase of $10,000 or less needs only the budget owner's approval.
  • Rule 4, an exception to rule 1. Renewing an existing contract at the same price, over $10,000 up to $50,000, needs only the budget owner's approval.
  • Rule 5, which overrides rules 1 to 4. If the requester would be the approver, their manager approves in their place.
  • Open question 1. Does a renewal with a price increase count as “the same price” under rule 4, and up to what increase?
  • Open question 2. Do two purchases from one supplier count together toward the $10,000 and $50,000 thresholds, and over what period?
  • Open question 3. Above $10,000, does the budget owner also sign?

“Big” became over $10,000, with $10,000 itself under rule 3. The renewal exception stops at $50,000, so it never reaches rule 2, and rule 5 means no one approves their own purchase. To lay out every combination of conditions, see how to make a decision table.

How to find edge cases before you build

No tool needed. The first two steps come from software testing; the rest get at what only the expert knows.

  1. 1

    Partition each input, then test the boundaries

    Split each input into groups the system should treat the same way, invalid ones included, and try one value from each: equivalence partitioning, in the ISTQB Foundation syllabus (v4.0.1). Then test each boundary value and its closest neighbor across the line: boundary value analysis. For “over $10,000, up to $50,000” that is $10,000.00, $10,000.01, $50,000.00 and $50,000.01. That is 2-value BVA. 3-value BVA also tests the other neighbor ($9,999.99, $10,000.02, $49,999.99, $50,000.02) and catches a ≤ coded as =. The syllabus says developers are more likely to make errors at boundaries. Do the same for dates, times and counts.

  2. 2

    Check every combination with a decision table

    When an outcome depends on two or more conditions, lay out every combination in a decision table; unusual combinations show up as rows.

  3. 3

    Ask the expert “what if” about real cases

    Walk through recent real cases with the person who decides them, then ask: “What's the strangest one you've seen?”, “What happens at exactly $10,000?”, “What if two of these apply at once?”, “Who can override this?” and “What do you do when the system is down?” Ask about the last time it happened, not what usually happens.

  4. 4

    Review past exceptions, tickets and appeals

    Overrides, write-offs, escalated tickets and appeals are edge cases someone already handled by hand. List each with what was decided and by whom, and ask the owner whether it should become a rule.

  5. 5

    Write each answer as a rule with its boundary

    One rule per sentence, with the number and which side of the boundary it falls on: “over $10,000” or “$10,000 or more”, never “large”. Write each exception as its own rule, naming the rule it overrides; it narrows a control, never removes it. Keep what isn't settled as an open question, and have the owner confirm the rest.

  6. 6

    Decide which ones to handle

    Not every edge case needs code: write common, costly ones as rules, send rare, costly ones to a named owner, accept rare, cheap ones in writing.

Edge cases and AI coding agents

Where a rule leaves a boundary unstated, such as whether exactly $10,000 needs approval, a coding agent may fill the gap with a plausible guess, and the code looks finished. Give it the rules with their boundaries, the edge cases with their tests, and the open questions, with an instruction to stop and ask:

Template

BUSINESS RULES: <the decision, e.g. purchase approval>
Owner: <name>    Confirmed by: <name, date>
Instruction: Build only what these rules say. If a case matches
an open question or no rule covers it, stop and ask. Do not
choose an outcome.

TERMS
<term>: <exact meaning, with its number and unit>

RULES (one per sentence; each boundary says which side it is on)
R1. <When condition, outcome.>          Source: <who said it, when>
R2. Exception to R1: <condition, outcome.>   Source: <who, when>

EDGE CASES AND THEIR TESTS
<the case>  ->  <the rule that settles it>  ->  test <the boundary value> and <its neighbor>

OPEN QUESTIONS (not settled: do not guess)
Q1. <the case, and what is not known>

For the purchase rules above, one edge-case line reads Exactly $10,000 -> rule 3 -> test $10,000.00 and $10,000.01. Where the file goes for Claude Code, Cursor or GitHub Copilot is on business rules for coding agents.

Where RuleFoundry fits

Business-rule edge cases are often only in the expert's head. RuleFoundry interviews that person, asks the next useful question, pins down vague terms like “usually” or “large order”, and follows the exceptions until the rules are clear. Which edge cases to handle stays your decision.

  • Follow-ups on the exceptions, while the expert is there

    Be interviewed yourself, by voice or text, or have RuleFoundry email the expert a link to talk it through in the web app. An interview runs 10 to 60 minutes; the default is 20.

  • Each rule linked to where it was said

    Each rule cites the transcript lines it came from and is tentative until the expert confirms it. Before a rule is kept, RuleFoundry checks that the lines it cites say it.

  • Open questions are listed, not filled in

    Anything the expert did not settle, such as how split purchases count, is listed as an open question rather than guessed.

  • The same rules for your coding agent

    Coding agents read the rules through RuleFoundry's MCP server. The Logic Twin answers questions from them and says when they do not cover a question.

It does not write or run your tests. The rules are only as complete as the conversation, so review them before relying on them. See what a result contains and the facts page for limits and prices.

See it run

The walkthrough film shows an interview inside ChatGPT. To find the edge cases in one of your own decisions, sign up and choose From me, or add RuleFoundry to ChatGPT (how) and say:

Use RuleFoundry to interview me about the edge cases in how we approve purchases: the thresholds, the exceptions and who can override them.

When something else fits better

  • Hypothesis, or another property-based testing library, when the edge cases are in code inputs. Its documentation calls it the property-based testing library for Python: you describe a range of inputs, and it chooses them, including edge cases you might not have thought about.
  • PICT, when many parameters combine and testing every combination is too much. Its documentation says Microsoft's Pairwise Independent Combinatorial Testing tool generates test cases and test configurations, testing all possible pairs of values instead of every combination.
  • RuleFoundry, when the edge cases are business rules only an expert knows, and you need them asked about and written down with their boundaries and sources before anyone builds or tests them.

Definitions come from the ISTQB Glossary, the ISTQB Foundation Level syllabus v4.0.1 and Wikipedia; descriptions of Hypothesis and PICT come from their own documentation. All were read on 2026-11-30. Example rules and cases on this page are made up.

Questions people ask

What is an edge case in software testing?
The ISTQB Glossary defines it as a test condition within the defined operational limits of a component or system that is uncommon, extreme or atypical. Values just outside the limits are covered by boundary value analysis; everyday usage calls them edge cases too.
What is the difference between an edge case and a corner case?
An edge case pushes one variable to an extreme; a corner case pushes several at once, such as the largest order allowed, from an account at its credit limit, on the last day of the quarter. Many teams use the words interchangeably.
Is what I tell RuleFoundry used to train models?
No. RuleFoundry does not use customer content to train models; only members of your workspace can read a Project's knowledge base.
What does RuleFoundry cost?
Your first Extraction (one interview or recording) is free; Personal is $20 a month for unlimited Extractions, and Team is $20 per active member a month with a two-seat minimum.

Related: finding conflicting or missing business rules, what a decision table is and how to make one, business rules for coding agents, facts about RuleFoundry.

What changed: 2026-11-30, rule 5 replaces only a requester who would approve, so it narrows the approval rules instead of removing one; 2026-11-30, first version.

Try it on one process

Your first Extraction is free.