Test tools

8 Tips To Create Complete Test Cases

How can you explain to a beginner tester the idea of writing, executing and reporting of test cases? It’s a tough job, I found this quite recently by training a new person in the team. Everything I had in my head but there was not one clear and consistent explanation on the paper. Many years of experience, unfortunately, has not helped me to verbally justify and explain this issue. This post will be an attempt to complete my own thoughts and these coming from the environment.

For begining, a few sentence to clarify what are the test cases and test scenarios and how they are different and in what order must exist. Starting from the end, let us answer the question “why?”. Test case is a description, a recipe for tester, dealing with how to test a given functionality and how to check whether this works correctly. Looking at the structure, we can identify types of relationship: Test scenario -> test case -> Test Step. Starting from the end again, because it will be easier, I can write:

  • Test Step – specifies an action to perform, and the expected response of the test application. For example: Action : Type the password in the password box, Expected result: Your password should be dotted / hidden.
  • Test Case – a list of test steps. Also defines the environmental situation and may link to related bugs, requirements etc.
  • Test Scenario – usually comes directly from business requirements or userstory. Management tools often ignore test scenario for linkage with a list of the requirements. Scenario contains a list of test cases and often their sequence.

As you can see, varies between a test case scenario is significant, and often the two concepts are confused.
How to ensure the quality of the test cases are created? How to manage their life cycle? How to deliver them quickly and when developers need it ?

1. Template – need one and complete template for creating test cases. We can create it in a text editor, spreadsheet or buy or customize the tool. I have written about this in the context of the JIRA.

2. Descriptive and specific – you need a short, concise title and description. Should clearly define the purpose and scope of their operations. We are writing to all testers, not only for yourself, use simple language, complicated language figures are not popular here. Use rather imperative, therefore “Write abc and press enter” not “I am writing abc, and pressing Enter.”

3. Reusable – one and the same test case can be used in many scenarios. Let us remember that! Creating a new item, we must imagine a different kind of use case of our work. I also imagine that test step could be reused, so pay your attention at this level too.

4. Atomic – the greatest tester nightmare struggled with the manual testing is a test case, which is too long and doing too much dependency checks. Person carrying out a process must have a sense of progress, otherwise is bored, reducing its vigilance, and motivation. Tester may have to perform 100 test cases and do them in one day, but it can also have their 10 and do it for a week. Let us create test case, which can be performed up to several minutes, and gain the favor of the other fellow testers, among the satisfied, we can also include those who write automation scripts.

5. Positive and negative – the next important thing is the order of creation. What to do when the project manager requests a set of test cases on the day following approval of an implementation plan? Usually we do not say that he wanted only the beginning of positive tests, those which check whether the functionality exists and acts in accordance with the requirement. Give him as  such set as soon as possible, then we can deal with the preparation of a negative description situation and the relationship between other requirements. To sum up: Positive -> Negative -> Relationships

6. Refactor – if you already done your job we have to remember that applications are changing and the changes in the test cases should follow this process. We can version it, using clone and change method for a given version number. Head of the tests should determine how many past versions we support and we should care enough about our current collection of test cases.

7. Test data – there are moments in which along the correct execution of the test we have to provide some data, which usually (if they are too complex to be described in the text) are attached as binary files. We need to analyze whether it is easier to provide test data or may be easier to add the appropriate test steps.

8. Setup and tear down – if the test case requires the initial configuration, call a particular component, we need to take this into account in the zero step. It is also important to cleanup in the last step like in unit testing or automation, but I believe that during the test manual is worth to preserve this good practice.

Summary
Take to heart my observations if you do not agree write a comment. Perhaps I skipped something, if I drop what I will do an update. At this moment it appears as a complete manual. I promise that soon we will put post in which I will describe exactly the structure of the template test case.

Links
How to write effective test cases
How to write a good test case

Delicious

Discussion

12 comments for “8 Tips To Create Complete Test Cases”

  1. [...] 8 Tips To Create Complete Test Cases (tags: testing QA quality) [...]

    Posted by links for 2010-02-26 | sashidhar.com | February 26, 2010, 10:03 am
  2. Helpful post. Thanks

    Posted by SM | February 26, 2010, 1:10 pm
  3. Yeap
    Interesting Post

    Thanks a lot

    Posted by Vacuela | February 26, 2010, 9:38 pm
  4. [...] case is a test step an action to execute, test scenario is a test case I think – check my Test Case Writing Tips. It is hard to reuse pieces of code – functions and methods with parameters. Not ready yet [...]

    Posted by Very Fast GUI Automation With Free QAliber | Test And Try | March 4, 2010, 6:20 pm
  5. [...] Read the full article               [...]

    Posted by 8 Tips To Create Complete Test Cases | Testing Excellence | March 14, 2010, 11:06 pm
  6. Hello,

    in my experience, having a good test management tool and environment makes it a lot easier to get the entire team to write good and useful test cases. I understand that the team still has to implement ‘best practices’, but a good tool should support team members with test case creation and the testing process.

    For example, our test management tool TestRail not only helps testers to create good test cases (by providing all the fields for this etc), it also makes sure that all team members have access to detailed statistics & activity reports. It of course also makes it easy to execute tests and enter results, which is critical to get the entire team to use such a tool (if it’s too hard to use, some team members will just ignore it). Of course, some of the points are valid for other tools as well, but I can only recommend what I know best:

    http://www.gurock.com/testrail/

    Thanks,
    Dennis

    Posted by Dennis G. | March 17, 2010, 5:42 pm
  7. Hi Dennis,

    Thanks for comment. Of course good tool helps us to create best test cases but it is only a road to success. Test rail is a great web 2.0 solution, I will test it in the future.

    best regards
    Marcin

    Posted by Marcin Zręda | March 17, 2010, 6:40 pm
  8. Marcin,

    Sure, just let me know if you want to take a look at TestRail, I’m happy to provide you with a review copy (just email me: dg (at) gurock.com).

    Thanks,
    Dennis

    Posted by Dennis G. | March 17, 2010, 6:46 pm
  9. [...] 8 Tips To Create Complete Test Cases My short list with basic principles regarding writing good, complete and easy to understand test cases. These principles also can be used when creating acceptance tests. [...]

    Posted by Acceptance Testing and Agile | Test And Try | May 18, 2010, 10:05 am
  10. Hi,

    i want to express my thanks for your way to share your wonderful experience. the way you descripe the technical paper are amazing. really.complete and easy to understand.

    Thanks again!

    I hope you can continue posting more wonder blog on the software testing area.

    Posted by susan wang | June 1, 2011, 10:52 am
  11. How to write test case for text editor using selenium IDE.
    For ex. If there is Description field and i have to test this field then how shall i test.
    Please i need this feedback as early as possible.

    Posted by Balaji Das Naik | February 3, 2012, 4:57 pm
  12. thanks for providing these steps it is very helpful for creating test cases.

    Posted by shweta dhawad | February 22, 2012, 12:24 pm

Post a comment