{
    "version" : "https://jsonfeed.org/version/1",
    "content" : "news",
    "type" : "single",
    "title" : "The Test Case: Write It Once, Test Many Times |Digital.gov",
    "description": "The Test Case: Write It Once, Test Many Times",
    "home_page_url" : "/preview/gsa/digitalgov.gov/bc-archive-content-3/","feed_url" : "/preview/gsa/digitalgov.gov/bc-archive-content-3/2013/12/16/the-test-case-write-it-once-test-many-times/index.json","item" : [
    {"title" :"The Test Case: Write It Once, Test Many Times","summary" : "What if Thomas Edison Didn’t Use Test Cases? “I have not failed. I’ve just found 10,000 ways that won’t work.” ~Thomas A. Edison Software testing is like a science experiment. The Tester must plan: methods, steps, and paths through the Application Under Test (AUT) to completely exercise the","date" : "2013-12-16T11:38:54-04:00","date_modified" : "2025-01-27T19:42:55-05:00","topics" : {
        
            "mobile" : "Mobile",
            "research" : "Research"
            },"branch" : "bc-archive-content-3",
      "filename" :"2013-12-16-the-test-case-write-it-once-test-many-times.md",
      
      "filepath" :"news/2013/12/2013-12-16-the-test-case-write-it-once-test-many-times.md",
      "filepathURL" :"https://github.com/GSA/digitalgov.gov/blob/bc-archive-content-3/content/news/2013/12/2013-12-16-the-test-case-write-it-once-test-many-times.md",
      "editpathURL" :"https://github.com/GSA/digitalgov.gov/edit/bc-archive-content-3/content/news/2013/12/2013-12-16-the-test-case-write-it-once-test-many-times.md","slug" : "the-test-case-write-it-once-test-many-times","url" : "/preview/gsa/digitalgov.gov/bc-archive-content-3/2013/12/16/the-test-case-write-it-once-test-many-times/","content" :"\u003cp\u003e\u003cstrong\u003eWhat if Thomas Edison Didn’t Use Test Cases?\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\n\n\n\u003cdiv class=\"quote-block \"\u003e\n    \u003cblockquote\u003e\n      \u003cspan class=\"quote-block__quotation-mark\"\u003e“\u003c/span\u003e\n      I have not failed. I\u0026rsquo;ve just found 10,000 ways that won\u0026rsquo;t work.\n      \u003cspan class=\"quote-block__quotation-mark\"\u003e”\u003c/span\u003e\u003ccite\u003e— Thomas A. Edison\u003c/cite\u003e\u003c/blockquote\u003e\n  \u003c/div\u003e\n\u003cdiv class=\"image image-right image-right-legacy\"\u003e\n  \u003cimg\n    src=\"https://s3.amazonaws.com/digitalgov/_legacy-img/2013/12/250-x-281-Mobile-Tester-Newsletter.jpg\"\n    alt=\"Mobile testing on a laptop\"/\u003e\u003c/div\u003e\n\n\u003cp\u003eSoftware testing is like a science experiment. The Tester must plan: methods, steps, and paths through the Application Under Test (AUT) to completely exercise the application and uncover undesirable issues before its release.\u003c/p\u003e\n\u003cp\u003eIf Thomas Edison did not document his 10,000 test cases, he may have wasted time by executing some tests multiple times, or he may have missed some combinations, thus making the development of the light bulb take even longer or not at all possible.\u003c/p\u003e\n\u003ch2 id=\"what-is-a-test-case\"\u003eWhat is a test case?\u003c/h2\u003e\n\u003cp\u003eA test case is simply a list of setup instructions (or preconditions) and steps to expect a test usually linked to a requirement or expected behavior of the AUT.\u003c/p\u003e\n\u003cp\u003eThink of a test case as the directions you would give to a user to complete a task broken into the most basic of steps. Test cases allow almost anyone to execute the same test in the same way every time.\u003c/p\u003e\n\u003cp\u003eApplications can have hundreds or even thousands of test cases. However, if multiple tests require the same steps repeated with different data, a single test case can be created that links with an accompanying data table. This method promotes efficiency especially during maintenance where only one test case will require updating.\u003c/p\u003e\n\u003cp\u003eFor example, if a Tester wants to validate that the values 2,4,6, and 8 are accepted by a field, the Tester would write a single test case; in the data table (or Excel sheet), they would have the data 2,4,6, and 8. This helps to verify the multiple data without writing the same test case four times.\u003c/p\u003e\n\u003ch2 id=\"why-do-we-need-to-write-test-cases\"\u003eWhy do we need to write test cases?\u003c/h2\u003e\n\u003cp\u003eTest cases help the Tester think through all of the test combinations and paths that are required to fully test an application. Once written, these tests can be give to multiple Testers during execution. Additionally, once the test cases are complete, the Testers are able to provide valuable metrics on test case execution and requirements coverage.\u003c/p\u003e\n\u003ch2 id=\"what-should-be-included-in-a-test-case\"\u003eWhat should be included in a test case?\u003c/h2\u003e\n\u003cp\u003eIf you want your test cases to be reusable and usable by different Testers, you should standardize them.\u003c/p\u003e\n\u003cp\u003eSome fields you may want to include in your test case are:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eTest Case ID\u003c/strong\u003e – The unique identifier for this test case\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTest Case Title\u003c/strong\u003e – A short description of test case\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTest Case Summary\u003c/strong\u003e – A detailed description of what the test case does and why it is important\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ePrecondition/Test Data\u003c/strong\u003e – Required test data, or anything else that needs to be in place before the test case start, such as a certain version of Windows or Internet Explorer to use\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTest Steps\u003c/strong\u003e – The actual steps that the Tester should execute, such as to enter data and press submit button\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eExpected Result\u003c/strong\u003e – What the Tester should expect to see or occur at the end of the test case\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eActual Result\u003c/strong\u003e – What the Tester actually saw or what occurred at the end of the test case\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTest Case Status\u003c/strong\u003e – Did the test pass or fail?\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eComments\u003c/strong\u003e – Notes on the test execution.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cstrong\u003eHow are mobile test cases different for Web test cases?\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThey aren’t. If you understand test case writing for a Web application, you will be able to write test cases for any type of allocation including a mobile application. Test cases for any technology require the same types of information. That said, with any technology, there will be some differences. For example, test cases written specifically for Web Services may also include XML scripts, database testing may include SQL statements, and “graphic heavy” applications may include many graphics to compare test execution results with.\u003c/p\u003e\n\u003cp\u003eWriting test cases relies on Testers to be organized, thorough, and competent in the medium, be it Web or mobile.\u003c/p\u003e\n\u003ch2 id=\"what-tools-do-i-need-to-write-a-test-case\"\u003eWhat tools do I need to write a test case?\u003c/h2\u003e\n\u003cp\u003eNone! While there are many free and paid tools dedicated to creating, storing and reporting on test cases, but many of us still use Microsoft Word or Excel to document our test cases. However, the benefit of using some of the bigger artifact repositories is that they can assist in creating more standard test cases as well as provide mechanism to automatically generate test case metrics such as complete, ready, executed, passed/failed, etc.\u003c/p\u003e\n\u003ch2 id=\"conclusion\"\u003e\u003cstrong\u003eConclusion\u003c/strong\u003e\u003c/h2\u003e\n\u003cblockquote\u003e\n\u003cp\u003e“Many of life’s failures are people who did not realize how close they were to success when they gave up.”\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cblockquote\u003e\n\u003cp\u003e~Thomas A. Edison\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eAs an inventor and scientist, Thomas Edison knew the value of writing and using test cases. As Testers we need to be as thorough and organized as a scientist by developing and writing our own test cases, and organizing and linking our test cases to requirements to ensure that we are testing every aspect of the application under test. The failure to use test cases in our test experiments many cause us to miss issues that will certainly be found by our users in production.\u003c/p\u003e\n\u003ch2 id=\"references\"\u003e\u003cstrong\u003eReferences\u003c/strong\u003e\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca class=\"wiki_link_ext\" href=\"http://www.softwaretestinghelp.com/how-to-write-effective-test-cases-test-cases-procedures-and-definitions/\" rel=\"nofollow\"\u003eHow to Write Effective Test Cases, Procedures, and Definitions\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca class=\"wiki_link_ext\" href=\"http://file:http://help.utest.com/testers/crash-courses/functional/test-case-writing-creation-101\" rel=\"nofollow\"\u003eTest Case Writing (Creation) 101\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca class=\"wiki_link_ext\" href=\"http://www.qualitytesting.info/profiles/blogs/how-to-write-a-good-test-case\" rel=\"nofollow\"\u003eHow to Write a Good Test Case\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca class=\"wiki_link_ext\" href=\"http://www.softwaretestingclass.com/tips-guidelines-for-writing-test-cases/\" rel=\"nofollow\"\u003eTips/Guidelines for Writing Test Cases\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca class=\"wiki_link_ext\" href=\"http://www.stickyminds.com/sitewide.asp?Function=edetail\u0026ObjectType=ART\u0026ObjectId=8965\" rel=\"nofollow\"\u003eThe Test Case as a Scientific Experiment\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cem\u003eThe Mobile Tester Newsletter was sent bi-monthly to the volunteer Testers in our Federal Crowdsource Mobile Testing Program. Each newsletter contained a feature article, and interesting trends and statistics from the world of mobile testing.\u003c/em\u003e\u003c/p\u003e\n"}
  ]
}
