Sanity testing

Sanity testing

A sanity test or sanity check is a basic test to quickly evaluate the validity of a claim or calculation. In mathematics, for example, when multiplying by three or nine, verifying that the sum of the digits of the result is a multiple of 3 or 9 (casting out nines) respectively is a sanity test.

In computer science it is a very brief run-through of the functionality of a computer program, system, calculation, or other analysis, to assure that the system or methodology works as expected, often prior to a more exhaustive round of testing.

Mathematical

A sanity test can refer to various order of magnitude and other simple rule of thumb devices applied to cross-check mathematical calculations. For example:
*If one were to attempt to square 738 and calculated 53,874, a quick sanity check could show that this cannot be true. Consider that 500 < 738, yet 500^2 = 5^2 100^2 = 250000 > 53874. Since squaring preserves inequality for positive numbers (see inequality), this cannot be true and so the calculation was bad.
*In multiplication, 918 x 155 is not 142135 since 918 is divisible by three but 142135 is not (digits add up to 16 the digits of which do not add up to a multiple of three). Moreover, the product of an even and an odd number should be even, whereas 142135 is odd.
*When talking about quantities in physics, the power output of a car cannot be 700 kJ since that is a unit of energy, not power (energy per unit time). See dimensional analysis.

Software development

In software development, the sanity test (a form of software testing which offers "quick, broad, and shallow testing" [M. A. Fecko and C. M. Lott, [http://www.chris-lott.org/work/pubs/2002-spe.pdf ``Lessons learned from automating tests for an operations support system,"] Software--Practice and Experience, v. 32, October 2002.] ) determines whether it is reasonable to proceed with further testing.

Software sanity tests are commonly conflated with smoke tests [Erik van Veenendaal (ED), [http://www.istqb.org/downloads/glossary-1.1.pdf Standard glossary of terms used in Software Testing] , International Software Testing Qualification Board

sanity test: See smoke test.
] . A smoke test determines whether it is "possible" to continue testing, as opposed to whether it is "reasonable"Fact|date=May 2008. A software smoke test determines whether the program launches and whether its interfaces are accessible and responsive (for example, the responsiveness of a web page or an input button). If the smoke test fails, it is impossible to conduct a sanity test. In contrast, the ideal sanity test exercises the smallest subset of application functions needed to determine whether the application logic is generally functional and correct (for example, an interest rate calculation for a financial application). If the sanity test fails, it is not reasonable to attempt more rigorous testing. Both sanity tests and smoke 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 a weekly build as part of their development process [Hassan, A. E. and Zhang, K. 2006. [http://portal.acm.org/citation.cfm?id=1169218.1169318&coll=&dl=ACM&type=series&idx=SERIES10803&part=series&WantType=Proceedings&title=ASE# Using Decision Trees to Predict the Certification Result of a Build] . In Proceedings of the 21st IEEE/ACM international Conference on Automated Software Engineering (September 18 - 22, 2006). Automated Software Engineering. IEEE Computer Society, Washington, DC, 189-198]

The Hello world program is often used as a sanity test for a development environment. If Hello World fails to compile the basic environment (or the compile process the user is attempting) has a configuration problem. If it works the problem may be a bug in the specific application being compiled.

ee also

* Back-of-the-envelope calculation
* Smoke test
* Software testing
* Mental calculation
* Order of magnitude
* Fermi problem

References


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • sanity test — /ˈsænəti tɛst/ (say sanuhtee test) noun Computers a quick test of a procedure, calculation, etc., done in advance of more exhaustive testing to establish whether the functionality is as expected. Also, sanity check …  

  • Mutation testing — For the biological term, see: Gene mutation analysis. Software Testing portal Mutation testing (or Mutation analysis or Program mutation) is a method of software testing, which involves modifying programs source code or byte code in small ways …   Wikipedia

  • Black box testing — NOTOC Black box testing takes an external perspective of the test object to derive test cases. These tests can be functional or non functional, though usually functional. The test designer selects valid and invalid input and determines the… …   Wikipedia

  • The Mask of Sanity — The Mask of Sanity, 1982 edition The Mask of Sanity is a book written by Hervey Cleckley, M.D., first published in 1941, describing the clinical interviews of Cleckley with incarcerated psychopaths. It is considered a seminal work and the most… …   Wikipedia

  • Software testing — is an empirical investigation conducted to provide stakeholders with information about the quality of the product or service under test [ [http://www.kaner.com/pdfs/ETatQAI.pdf Exploratory Testing] , Cem Kaner, Florida Institute of Technology,… …   Wikipedia

  • System testing — of software or hardware is testing conducted on a complete, integrated system to evaluate the system s compliance with its specified requirements. System testing falls within the scope of black box testing, and as such, should require no… …   Wikipedia

  • Mobile-device testing — is the process to assure the quality of mobile devices, like mobile phones, PDAs, etc. The testing will be conducted on both hardware and software. And from the view of different procedures, the testing comprises R D testing, factory testing and… …   Wikipedia

  • Smoke testing — is a term used in plumbing, woodwind repair, electronics, computer software development, and the entertainment industry. It refers to the first test made after repairs or first assembly to provide some assurance that the system under test will… …   Wikipedia

  • Mobile Device Testing — is the process to assure the quality of mobile devices, like mobile phone, PDA etc. The testing will be conducted on both hardware and software. And from the view of different procedures, the testing comprises R D Testing, Factory Testing and… …   Wikipedia

  • Static testing — is a form of software testing where the software isn t actually used. This is in contrast to dynamic testing. It is generally not detailed testing, but checks mainly for the sanity of the code, algorithm, or document. It is primarily syntax… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”