Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Edge case
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Software engineering== In programming, an edge case typically involves input values that require special handling in an [[algorithm]] behind a computer program. As a measure for validating the behavior of computer programs in such cases, [[Unit testing|unit tests]] are usually created; they are testing boundary conditions of an algorithm, [[Subroutine|function]] or [[Method (computer programming)|method]]. A series of edge cases around each "boundary" can be used to give reasonable [[Code coverage|coverage]] and confidence using the assumption that if it behaves correctly at the edges, it should behave everywhere else.<ref>{{Cite web | url = https://www.cs.cmu.edu/~rjsimmon/15122-s13/rec/07.pdf | title = Unit Testing | work = Principles of Imperative Computation | year = 2012 | access-date = 2014-01-16 | author = Zimmerman, Josh | publisher = cs.cmu.edu }}</ref> For example, a function that divides two numbers might be tested using both very large and very small numbers. This assumes that if it works for both ends of the magnitude spectrum, it should work correctly in between.<ref>{{Citation|last=Cho|first=Shinil|title=The Fourier transform|date=October 2018|url=http://dx.doi.org/10.1088/978-1-64327-286-3ch2|work=Fourier Transform and Its Applications Using Microsoft EXCELยฎ|publisher=IOP Publishing|doi=10.1088/978-1-64327-286-3ch2 |isbn=978-1-64327-286-3 |s2cid=210754571 |access-date=2022-02-17|url-access=subscription}}</ref> Programmers may also create [[Integration testing|integration tests]] to address edge cases not covered by unit tests.<ref>{{Cite book |last=Khorikov |first=Vladimir |title=Unit Testing: Principles, Practices, and Patterns |publisher=Manning Publications |year=2019 |isbn=978-1617296277 |pages=188โ190 |language=en}}</ref> These tests cover cases which only appear when a system is tested as a whole. For example, while a unit test may ensure that a function correctly calculates a result, an integration test ensures that this function works properly when integrated with a database or an external [[API]]. These tests are particularly relevant with increasing system complexity in [[Distributed system|distributed systems]], [[microservices]], and [[Internet of things|Internet of things (IoT)]] devices. With microservices in particular, testing becomes a challenge as integration tests may not cover all microservice endpoints, resulting in uncovered edge cases.<ref>{{Cite journal |last1=Hossain |first1=Md. Delowar |last2=Sultana |first2=Tangina |last3=Akhter |first3=Sharmen |last4=Hossain |first4=Md Imtiaz |last5=Thu |first5=Ngo Thien |last6=Huynh |first6=Luan N. T. |last7=Lee |first7=Ga-Won |last8=Huh |first8=Eui-Nam |date=2023-06-23 |title=The role of microservice approach in edge computing: Opportunities, challenges, and research directions |journal=ICT Express |volume=9 |issue=6 |pages=1162โ1182 |doi=10.1016/j.icte.2023.06.006 |issn=2405-9595|doi-access=free }}</ref> Other types of testing which relate to edge cases may include [[load testing]] and [[Negative testing|negative/failure testing]]. Both methods aim at expanding the test coverage of a system, reducing the likelihood of unexpected edge cases. In [[test-driven development]], edge cases may be determined by system requirements and accounted for by tests, before writing code. Such documentation may go inside a [[product requirements document]] after discussions with [[Stakeholder (corporate)|stakeholders]] and other teams.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)