Blog Network Home > Quality Assurance and Testing Services > Good Attributes to be kept in mind for designing Automated Test Cases

Good Attributes to be kept in mind for designing Automated Test Cases

by Sudharsan on January 17, 2012 in Quality Assurance and Testing Services

Programming remains the biggest & most critical component of test case automation. Hence designing & coding of test cases is extremely important, for their execution and maintenance to be effective.

Some fundamental attributes of good automated test cases which can be followed,

  • Simple
  • Modular
  • Robust
  • Reusability
  • Maintainable
  • Documented
  • Independant

1) Simplicity: The test case should have a single objective. Multi-objective test cases are difficult to understand and design. There should not be more than 10-15 test steps per test case, May be depending on the process steps may increase. However 10 to 15 steps note a good clarity test case. Multipurpose test cases are likely to break or give misleading results. If the execution of a complex test leads to a system failure, it is difficult to isolate the cause of the failure.

2) Modularity: Each test case should have a setup and cleanup phase before and after the execution test steps, respectively. The setup phase ensures that the initial conditions are met before the start of the test steps. Similarly, the cleanup phase puts the system back in the initial state, that is, the state prior to setup. Each test step should be small and precise. However we can’t expect all test cases to have set up and cleanup process, it may vary accordingly.. The test steps are building blocks from reusable libraries that are put together to form multi-step test cases.

3) Robustness and Reliability: A test case verdict (pass or fail) should be assigned in such a way that it should be unambiguous and understandable. Robust test cases can ignore trivial failures such as one pixel mismatch in a graphical display. Care should be taken so that false test results are minimized. The test cases must have built-in mechanisms to detect and recover from errors. For example, a test case need not wait indefinitely if the software under test has crashed. Rather, it can wait for a while and terminate an indefinite wait by using a timer mechanism.

4) Reusability: The test steps are built to be configurable, that is, variables should not be hard coded. They can take values from a single configurable file(Data Tables). Attention should be given while coding test steps to ensure that a single global variable is used, instead of multiple, decentralized, hard-coded variables. Test steps are made as independent of test environments as possible. The automated test cases are categorized into different groups so that subsets of test steps and test cases can be extracted to be reused for other platforms and/or configurations. Finally, in GUI automation hard-coded screen locations must be avoided.

5) Maintainability: Any changes to the software under test will have an impact on the automated test cases and may require necessary changes to be done to the affected test cases. Therefore, it is required to conduct an assessment of the test cases that need to be modified before an approval of the project to change the system. The test suite should be organized and categorized in such a way that the affected test cases are easily identified. If a particular test case is data driven, it is recommended that the input test data be stored separately from the test case and accessed by the test procedure as needed. The test cases must comply with coding standard formats. Finally, all the test cases should be controlled with a version control system.

6) Documented: The test cases and the test steps must be well documented. Each test case gets a unique identifier, and the test purpose is clear and understandable. Author name, date of creation, and the last time it was modified must be documented. There should be traceability matrix to the features and requirements being checked by the test case. The situation under which the test case cannot be used is clearly described. The environment requirements are clearly stated with the source of input test data (if applicable). Finally, the result, that is, pass or fail, evaluation criteria are clearly described.

7) Independent and Self-sufficient: Each test case is designed as a cohesive entity, and test cases should be largely independent of each other. Each test case consists of test steps, which are naturally linked together. The predecessor and successor of a test step within a test case should be clearly understood.

You might want to read these awesome related posts


{ 17 comments… read them below or add one }

1 Ruth January 23, 2012 at 5:39 am

After study a few of the blog posts on your website now, and I truly like your way of blogging. I bookmarked it to my bookmark website list and will be checking back soon.

2 Αρθρα Pros February 10, 2012 at 11:52 am

Good article, thanks and we want more! Added to FeedBurner as well

3 Nereida Pucket February 14, 2012 at 10:56 pm

Many thanks for a tremendous put up, may see one’s others content. thanks for your ideas with this, I really felt a bit thump by this post. Many thanks again! You make a good aspect. Has fantastic facts here. I believe that in case a greater number thought about it like this, they’d have a better time receive the hang ofing the situation.

4 Greg Nistendirk February 15, 2012 at 5:58 am

Good article , thanks and we want more! Added to FeedBurner as well

5 Milton Matsushima February 15, 2012 at 8:24 am

very nice post, i certainly love this website, keep on it

6 Valda Testman February 16, 2012 at 2:50 am

Hello.This article was extremely motivating, particularly since I was looking for thoughts on this subject last Wednesday.

7 Hai Abler February 16, 2012 at 5:08 pm

Sweet site, super pattern , very clean and use friendly .

8 Tommy Richlin February 18, 2012 at 7:59 am

I stumbled upon this I have found It absolutely helpful and it has helped me out loads. I hope to give a contribution & aid different users like its helped me. Good job.

9 Retirement Communities in Delaware February 18, 2012 at 6:07 pm

I got what you mean , appreciate it for posting .Woh I am thankful to find this website through google. “The eye of a human being is a microscope, which makes the world seem bigger than it really is.” by Kahlil Gibran.

10 Brian Hanshaw February 19, 2012 at 8:15 am

nice post!

11 Pafundi@gmail.com February 20, 2012 at 7:33 am

Way cool! Some extremely valid points! I appreciate you penning this post plus the rest of the site is also really good.

12 Tomas Daoud February 20, 2012 at 8:54 am

Great post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!

13 computer repair services February 20, 2012 at 5:35 pm

Your style is really unique compared to other folks I’ve read stuff from. Many thanks for posting when you’ve got the opportunity, Guess I will just bookmark this web site.

14 Sandi Shinholster February 21, 2012 at 5:22 am

Good article, thanks and we want more! Added to FeedBurner as well

15 Sammy Gellman February 22, 2012 at 7:32 pm

As a Newbie, I am always browsing online for articles that can benefit me. Thank you

16 Pozycjonowanie Wrocław February 22, 2012 at 8:05 pm

Really informative post. Your current Site style is awesome as well!

17 Jack February 22, 2012 at 8:18 pm

This excellent website certainly has all the info I needed concerning this subject and didn’t know who to ask.

Leave a Comment