Knowledge

Sanity check

Source đź“ť

317:. For example, in a bank account management application, a sanity check will fail if a withdrawal requests more money than the total account balance rather than allowing the account to go negative (which wouldn't be sane). Another sanity test might be that deposits or purchases correspond to patterns established by historical data—for example, large purchase transactions or ATM withdrawals in foreign locations never before visited by the cardholder may be flagged for confirmation. 250:
as a particular bug fix works as expected without testing the wider functionality of the software. 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. Sanity testing and smoke testing avoid wasting time and effort by quickly determining whether an application is too flawed to merit more rigorous
249:
to continue testing further. 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
305:
of a function indicated success or failure, and to therefore cease further processing upon failure. This return value is actually often itself the result of a sanity check. For example, if the function attempted to open, write to, and close a file, a sanity check may be used to ensure that it did
236:
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. Sanity tests may sometimes be used interchangeably with
300:
programme 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 whether the
38:
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
354:
similarly. Rather than a complicated script running a set of unit tests, if this simple programme fails to compile or execute, it proves that the supporting environment likely has a configuration problem that will prevent
359:
code from compiling or executing. But if "Hello world" executes, then any problems experienced with other programmes likely can be attributed to errors in that application's code rather than the environment.
585: 501:
Sammi, Rabia; Masood, Iram; Jabeen, Shunaila (2011). Zain, Jasni Mohamad; Wan Mohd, Wan Maseri bt; El-Qawasmeh, Eyas (eds.). "A Framework to Assure the Quality of Sanity Check Process".
343:. When a computing environment has passed all the sanity checks, it's known as a sane environment for the installation programme to proceed with reasonable expectation of success. 85:, 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. 172:
may be used as a sanity check of physical equations: the two sides of any equation must be commensurable or have the same dimensions. A person who has calculated the
199:, comparing to known or similar substances will often yield insight on whether the result is reasonable. For instance, most metals sink in water, so the 1029: 1100: 777: 1138: 1209: 51:
may be checked to perform the test. The advantage of performing an initial sanity test is that of speedily evaluating basic function.
133: 1265: 892: 453: 43:). The point of a sanity test is to rule out certain classes of obviously false results, not to catch every possible error. A 522: 364: 639: 314: 602:
Chasidim, Hadas; Almog, Dani; Sohacheski, Dov Benyomin; Gillenson, Mark Lee; Poston, Robin S.; Mark, Shlomo (2018).
770: 537:
ISTQB® Glossary for the International Software Testing Qualification Board® software testing qualification scheme,
48: 1239: 1214: 1189: 963: 329: 981: 592:(September 18 â€“ 22, 2006). Automated Software Engineering. IEEE Computer Society, Washington, DC, 189–198. 347: 1072: 400: 1179: 948: 904: 900: 888: 884: 880: 876: 351: 121:
738 and calculated 54,464, a quick sanity check could show that this result cannot be true. Consider that
763: 321: 274: 17: 368: 251: 942: 938: 930: 309:
These kinds of sanity checks may be used during development for debugging purposes and also to aid in
1260: 868: 552: 1001: 863: 800: 686: 238: 227: 553:"Putting it all in the trunk: incremental software development in the FreeBSD open source project" 159:
An even quicker check is that the product of even and odd numbers is even, whereas 142,135 is odd.
820: 634:(1st ed., with minor revisions. ed.). Newton, Mass.: O'Reilly & Associates. p. 19. 266: 926: 873: 282: 147:
is not 142,135 since 918 is divisible by three but 142,135 is not (digits add up to 16, not a
629: 286: 735: 136:, the result cannot be true, and so the calculated result is incorrect. The correct answer, 1224: 1044: 590:
Proceedings of the 21st IEEE/ACM international Conference on Automated Software Engineering
412: 169: 8: 1229: 810: 340: 665: 476: 427: 337: 306:
not fail on any of these actions—which is a sanity check often ignored by programmers.
99: 1199: 1024: 986: 973: 635: 571: 518: 196: 55: 480: 1082: 1011: 853: 567: 510: 484: 468: 432: 333: 302: 278: 270: 233: 204: 118: 82: 74: 1234: 1184: 1062: 996: 953: 858: 653:
A common programming habit is to ignore the return value from fprintf(stderr, ...
514: 310: 173: 538: 1095: 1057: 1019: 934: 325: 214: 151:). Also, the product must end in the same digit as the product of end-digits: 1254: 1123: 991: 958: 603: 422: 103: 44: 1128: 1034: 828: 262: 110: 217:
will often provide insight on the order of magnitude of an expected value.
155:
but 142,135 does not end in "0" like "40", while the correct answer does:
1219: 1133: 1114: 1067: 1052: 916: 912: 908: 896: 833: 107: 454:"Lessons learned from automating tests for an operations support system" 1110: 177: 755: 711: 844: 372: 255: 181: 59: 472: 1154: 1090: 586:
Using Decision Trees to Predict the Certification Result of a Build
417: 66:
multiplication error, but is a quick and simple method to discover
62:
of the result is divisible by 9 is a sanity test—it will not catch
795: 396: 376: 241:
insofar as both terms denote tests which determine whether it is
200: 148: 601: 261:
Groups of sanity tests are often bundled together for automated
189: 40: 1204: 1194: 1172: 1167: 1162: 921: 54:
In arithmetic, for example, when multiplying by 9, using the
604:"The Unit Test: Facing CICD - Are They Elusive Definitions?" 452:
Fecko, Mariusz A.; Lott, Christopher M. (October 2002).
505:. Communications in Computer and Information Science. 320:
Sanity checks are also performed upon installation of
81:
is a very brief run-through of the functionality of a
541:International Software Testing Qualification Board 265:of functions, libraries, or applications prior to 232:In software development, a sanity test (a form of 500: 132:Since squaring positive integers preserves their 1252: 771: 611:Journal of Information Technology Management 1139:The quick brown fox jumps over the lazy dog 778: 764: 184:may have omitted a factor, since the unit 88: 550: 509:. Berlin, Heidelberg: Springer: 143–150. 503:Software Engineering and Computer Systems 451: 140:is more than 10 times higher than 54,464. 27:Test to check if a hypothesis is rational 296:is to denote checks which are performed 785: 221: 14: 1253: 712:"Inclusive language/en-gb - MediaWiki" 627: 395:, as part of a wider attempt to avoid 203:of most metals should be greater than 759: 350:is often used as a sanity test for a 365:Association for Computing Machinery 324:software code into a new computing 269:development code into a testing or 192:, not power (energy per unit time). 98:A sanity test can refer to various 24: 584:Hassan, A. E. and Zhang, K. 2006. 25: 1277: 461:Software: Practice and Experience 383:in favour of other terms such as 572:10.1046/J.1365-2575.2001.00113.X 367:, and software projects such as 49:back-of-the-envelope calculation 1240:1951 USAF resolution test chart 728: 704: 628:Darwin, Ian F. (January 1991). 379:, discourage use of the phrase 106:devices applied to cross-check 93: 1266:Error detection and correction 679: 658: 621: 595: 578: 544: 531: 494: 445: 332:are met, such as a compatible 13: 1: 631:Checking C programs with lint 438: 1210:"The North Wind and the Sun" 515:10.1007/978-3-642-22203-0_13 7: 992:Trabb Pardo–Knuth algorithm 691:Android Open Source Project 560:Information Systems Journal 406: 254:, but needs more developer 163: 10: 1282: 1190:functions for optimization 949:Snell & Wilcox SW2/SW4 225: 117:If one were to attempt to 1147: 1109: 1081: 1043: 1010: 972: 869:EIA 1956 resolution chart 842: 819: 791: 551:Jørgensen, Niels (2001). 58:for 9 to verify that the 1002:Just another Perl hacker 864:Indian-head test pattern 801:Reference implementation 292:Another common usage of 228:Smoke testing (software) 982:"Hello, World!" program 821:Artificial intelligence 352:development environment 348:"Hello, World!" program 89:Use in different fields 1220:SMPTE universal leader 927:Philips circle pattern 399:language and increase 283:continuous integration 736:"Twitter Engineering" 687:"Coding with respect" 287:continuous deployment 226:Further information: 1225:EURion constellation 1045:3D computer graphics 413:Certifying algorithm 222:Software development 170:Dimensional analysis 157:918 Ă— 155 = 142,290. 130:490,000 > 54,464. 811:Standard test image 786:Standard test items 328:to ensure that all 197:physical properties 143:In multiplication, 100:orders of magnitude 974:Computer languages 428:Mental calculation 322:stable, production 279:automated building 1248: 1247: 1200:Harvard sentences 1025:Canterbury corpus 716:www.mediawiki.org 524:978-3-642-22203-0 467:(15): 1485–1506. 195:When determining 149:multiple of three 102:and other simple 70:possible errors. 56:divisibility rule 16:(Redirected from 1273: 1261:Software testing 1083:Machine learning 1012:Data compression 854:SMPTE color bars 780: 773: 766: 757: 756: 750: 749: 747: 746: 732: 726: 725: 723: 722: 708: 702: 701: 699: 698: 683: 677: 676: 674: 673: 662: 656: 655: 650: 648: 625: 619: 618: 608: 599: 593: 582: 576: 575: 557: 548: 542: 535: 529: 528: 498: 492: 491: 490:on 17 July 2003. 489: 483:. Archived from 458: 449: 433:Proof of concept 334:operating system 273:version control 234:software testing 210: 188:is a measure of 158: 154: 146: 139: 131: 128: 124: 83:computer program 75:computer science 21: 1281: 1280: 1276: 1275: 1274: 1272: 1271: 1270: 1251: 1250: 1249: 1244: 1235:Webdriver Torso 1185:EICAR test file 1143: 1105: 1077: 1063:Stanford dragon 1039: 1006: 997:Man or boy test 968: 954:Telefunken FuBK 859:EBU colour bars 838: 815: 787: 784: 754: 753: 744: 742: 734: 733: 729: 720: 718: 710: 709: 705: 696: 694: 685: 684: 680: 671: 669: 664: 663: 659: 646: 644: 642: 626: 622: 606: 600: 596: 583: 579: 555: 549: 545: 536: 532: 525: 499: 495: 487: 473:10.1002/spe.491 456: 450: 446: 441: 409: 389:coherence check 385:confidence test 311:troubleshooting 230: 224: 215:Fermi estimates 208: 166: 156: 152: 144: 137: 129: 127:700 = 7 Ă— 100 = 126: 122: 113:. For example: 96: 91: 28: 23: 22: 15: 12: 11: 5: 1279: 1269: 1268: 1263: 1246: 1245: 1243: 1242: 1237: 1232: 1227: 1222: 1217: 1212: 1207: 1202: 1197: 1192: 1187: 1182: 1177: 1176: 1175: 1170: 1165: 1157: 1151: 1149: 1145: 1144: 1142: 1141: 1136: 1131: 1126: 1120: 1118: 1107: 1106: 1104: 1103: 1098: 1096:MNIST database 1093: 1087: 1085: 1079: 1078: 1076: 1075: 1070: 1065: 1060: 1058:Stanford bunny 1055: 1049: 1047: 1041: 1040: 1038: 1037: 1035:enwik8, enwik9 1032: 1030:Silesia corpus 1027: 1022: 1020:Calgary corpus 1016: 1014: 1008: 1007: 1005: 1004: 999: 994: 989: 984: 978: 976: 970: 969: 967: 966: 961: 956: 951: 946: 924: 919: 871: 866: 861: 856: 850: 848: 840: 839: 837: 836: 831: 825: 823: 817: 816: 814: 813: 808: 803: 798: 792: 789: 788: 783: 782: 775: 768: 760: 752: 751: 727: 703: 678: 666:"Words Matter" 657: 640: 620: 594: 577: 543: 539:ISTQB Glossary 530: 523: 493: 443: 442: 440: 437: 436: 435: 430: 425: 420: 415: 408: 405: 315:runtime errors 299: 223: 220: 219: 218: 212: 209:1000 kg/m 193: 165: 162: 161: 160: 141: 138:738 = 544,644, 95: 92: 90: 87: 26: 9: 6: 4: 3: 2: 1278: 1267: 1264: 1262: 1259: 1258: 1256: 1241: 1238: 1236: 1233: 1231: 1228: 1226: 1223: 1221: 1218: 1216: 1215:"Tom's Diner" 1213: 1211: 1208: 1206: 1203: 1201: 1198: 1196: 1193: 1191: 1188: 1186: 1183: 1181: 1180:"Bad Apple!!" 1178: 1174: 1171: 1169: 1166: 1164: 1161: 1160: 1158: 1156: 1153: 1152: 1150: 1146: 1140: 1137: 1135: 1132: 1130: 1127: 1125: 1124:Etaoin shrdlu 1122: 1121: 1119: 1116: 1112: 1108: 1102: 1099: 1097: 1094: 1092: 1089: 1088: 1086: 1084: 1080: 1074: 1071: 1069: 1066: 1064: 1061: 1059: 1056: 1054: 1051: 1050: 1048: 1046: 1042: 1036: 1033: 1031: 1028: 1026: 1023: 1021: 1018: 1017: 1015: 1013: 1009: 1003: 1000: 998: 995: 993: 990: 988: 985: 983: 980: 979: 977: 975: 971: 965: 962: 960: 959:TVE test card 957: 955: 952: 950: 947: 944: 940: 936: 932: 928: 925: 923: 920: 918: 914: 910: 906: 902: 898: 894: 890: 886: 882: 878: 875: 874:BBC Test Card 872: 870: 867: 865: 862: 860: 857: 855: 852: 851: 849: 846: 841: 835: 832: 830: 827: 826: 824: 822: 818: 812: 809: 807: 804: 802: 799: 797: 794: 793: 790: 781: 776: 774: 769: 767: 762: 761: 758: 741: 737: 731: 717: 713: 707: 692: 688: 682: 667: 661: 654: 643: 641:0-937175-30-7 637: 633: 632: 624: 616: 612: 605: 598: 591: 587: 581: 573: 569: 565: 561: 554: 547: 540: 534: 526: 520: 516: 512: 508: 504: 497: 486: 482: 478: 474: 470: 466: 462: 455: 448: 444: 434: 431: 429: 426: 424: 423:Fermi problem 421: 419: 416: 414: 411: 410: 404: 402: 398: 394: 390: 386: 382: 378: 374: 370: 366: 361: 358: 353: 349: 344: 342: 339: 335: 331: 327: 323: 318: 316: 312: 307: 304: 297: 295: 290: 288: 284: 280: 276: 272: 268: 264: 259: 257: 253: 248: 244: 240: 235: 229: 216: 213: 206: 205:that of water 202: 198: 194: 191: 187: 183: 179: 175: 171: 168: 167: 150: 142: 135: 123:700 < 738, 120: 116: 115: 114: 112: 109: 105: 104:rule-of-thumb 101: 86: 84: 80: 76: 71: 69: 65: 61: 60:sum of digits 57: 52: 50: 46: 45:rule-of-thumb 42: 37: 33: 19: 1129:Hamburgevons 843:Television ( 829:Chinese room 806:Sanity check 805: 743:. Retrieved 739: 730: 719:. Retrieved 715: 706: 695:. Retrieved 693:. 2022-11-16 690: 681: 670:. Retrieved 668:. 2020-11-20 660: 652: 645:. Retrieved 630: 623: 614: 610: 597: 589: 580: 563: 559: 546: 533: 506: 502: 496: 485:the original 464: 460: 447: 392: 391:, or simply 388: 384: 381:sanity check 380: 362: 356: 345: 330:dependencies 319: 308: 303:return value 293: 291: 263:unit testing 260: 246: 242: 231: 185: 176:output of a 111:calculations 108:mathematical 97: 94:Mathematical 78: 72: 67: 63: 53: 35: 32:sanity check 31: 29: 1134:Lorem ipsum 1115:filler text 1068:Utah teapot 1053:Cornell box 834:Turing test 617:(2): 40–54. 401:inclusivity 326:environment 294:sanity test 239:smoke tests 153:8 Ă— 5 = 40, 79:sanity test 36:sanity test 18:Sanity test 1255:Categories 1111:Typography 745:2023-01-23 721:2023-01-23 697:2023-01-23 672:2023-06-29 566:(4): 321. 439:References 252:QA testing 247:reasonable 180:to be 700 134:inequality 1230:Shakedown 845:test card 647:7 October 373:MediaWiki 341:libraries 313:software 281:, or for 256:debugging 145:918 Ă— 155 1155:3DBenchy 1091:ImageNet 481:16820529 418:Checksum 407:See also 243:possible 164:Physical 943:PM 5644 939:PM 5544 935:PM 5540 931:PM 5538 796:Pangram 740:Twitter 397:ableist 377:Twitter 369:Android 267:merging 201:density 638:  521:  479:  298:within 277:, for 275:branch 190:energy 186:joules 119:square 41:sanity 1205:Lenna 1195:GTUBE 1159:Acid 1148:Other 987:Quine 922:ETP-1 607:(PDF) 588:. In 556:(PDF) 488:(PDF) 477:S2CID 457:(PDF) 271:trunk 174:power 64:every 1101:List 1073:List 964:UEIT 649:2014 636:ISBN 519:ISBN 393:test 375:and 363:The 338:link 336:and 285:and 245:and 125:yet 77:, a 68:many 568:doi 511:doi 507:181 469:doi 357:any 178:car 73:In 47:or 34:or 1257:: 941:, 937:, 933:, 915:, 911:, 907:, 903:, 899:, 895:, 891:, 887:, 883:, 879:, 738:. 714:. 689:. 651:. 615:29 613:. 609:. 564:11 562:. 558:. 517:. 475:. 465:32 463:. 459:. 403:. 387:, 371:, 346:A 289:. 258:. 211:). 207:(~ 182:kJ 30:A 1173:3 1168:2 1163:1 1117:) 1113:( 945:) 929:( 917:X 913:W 909:J 905:H 901:G 897:F 893:E 889:D 885:C 881:B 877:A 847:) 779:e 772:t 765:v 748:. 724:. 700:. 675:. 574:. 570:: 527:. 513:: 471:: 20:)

Index

Sanity test
sanity
rule-of-thumb
back-of-the-envelope calculation
divisibility rule
sum of digits
computer science
computer program
orders of magnitude
rule-of-thumb
mathematical
calculations
square
inequality
multiple of three
Dimensional analysis
power
car
kJ
energy
physical properties
density
that of water
Fermi estimates
Smoke testing (software)
software testing
smoke tests
QA testing
debugging
unit testing

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑