language-icon Old Web
English
Sign In

Sanity testing

A sanity test or sanity check is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true. It is a simple check to see if the produced material is rational (that the material's creator was thinking rationally, applying sanity). The point of a sanity test is to rule out certain classes of obviously false results, not to catch every possible error. A rule-of-thumb may be checked to perform the test. The advantage of a sanity test, over performing a complete or rigorous test, is speed. A sanity test or sanity check is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true. It is a simple check to see if the produced material is rational (that the material's creator was thinking rationally, applying sanity). The point of a sanity test is to rule out certain classes of obviously false results, not to catch every possible error. A rule-of-thumb may be checked to perform the test. The advantage of a sanity test, over performing a complete or rigorous test, is speed. In arithmetic, for example, when multiplying by 9, using the divisibility rule for 9 to verify that the sum of digits of the result is divisible by 9 is a sanity test—it will not catch every multiplication error, however it's a quick and simple method to discover many possible errors. In computer science, a sanity test is a very brief run-through of the functionality of a computer program, system, calculation, or other analysis, to assure that part of the system or methodology works roughly as expected. This is often prior to a more exhaustive round of testing. A sanity test can refer to various orders of magnitude and other simple rule-of-thumb devices applied to cross-check mathematical calculations. For example: In software development, the sanity test (a form of software testing which offers 'quick, broad, and shallow testing') determines whether it is possible and reasonable to proceed with further testing. Software sanity tests are synonymous with smoke tests. A sanity or smoke test determines whether it is possible and reasonable to continue testing. Sanity tests exercise a subset of application functions needed to determine whether the systems are accessible and the application logic is responsive. If the sanity test fails, it is not reasonable to attempt more rigorous testing. Sanity tests are ways to avoid wasting time and effort by quickly determining whether an application is too flawed to merit any rigorous testing. Many companies run sanity tests on an automated build as part of their software development life cycle. Sanity tests may be used as an aid to a debugging software. Consider, an application or piece of software usually involves multiple subsystems between external input and output from the system. When the overall system is not performing as expected, a sanity test may be used to aid decisions of what to investigate next. If one subsystem is not giving an expected result, other subsystems might be eliminated from the further investigation. A 'Hello, World!' program is often used as a sanity test for a development environment. If the program fails to compile or execute, the supporting environment likely has a configuration problem. If it works, any problem being diagnosed likely lies in the actual application in question. Another, possibly more common usage of 'sanity test' is to denote checks which are performed within program code, usually on arguments to functions or returns therefrom, to see if the answers can be assumed to be correct. The more complicated the routine, the more important that its response be checked. The trivial case is checking to see that a file opened, written to, or closed, did not fail on these activities – which is a sanity check often ignored by programmers. But more complex items can also be sanity-checked for various reasons.

[ "Germination", "Sanity" ]
Parent Topic
Child Topic
    No Parent Topic