This return value is actually often itself the result of a sanity check. The trivial case is checking to see whether the return value of a function indicated success or failure, and to therefore cease further processing upon failure. The more complicated the routine, the more important that its response be checked. Īnother common usage of sanity test is to denote checks which are performed within programme code, usually on arguments to functions or returns therefrom, to see if the answers can be assumed to be correct. Groups of sanity tests are often bundled together for automated unit testing of functions, libraries, or applications prior to merging development code into a testing or trunk version control branch, for automated building, or for continuous integration and continuous deployment. Sanity testing and smoke testing avoid wasting time and effort by quickly determining whether an application is too flawed to merit more rigorous QA testing, but needs more developer debugging. In other words, a sanity test determines whether the intended result of a code change works correctly while a smoke test ensures that nothing else important was broken in the process. On the other hand, a distinction is sometimes made that a smoke test is a non-exhaustive test that ascertains whether the most crucial functions of a programme work before proceeding with further testing whereas a sanity test refers to whether specific functionality such as a particular bug fix works as expected without testing the wider functionality of the software. Sanity tests may sometimes be used interchangeably with smoke tests insofar as both terms denote tests which determine whether it is possible and reasonable to continue testing further. In software development, a sanity test (a form of software testing which offers "quick, broad, and shallow testing" ) evaluates the result of a subset of application functionality to determine whether it is possible and reasonable to proceed with further testing of the entire application. Fermi estimates will often provide insight on the order of magnitude of an expected value.įurther information: Smoke testing (software).For instance, most metals sink in water, so the density of most metals should be greater than that of water (~ 1000 kg/m 3). When determining physical properties, comparing to known or similar substances will often yield insight on whether the result is reasonable.This is a basic application of dimensional analysis. The power output of a car cannot be 700 kJ, since the unit joules is a measure of energy, not power (energy per unit time).An even quicker check is that the product of even and odd numbers is even, whereas 142,135 is odd. Also, the product must end in the same digit as the product of end-digits: 8 × 5 = 40, but 142,135 does not end in "0" like "40", while the correct answer does: 918 × 155 = 142,290. In multiplication, 918 × 155 is not 142,135 since 918 is divisible by three but 142,135 is not (digits add up to 16, not a multiple of three).The correct answer, 738 2 = 544,644, is more than 10 times higher than 54,464. Since squaring positive integers preserves their inequality, the result cannot be true, and so the calculated result is incorrect. If one were to attempt to square 738 and calculated 54,464, a quick sanity check could show that this result cannot be true.Use in different fields Mathematical Ī sanity test can refer to various orders of magnitude and other simple rule-of-thumb devices applied to cross-check mathematical calculations. This is often prior to a more exhaustive round of testing. 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. 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. The advantage of performing an initial sanity test is that of speedily evaluating basic function. A rule-of-thumb or back-of-the-envelope calculation may be checked to perform the test. The point of a sanity test is to rule out certain classes of obviously false results, not to catch every possible error. It is a simple check to see if the produced material is rational (that the material's creator was thinking rationally, applying sanity). A simple test to check if a hypothesis is rationalĪ sanity check or sanity test is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |