How to summate a custom field?
Moderators: Amaradana, TurboPT, TL Developers
-
- TestLink user
- Posts: 3
- Joined: Fri May 02, 2008 7:54 am
How to summate a custom field?
Hi,
I have defined a custom field "working time", to record the time spent for each testcase. Now I want to know, how many time has to be spent on a testplan. So is there a way to cumulate the content of custom field "working time" for all testcases of a testplan?
Thank you for advice...
I have defined a custom field "working time", to record the time spent for each testcase. Now I want to know, how many time has to be spent on a testplan. So is there a way to cumulate the content of custom field "working time" for all testcases of a testplan?
Thank you for advice...
/**
* TestLink Open Source Project - http://testlink.sourceforge.net/
* This script is distributed under the GNU General Public License 2 or later.
*
* Filename $RCSfile: customfields_for_computing_times.txt,v $
*
* @version $Revision: 1.1 $
* @modified $Date: 2009/02/19 07:08:40 $ by $Author: franciscom $
* @author Martin Havlat
*
*/
Quick Help - Computing Times using Custom Fields
Two custom fields with special name are managed by TestLink to compute times:
CF_ESTIMATED_EXEC_TIME
used by TEST PLAN designers, during Test Case Assignment to test plan, to give testers
an indication about time (IN MINUTES) needed to execute test case.
CF_EXEC_TIME
used by testers while executing test cases, to indicate time (IN MINUTES) used to run test case.
Test Link will do sum() on values present on these custom fields while creating reports
Using following SQL you can configure these Custom Fields
/*Data for the table `custom_fields` */
insert into custom_fields
(name,label,type,possible_values,default_value,valid_regexp,length_min,length_max,
show_on_design,enable_on_design,show_on_execution,enable_on_execution,
show_on_testplan_design,enable_on_testplan_design)
values ('CF_ESTIMATED_EXEC_TIME','Estimated Exec time (minutes)',2,'','','',0,0,1,1,1,0,0,0);
insert into custom_fields
(name,label,type,possible_values,default_value,valid_regexp,length_min,length_max,
show_on_design,enable_on_design,show_on_execution,enable_on_execution,
show_on_testplan_design,enable_on_testplan_design)
values ('CF_EXEC_TIME','Time used to execute test (min)',2,'','','',0,0,0,0,1,1,0,0);
/*Data for the table `cfield_node_types` */
insert into cfield_node_types (field_id,node_type_id)
values ( (SELECT id FROM custom_fields WHERE name='CF_ESTIMATED_EXEC_TIME') ,3);
insert into cfield_node_types (field_id,node_type_id)
values ( (SELECT id FROM custom_fields WHERE name='CF_EXEC_TIME') ,3);
* TestLink Open Source Project - http://testlink.sourceforge.net/
* This script is distributed under the GNU General Public License 2 or later.
*
* Filename $RCSfile: customfields_for_computing_times.txt,v $
*
* @version $Revision: 1.1 $
* @modified $Date: 2009/02/19 07:08:40 $ by $Author: franciscom $
* @author Martin Havlat
*
*/
Quick Help - Computing Times using Custom Fields
Two custom fields with special name are managed by TestLink to compute times:
CF_ESTIMATED_EXEC_TIME
used by TEST PLAN designers, during Test Case Assignment to test plan, to give testers
an indication about time (IN MINUTES) needed to execute test case.
CF_EXEC_TIME
used by testers while executing test cases, to indicate time (IN MINUTES) used to run test case.
Test Link will do sum() on values present on these custom fields while creating reports
Using following SQL you can configure these Custom Fields
/*Data for the table `custom_fields` */
insert into custom_fields
(name,label,type,possible_values,default_value,valid_regexp,length_min,length_max,
show_on_design,enable_on_design,show_on_execution,enable_on_execution,
show_on_testplan_design,enable_on_testplan_design)
values ('CF_ESTIMATED_EXEC_TIME','Estimated Exec time (minutes)',2,'','','',0,0,1,1,1,0,0,0);
insert into custom_fields
(name,label,type,possible_values,default_value,valid_regexp,length_min,length_max,
show_on_design,enable_on_design,show_on_execution,enable_on_execution,
show_on_testplan_design,enable_on_testplan_design)
values ('CF_EXEC_TIME','Time used to execute test (min)',2,'','','',0,0,0,0,1,1,0,0);
/*Data for the table `cfield_node_types` */
insert into cfield_node_types (field_id,node_type_id)
values ( (SELECT id FROM custom_fields WHERE name='CF_ESTIMATED_EXEC_TIME') ,3);
insert into cfield_node_types (field_id,node_type_id)
values ( (SELECT id FROM custom_fields WHERE name='CF_EXEC_TIME') ,3);
-
- TestLink user
- Posts: 3
- Joined: Fri May 02, 2008 7:54 am
They are not there by default, when you run the script they will be added. After running the script you have to go into the custom field management and activate them.Ilissan wrote:I mean, are these fields already there (in the custom fields) by default or i should create them by my self???
Thanks in Advance!!!!
The above is vible in 1.8Rc4, when i generate the test plan, i was able to see in the test plan(summation of both the field). but in 1.8.1 i was unable to see in the test plan, Can you please let me know where to see in the results. Where does summation of results are availble in reports.Amaradana wrote:Found it. Solved. Thanks, I was able to see in test plan reports
Can also provide some more information in which file does this both fields are hard coded.
Ok I got it, here is the solution those were moved to test report you can find the checkbox "METRICS", upon seletcing that you can get the values in the report.
Please let me know if anything else is required.
If this is possible, please do changes from the next release. This would be helpful.NOTE: HELLO FMAN/MHAVALT, a small suggestion if any such changes taken place i feel that they should be documented, since these type of question will not come, at least in help file or say this is related to summate fields so in the user contribution in the file it can be updated saying that this fields are visinble in so and so place..
Please let me know if anything else is required.