Test Cases: Assignment and Execution Strategies

[article]
Member Submitted
Summary:

The most effective testing programs start at the beginning of a project, long before any program code has been written. After the requirements documentation is verified, testing that is done in the later stages of the project can concentrate on ensuring the quality of the code. The author discusses a few strategies that might help you formulate effective test case creations and execution assignments.

The most effective testing programs start at the beginning of a project, long before any program code has been written. The requirements documentation is verified first; then, in the later stages of the project, testing can concentrate on ensuring the quality of the code. The real worth of testing, as many say, is derived when test cases are written, executed, and defects logged. There are numerous techniques on writing effective test cases. However, just as significant as writing effective test cases, is who writes and executes them.

Let us consider the following scenario:

You are a test manager of a distributed test team. Both the test and development team consist of onsite and offshore members. The team follows an iterative cycle of product development. Your product development schedule is divided into phases and approximately twenty application functionalities are supposed to be developed and tested in each phase.

You need to assign the use cases (or applicable documentation) to test team members for test case creation. Once the test cases are ready, you need to decide on the most efficient test execution strategy.

This article discusses few strategies which might help in formulating an effective test case creation and execution assignments.

Test Case Creation: Assignment Strategy
There are many different factors to consider when assigning use cases to specific team members for test case creation. They might be distributed randomly or the assignments might be done according to some specific policy, as needed.

Following are some the questions which one could consider when deciding an assignment strategy for test case creation:

a) Which use cases require significant interaction with business analysts, architects and other team members?

Assignments should consider ease of communication with the team members. This saves time and facilitates quick problem resolution in case of issues or concerns. If some use cases require frequent communication with the off-shore analyst and development teams, they should be assigned to the offshore test team members. If frequent interaction is required with onsite team members, assigning them to onsite test team members might be a good idea. This assumes greater importance for organizations with distributed team structure. In case of questions or issues, a significant amount of time might be wasted waiting for a response because of time difference between two locations and other such factors.

b) Is any use case an extension of the existing use case?

If yes, then it might be a better idea to assign it to the same team member who worked on the related use case in earlier iteration. He might be best suited to understand the dependencies and updates to the use case with respect to the earlier iteration.

c) How will the use case assignment enhance team members’ knowledge of different functionalities of the application?

Use cases should be well distributed throughout the team with the aim of making team members aware of various application functionalities. They should not be assigned such that a team member is just aware of one module of application with limited knowledge about the others.

Test Case Execution: Assignment Strategy
Like test case creation, there are many different factors to consider while making test case execution assignments. They might be distributed randomly or the assignments might be done according to some specific policy.

Test execution strategy, typically, involves one of the following:

a) Let the authors of the test cases execute the scripts written by them.

b) Distribute the test cases among various team members so that the authors of the test cases are not assigned to execute the scripts written by them . For example: If John wrote test cases for use case X and Peter did for use case M, then John and Peter might be assigned to execute use cases M and X respectively. John is not assigned to execute test cases X and Peter is not assigned to execute test cases for use case M.

A strategy best suited to the situation should be adopted and followed. Even a mixed strategy, a combination of two strategies above, might be used in some situations.

Strategy 1: Test Case Authors Execute Test Cases Written by Them
Below are some of the factors which favor the use of this strategy:

a) Saves time
Team members executing the test cases know what needs to be tested as they are the author of the test cases. This saves time from issues or concerns which might arise while executing test cases written by someone else.

b) Ease of scheduling
This strategy saves scheduling nightmares, especially for big projects. Team members are aware of their test execution responsibilities in this scenario.

However, this strategy might not be the most efficient in all circumstances. Following are some of the factors which should also be considered together with the ones identified above:

a) Errors might be overlooked
This occurs quite frequently where the test case author fails to capture various possible scenarios. This includes missing test cases, test cases based on misunderstood requirements, and incorrect test case design(e.g., incorrect test case naming conventions). These errors might not be caught if test case authors are executing the scripts written by them. This becomes even more significant if there are no internal or external test case reviews where these errors might be detected before the start of test execution cycle.

b) Casual approach
Test cases might not be written with same considerations as when others would be executing them. Test cases, generally speaking, should be written with following considerations:

Write test cases such that even a lay man should be easily able to understand and execute them.

Replace yourself with the person who might be executing it. Think what you would expect from someone if you were executing their scripts. Make the test scripts unambiguous, self-contained, and self-explanatory.

Following is a conversation between two test team members, who are in the middle of a test case creation cycle:

"Use case XYZ seems pretty complex", Peter said.

"Yes, and this has been assigned to me. There are a lot of different possible scenarios for this use case", John replied.

"So, you might end up with a lot of test cases for this use case", Peter replied.

"Well...since I will be executing this use case, I will make sure to cover most of the scenarios while testing. However, I might not document all of them. I am very well familiar with this use case and don't think I need to document everything I test. More so, I can't spend too much time on this because of scheduling constraints. As long as I test it well, I think I am OK", John said.

If a team member is aware that he will be executing the scripts written by him, it might lead to a very casual effort in documenting scripts. Even though all possible scenarios might be tested, there might not be documentation for the same, as was the case with John in above conversation.

Strategy 2: Test Case Authors Execute Test Cases Written by Other Team Members
Below are some of the factors which favor the strategy of distributing use cases among team members for test execution:

a) Error detection
People executing others scripts might find errors which might have been overlooked by the author. This includes missing test cases, test cases based on misunderstood requirements, and incorrect test case design(e.g., incorrect test case naming conventions). It is very easy to overlook one’s errors which can be easily seen by others.

b) Broadens the scope of knowledge of the application
Team members become familiar with additional application functionalities than writing and executing their own test cases.

As a coin, this strategy too has two sides. Below are some of the factors which also need to be considered together with the ones mentioned above:

a) Incomplete testing
Test case author might have missed few scenarios while creating scripts. Since these are not covered in test scripts, they might go untested. A person executing someone else’s test cases might not delve into details about missing test cases. He might assume the test cases to be complete in all aspects.

b) Waste time
If the team is distributed (onsite and offshore) and test case assignments are done such that a person executing test cases is in different location than the development and analyst team for the same use case, it might waste time in case of issues and concerns to contact the appropriate person because of time difference and other factors. The wait for a response might range from few hours to days.

c) Frustration
Understanding someone else’s scripts can be quite challenging. It can become be very frustrating if the scripts are not well written and ambiguous.

For example: if during the test script execution one doesn’t understand the intent of the author, one might execute the scripts with whatever limited understanding they have. They might not raise issues and concerns because of tight deadlines and rush to finish the testing. Frustration to understand scripts might lead to poor testing.

Test case assignment and execution strategy should be an important consideration in any testing initiative. This not only ensures a smooth testing cycle but also improves the overall team efficiency. This article covered few of the considerations which might help when making such decisions.

About the author

CMCrossroads is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.