Saturday, September 18, 2010

Custom Fields and Keywords in TestLink

Custom Fields

TestLink provides a feature where User can create his own Custom Field and Keywords and also assign them to his Test cases.

When you create a test case, by default the fields provided are:

  • Test case name
  • Test case summary
  • Test steps
  • Expected results

which is quite sufficient to start with your testing. But, apart from managing the test cases, providing good test metrics is equally important. For example, if you are able to record how much time it took for you to run 200 test cases for a particular test project, it is a useful benchmark for planning your regression cycle for the next release or to estimate the time for a similar project which is about to start.

For this reason, TestLink provides 2 default custom fields:

1. Estimated time to run

2. Actual time to run

The field "Estimated time to run" can be configured to be displayed during the test case creation stage, so that the creator enters a value that he feels is required to run the test. The real time, however, may be shorter or slightly higher than the estimate. This can be captured during the test execution phase. The 2nd field "Actual time to run" can be configured to accept values only during execution phase. That's pretty useful.

Important point: (Actual and Estimated Time have their default units in Minutes) but can be customized accordingly in Hours

Similarly other custom Fields can be created and can be assigned to the Test cases as per the requirement.

Keywords

TestLink keywords also play a very important role in planning your test execution and gathering test metrics.

For example, I added keywords "high priority test", "medium priority test", "low priority test", "automated". (PS: we can add more keywords like sanity, regression, etc)

These keywords can be assigned to test cases appropriately. This helps to filter test cases on a specific keyword during execution. i.e., When adding tests to a plan, we can search based on keywords and run tests which are only relevant to that cycle.

Example: To run a quick regression test, we can assign tests marked as "high priority" to ensure basic features are working fine.

Similarly, if you are focused on test automation, you can assign keyword "manual" to your tests, so that you can leave the tests which are taken care of by the automation tool and execute tests only for the manual tests.

We define Priority of our test cases with High, Medium and Low.

Similarly while defining a Milestone we have to define what %age of these individual priorities would be essential to achieve that Milestone:

High: 100%

Medium: 80%

Low: 20%

So all the test cases with Priority high must be executed to achieve 100% milestone

So 80% of the test cases with Priority Medium must be executed to achieve 80% milestone

So 20% of the test cases with Priority low must be executed to achieve 20% milestone

What is the difference between Bug, Error and Failure?

Bug-A defect in the system that prevents it from behaving in the expected way e.g. a user is provided with User name and Password through which he can enter a Portal.

Now even after entering correct User name and Password User is not able to login into the system, such a situation arise due to a bug in the System.

Error-Error is a situation where system does not behave in the expected way due to an error committed by the user.

E.g. In the same example of logging to portal if system has a constraint that user name should always be entered in lower case and User enters the name in upper case then system would throw an error and would not allow user to login.

Failure-A situation where system deviates from expected behavior. In basic layman language system was build to match some requirement but the end product deviated from the set requirements.

E.g. For the same example to login to Portal, requirement says there should be a Forgot Password Link which would provide a feature to send a new password in case User forgets his password and by entering his User name he can receive new password. Now if the Login page has no such link then that is a failure as in case User forgets his password he cannot login to his portal.

TestLink

TestLink Flow

1) Create a new Project and assign different Roles to that Project as Per the requirement.

2) Create a Test Plan along with Build and Version number mentioning all the required and mandatory details.

3) Import the Requirements that are associated with the Project.

4) Create new Test suite and import Test cases in an organized way as per the system Flow.

5) In case some Custom Fields are created then assign those fields to the test Cases (Create a Custom Field Regression Test Case and assign that to all the test cases you feel would be part of Regression Testing.

6) Assign the Requirements to the Test cases-This is the best method to link your test cases to your requirements.

7) Execute the Test cases and report all the incidents that occur.

8) Test Managers or stakeholders now can have a look at the Metrics and Reports to check the progress.

9) In case there is some new functionality that would be added to the system then required changes could be done to Test plan and new Test cases could be added to the Test Suite.

10) For any new Project repeat the above mentioned steps.