How to summate a custom field?

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

How to summate a custom field?

Postby franny2006 » Wed Feb 18, 2009 3:56 pm

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...
franny2006
TestLink user
 
Posts: 3
Joined: Fri May 02, 2008 7:54 am

Postby fman » Wed Feb 18, 2009 5:20 pm

right now only a couple of well known CF are summed

see:
third_party/user_contribution/cfields_for_computing_time.sql

think is what you need
fman
Member of TestLink Community
 
Posts: 3021
Joined: Tue Nov 15, 2005 7:19 am

Postby fman » Thu Feb 19, 2009 7:26 am

/**
* 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);
fman
Member of TestLink Community
 
Posts: 3021
Joined: Tue Nov 15, 2005 7:19 am

Postby franny2006 » Mon Feb 23, 2009 10:50 am

Thank you very much, this works great!
franny2006
TestLink user
 
Posts: 3
Joined: Fri May 02, 2008 7:54 am

Postby Ilissan » Wed Feb 25, 2009 8:12 am

fman Are this custom_fields are built in in 1.8 RC4 ? Or by this query you add them ??



I understand that this specific custom fields id's ( CF_ESTIMATED_EXEC_TIME
and CF_EXEC_TIME) are hardcoded and therefore only their values will be summed? right?
Ilissan
TestLink user
 
Posts: 8
Joined: Tue Nov 04, 2008 10:43 am

Postby Ilissan » Thu Mar 05, 2009 1:51 pm

I mean, are these fields already there (in the custom fields) by default or i should create them by my self???

Thanks in Advance!!!!

:!:
Ilissan
TestLink user
 
Posts: 8
Joined: Tue Nov 04, 2008 10:43 am

Postby milton » Thu Mar 19, 2009 12:11 am

It is my doubt!
milton
Advanced user
 
Posts: 15
Joined: Wed Nov 19, 2008 11:46 am

Postby Merch » Thu Mar 19, 2009 7:58 pm

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!!!!

:!:


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.
Merch
TestLink user
 
Posts: 8
Joined: Thu Mar 19, 2009 7:26 pm

Postby Amaradana » Fri Apr 03, 2009 2:06 pm

Hi I am sorry to bother, but can you please teel in which reports does this caliculate and show the results, since i ran the reports, but i was unable to get that, where do i need to find these fields in the reports.
Amaradana
Member of TestLink Community
 
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am

Postby Amaradana » Fri Apr 03, 2009 2:19 pm

Found it. Solved. Thanks, I was able to see in test plan reports
Amaradana
Member of TestLink Community
 
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am

Postby Amaradana » Mon Apr 06, 2009 8:27 am

Amaradana wrote:Found it. Solved. Thanks, I was able to see in test plan reports


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.

Can also provide some more information in which file does this both fields are hard coded.
Amaradana
Member of TestLink Community
 
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am

Postby Ilissan » Mon Apr 06, 2009 11:11 am

The same is here...
Ilissan
TestLink user
 
Posts: 8
Joined: Tue Nov 04, 2008 10:43 am

Postby Amaradana » Tue Apr 07, 2009 5:30 am

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.

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..


If this is possible, please do changes from the next release. This would be helpful.

Please let me know if anything else is required.
Amaradana
Member of TestLink Community
 
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am

Postby fman » Tue Apr 07, 2009 11:23 am

dear users we need LOT of help with help/documentation then please whyt do not you volunteer for this taks ?
fman
Member of TestLink Community
 
Posts: 3021
Joined: Tue Nov 15, 2005 7:19 am

Postby Amaradana » Tue Apr 07, 2009 11:25 am

Hi Fman, I am happy to do that, can you please tell me the procedure, so that If at all any such updations i am really happy to update.
Amaradana
Member of TestLink Community
 
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am

Next

Return to TestLink 1.8 (OBSOLETE => EOL)[LOCKED]



Who is online

Users browsing this forum: No registered users and 3 guests