config.inc.php -主配置文件,它幾乎被每一個頁面include.
/gui/templates/input_dimensions.conf – 代替huml輸入的硬編碼屬性,像maxlength和size,我們把它編進了這個文件中。(有一些歷史原因造成的異常)
有效值包含NONE, ERROR, INFO, DEBUG, EXTENDED,默認為error。DEBUG級別只在開發(fā)或者與bug系統(tǒng)集成時使用
$tlCfg->log_path=TL_ABS_PATH . ‘logs’ . DS ;
如果有安全薄弱的點,在登錄頁和主頁面會有警告。這個消息默認打開(true),false將引起文件config_check.txt,有著一個列表,創(chuàng)建日志目錄,不會用戶不會通過GUI被通知的。
/** The name of the database that contains the mantis tables */ //Mantis使用的數(shù)據(jù)庫名
define('BUG_TRACK_DB_USER', 'mantis'); //Mantis登錄數(shù)據(jù)庫的用戶名
define('BUG_TRACK_DB_PASS', 'mantis'); //Mantis登錄數(shù)據(jù)庫的密碼
define('BUG_TRACK_HREF', "http://localhost/mantis/view.php id="); //定義查看bug號的鏈接
OK,基本上就這樣了,另外還要打開$g_interface_bugs = ‘NO’;設置為YES
4、產(chǎn)生的文檔
下面的字符串被用來在打印文檔的首頁,左邊空白就是無效。
$tlCfg->document_generator->company_name = 'Your Company';
$tlCfg->document_generator->company_copyright = '2008 (c) TestLink Community';
$tlCfg->document_generator->confidential_msg = 'GPL';
打印的文檔有自己的設計模板,你可以修改CSS模板為你自己的,
$tlCfg->document_generator->css_template = $tlCfg->theme_dir .'css/tl_documents.css';
測試用例版本可以被包含在產(chǎn)生的文檔中,帶著測試用例標題。
$tlCfg->document_generator->tc_version_enabled = FALSE;
5、發(fā)送Email
Testlink已經(jīng)整合了郵件系統(tǒng),支持發(fā)送報告和通知,你必須設置下列值:
SMTP服務器發(fā)送產(chǎn)生的Email,值‘localhost’在大多數(shù)例子里都足夠了。
$g_smtp_host = 'localhost';
管理員和發(fā)送者的Email地址也是強制性字段。
$g_tl_admin_email = 'your.name@your_company.com'; # for problem/error notification
$g_from_email = 'no_replay@testlink.test_team'; # email sender (showed to recipient)
$g_return_path_email = 'your.name@your_company.com';
你可以選擇性的設置Email的優(yōu)先級,5是默認的。
# Urgent = 1, Not Urgent = 5, Disable = 0
$g_mail_priority = 5;
你的SMTP服務器應該需要登錄來relayemali。在多數(shù)case里值是空的。
$g_smtp_username = '';
$g_smtp_password = '';
6、用戶認證
Testlink支持兩種驗證方式, ‘MD5′ – 使用存儲在內(nèi)部數(shù)據(jù)庫中的加密口令。’LDAP’ – 使用來自目錄服務器的口令。
$tlCfg->authentication['method']= 'MD5';(默認,也可設置為‘’,‘md5’,’ldap’)
使用ldap驗證的相關字段:
$tlCfg->authentication['ldap_server'] = 'localhost';
$tlCfg->authentication['ldap_port'] = '389';
$tlCfg->authentication['ldap_version'] = '3';
$tlCfg->authentication['ldap_root_dn'] = 'dc=mycompany,dc=com';
$tlCfg->authentication['ldap_organization'] = ''; // e.g.
'(organizationname=*Traffic)'
$tlCfg->authentication['ldap_uid_field'] = 'uid';
$tlCfg->authentication['ldap_bind_dn'] = '';
$tlCfg->authentication['ldap_bind_passwd'] = '';
登錄相關配置:
Testlink允許新用戶創(chuàng)建默認角色的帳號,通過在登錄頁面的“New User”的鏈接。它加速了用戶的管理步驟,管理員可以通過設置下列字段為false,來使這個特性為無效,以完全在系統(tǒng)中控制用戶。
$tlCfg->user_self_signup = TRUE;
注意:如果你改變了這個字段,你肯想要更新$TLS_valid_user_name_format字符串,它在語言文件中,來解釋你在頁面上使用的規(guī)則。
$tlCfg->validation_cfg->user_login_valid_regex='/^[\w \-]+$/';
常規(guī)表達式也被用來在有效用戶的email地址:
$tlCfg->validation_cfg->user_email_valid_regex = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/";
配置下列字段來顯示配置檢查的結果:
$tlCfg->show_config_check_warning = FALSE;
True:消息顯示在登錄和testlink桌面上
False:一個兩行的消息顯示,以文件的檢查結果的形式指示。
7、GUI 定制
7.1、樹形菜單
可能值有:’EXTJS’, ‘LAYERSMENU’,'DTREE’, ‘JTREE’,EXTJS是默認值,我們推薦它。這個組件有最好的性能,因為他使用的是異步通信。
$tlCfg->treemenu_type = 'EXTJS';
所有類型的節(jié)點(test case,test suite)被加入以排序號碼“0”,當創(chuàng)建一個樹節(jié)點時。它的最初顯示順序是根據(jù)節(jié)點ID來的。一個父test suite擁有下個默認值來分割子test suite 和test case。這些值必須是>=0.
$tlCfg->treemenu_default_testsuite_order = 1;
$tlCfg->treemenu_default_testcase_order = 100;
在樹形菜單中顯示或隱藏test case 的唯一ID:
$tlCfg->treemenu_show_testcase_id = TRUE;
允許在樹形菜單上,根據(jù)狀態(tài)計數(shù)test case。
$tlCfg->exec_cfg->enable_tree_testcase_counters = ENABLED;
7.2、GUI 布局
gui/themes/default/.——主題目錄,包含css和圖片文件。
你應該拷貝默認目錄,修改內(nèi)容和設置下列字段指向它。
$tlCfg->theme_dir = 'gui/themes/your_theme/';
你可以通過寫你自己的CSS文件來改變testlink外觀。
testlink.css (主風格定義)
tl_print.css (打印頁面的風格設置)
tl_documents.css (用于產(chǎn)生的文檔,像測試規(guī)約)
tl_treemenu.css (樹形菜單的特殊設置)
這些文件名被作為常量定義在const.inc.php文件中,你可以根據(jù)需要修改。
如果你要設計你自己的logo,那么拷貝圖片到gui/themes/default/images/目錄,
$tlCfg->company_logo = ‘company_logo.png’;
注意:這個logo將被用在所有的GUI和產(chǎn)生的文檔中。
登錄頁面可以顯示信息文本,以html格式,這個值默認是空的。
$tlCfg->login_info = 'Please, contact administrator G. B. Shaw if you have any question.';
你可以修改彈頭圖標的文件名,默認包含arrow_org.gif and slide_gripper.gif。
$tlCfg->bullet_image = 'slide_gripper.gif';
指定test project背景顏色:
$tlCfg->gui->testproject_coloring = 'background';
打開頁面,編輯test project到指定的特殊顏色,默認值是“none”(沒有背景顏色的改變是允許的)。默認背景顏色是:
$tlCfg->gui->background_color = '#9BD';
設置顯示姓名來代替只顯示login,指定一種顯示格式:
$tlCfg->username_format = '%login%';
Examples:
'%first% %last%' -> John Cook
'%last%, %first%' -> Cook, John
'%first% %last% %login%' -> John Cook [ux555]
配置默認導航框在窗口左邊的寬。
$tlCfg->frame_workarea_default_width = "30%";
Test project復選框在頂部菜單的順序是可以配置的了,值必須是SQL支持的。
$tlCfg->gui->tprojects_combo_order_by='ORDER BY nodes_hierarchy.id DESC';
Examples:
'ORDER BY name'
'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created first
管理者可以配置在主頁導航主題的配置:
$tlCfg->gui->layoutMainPageLeft = array( 'testProject' => 1,
'userAdministration' => 2 , 'requirements' => 3, 'testSpecification' => 4);
$tlCfg->gui->layoutMainPageRight = array( 'testPlan' => 1, 'testExecution' => 2 ,'testPlanContents' => 3);
配置度量的儀表盤上的圓的百分比:
$tlCfg->dashboard_precision = 2;
控制一些GUI元素的有效性,你可以使他們無效來提高頁面描述性能,
$tlCfg->gui->round_corners->exec_history = ENABLED;
$tlCfg->gui->round_corners->tc_title = ENABLED;
$tlCfg->gui->round_corners->tc_spec = ENABLED;
7.3、文本域編輯
文本數(shù)據(jù)編輯通過Javascript編輯器解決,它在文本域的工具欄,配置被下列數(shù)組定義
$tlCfg->gui->text_editor = array();
FCKeditor組件默認被使用,這是一個很有特色的組件,可以很容易的通過配置提高。
$tlCfg->gui->text_editor['all'] = array(
'type' => 'fckeditor',
'toolbar' => 'tl_default',
'configFile' => 'cfg/tl_fckeditor_config.js',
);
如果在這個結構中沒有帶搜索鍵的元素被發(fā)現(xiàn),那么這個配置將被使用。每個元素與下列配置關鍵字對應:
字段’type’ = ‘fckeditor’, ‘tinymce’ 或是’none’ -> 使用文本域輸入字段
下面這行修改用于所有地方的文本域:
$tlCfg->gui->text_editor['all'] = array( 'type' => 'none');
FCKeditor工具欄定義了在文本域菜單是否允許或是失效圖標,我們推薦研究它。
默認的testlink工具欄定義是‘tl_default’。自定義工具欄的‘tl_default’定義在/cfg/tl_fckeditor_config.js文件中。你可以向對其他配置字段一樣修改工具欄內(nèi)容,(像templates, styles, spell checker等)。
字段‘configFile’只對type = ‘fckeditor’的應用有效,例如,下面的屬性就是被這些字段定義的:
'height': FCKEditor的高
'width': FCKEditor的寬
'cols': tinymce and none的列數(shù)量
'rows': tinymce and none的行數(shù)量
提示:在做了配置修改后,清你的瀏覽器cookies和緩存
// $tlCfg->gui->text_editor['execution'] = array( 'type' => 'none'); // BETTER
Performance with a lot of testcases
//
// This configuration is useful only if default type is set to 'fckeditor'
// $tlCfg->gui->text_editor['design'] = array('toolbar' => 'tl_mini');
//
// $tlCfg->gui->text_editor['testplan'] = array( 'type' => 'none');
// $tlCfg->gui->text_editor['build'] = array( 'type' => 'fckeditor','toolbar' =>
'tl_mini');
// $tlCfg->gui->text_editor['testproject'] = array( 'type' => 'tinymce');
// $tlCfg->gui->text_editor['role'] = array( 'type' => 'tinymce');
// $tlCfg->gui->text_editor['requirement'] = array( 'type' => 'none');
// $tlCfg->gui->text_editor['requirement_spec'] = array( 'type' => 'none');
性能警告:問題是fckeditor使用iframe,并且每個iframe需要下載fckeditor文件,所以可能會有一些頁面有裝在問題。
在fckeditor中打開圖片裝載
這個指導面向FCKEditor 2.3.2,但對別的版本也是有效的。
打開FCKEditor/fckconfig.js,確定默認的php連接被選擇。
搜索:
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
打開FCKeditor/editor/filemanager/browser/default/connectors/php/config.php
安全:你必須使能‘connector’,設為true。
$Config['Enabled'] = true ;
首先在testlink的目錄下建立一個上傳目錄TestLink_upload,并確認該目的地址文件夾必須是可讀寫的而且能用網(wǎng)絡訪問的
1.修改\third_party\fckeditor\fckconfig.js文件,選擇php模式
去掉// FCKConfig.ProtectedSource.Add( /<\ [\s\S]* \ >/g ) ; // PHP style. server side code的注釋
將var _FileBrowserLanguage = ‘asp’ ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = ‘asp’ ; // asp | aspx | cfm | lasso | php
里面的asp都改為php
2.修改\third_party\fckeditor\editor\filemanager\browser\default\connectors\php\config.php
$Config['Enabled'] = false ;
改為$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/userfiles/' ;
改為$Config['UserFilesPath'] = 'TestLink_upload/' ;
$Config['UserFilesAbsolutePath'] = '' ;
改為$Config['UserFilesAbsolutePath'] = 'C:\\www\\testlink\\TestLink_upload\\' ;
3.修改\third_party\fckeditor\editor\filemanager\upload\php\config.php
$Config['Enabled'] = false ;
改為$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/userfiles/' ;
改為$Config['UserFilesPath'] = 'TestLink_upload/' ;
$Config['UserFilesAbsolutePath'] = '' ;
改為$Config['UserFilesAbsolutePath'] = 'C:\\www\\testlink\\TestLink_upload\\' ;
4. 重啟電腦等待1-2小時后,修改就生效了(很奇怪,不是重啟apache或者電腦后立馬生效的,我配置2次都是如此),實際試驗發(fā)現(xiàn)立刻可以的。
7.4、Javascript
$g_use_ext_js_library = ENABLED;
定義表格整理庫,默認值’kryogenix.org’,空‘’使這個特性失效。
$g_sort_table_engine='kryogenix.org';
7.5、使用自定義模板引擎
如果你想要使用自定義模板,我們有這些配置數(shù)組,
$g_tpl
包括,
$g_tpl['tcView']
$g_tpl['tcSearchView']
$g_tpl['tcEdit']
$g_tpl['tcNew']
$g_tpl['execSetResults']
允許你創(chuàng)建與原testlink不同名稱的模板文件,不用擔心在下次升級過程中有覆蓋源文件的危險。
注意:不是所有的testlink頁面都可以進行這種類型的配置。
標準配置:
$g_tpl['tcView'] = "tcView.tpl";
$g_tpl['tcSearchView'] = "tcSearchView.tpl";
$g_tpl['tcEdit'] = "tcEdit.tpl";
$g_tpl['tcNew'] = "tcNew.tpl";
$g_tpl['execSetResults'] = "execSetResults.tpl";
8、測試執(zhí)行設置
允許XML-RPC調(diào)用外部外部測試自動化服務器,特殊按鈕將會被顯示在執(zhí)行頁面。
ENABLED -> enable XML-RPC calls
DISABLED -> disable
$tlCfg->exec_cfg->enable_test_automation = DISABLED;
在執(zhí)行頁面的附件管理的不同設置,這些變量預定義在const.inc.php中:
$att_model_m1 -> shows upload button and title
$att_model_m2 -> hides upload button and title [DEFAULT VALUE]
$tlCfg->exec_cfg->att_model = $att_model_m2;
用戶可以刪除執(zhí)行結果:
ENABLED -> User can delete an execution result
DISABLED -> User can not. [DEFAULT VALUE]
$tlCfg->exec_cfg->can_delete_execution = DISABLED;
8.1、執(zhí)行歷史
定義執(zhí)行歷史順序:
ASC -> 上升上一次執(zhí)行在最后,
DESC ->下降最后一次執(zhí)行在頂部,默認值
$tlCfg->exec_cfg->history_order = ‘DESC’;
在執(zhí)行窗口,定義是否所選build的全部執(zhí)行歷史是被顯示:
TRUE -> the whole execution history for the build will be shown
FALSE -> just last execution will be shown [DEFAULT VALUE]
$tlCfg->exec_cfg->history_on = FALSE;
允許顯示前個build的執(zhí)行結果:
TRUE -> test case VERY LAST (i.e. in any build) execution status will be displayed
FALSE -> only last result on current build. [DEFAULT VALUE]
$tlCfg->exec_cfg->show_last_exec_any_build = FALSE;
允許顯示所有build的執(zhí)行結果歷史:
TRUE -> History for all builds will be shown
FALSE -> Only history of the current build will be shown [DEFAULT VALUE]
$tlCfg->exec_cfg->show_history_all_builds = FALSE;
8.2. 測試執(zhí)行導航
根據(jù)測試用例狀態(tài)顯示測試用例和測試用例計數(shù)的顏色:
ENABLED -> 有色的測試狀態(tài) [DEFAULT VALUE]
DISABLED -> disable
$tlCfg->exec_cfg->enable_tree_testcases_colouring = ENABLED;
$tlCfg->exec_cfg->enable_tree_counters_colouring = ENABLED;
控制當用戶點擊樹形菜單上的test suite時發(fā)生在右邊f(xié)rame上的事,Disabling這種設置能幫助避免性能問題。
ENABLED -> 顯示所有測試用例
DISABLED -> 什么都不發(fā)生,要點擊一個測試用例你需要點擊它,默認
$tlCfg->exec_cfg->show_testsuite_contents = DISABLED;
允許在舊的執(zhí)行上編輯執(zhí)行評論,注意,用戶必須有測試用例的執(zhí)行權力。
ENABLED -> user can edit execution notes, on old executions (Attention: user must have test case execution right)
DISABLED -> no edit allowed [DEFAULT VALUE]
$tlCfg->exec_cfg->edit_notes = DISABLED;
過濾測試用例,‘tester’角色的用戶能根據(jù)測試執(zhí)行分配查看。
'all' -> 所有測試用例.
'assigned_to_me' ->測試用例分配給數(shù)據(jù)用戶 [DEFAULT VALUE]
'assigned_to_me_or_free' -> 分配給數(shù)據(jù)用戶或未分配
$tlCfg->exec_cfg->view_mode->tester='assigned_to_me';
過濾測試用例,‘tester’角色的用戶能根據(jù)測試執(zhí)行分配執(zhí)行。
'all' -> all test cases.
'assigned_to_me' -> test cases assigned to the current user. [DEFAULT VALUE]
'assigned_to_me_or_free' -> test cases assigned to logged user or not assigned
$tlCfg->exec_cfg->exec_mode->tester='assigned_to_me';
用戶過濾,在測試執(zhí)行導航:
'logged_user' -> 調(diào)到當前用戶
'none' -> 默認無過濾應用[DEFAULT VALUE]
$tlCfg->exec_cfg->user_filter_default='none';
通過優(yōu)先級過濾TC,優(yōu)先級根據(jù)公式定義的權限值:
Priority = (urgency x importance)
LOW = 所有測試用例優(yōu)先級 < LOW_Threshold HIGH =所有測試用例優(yōu)先級>= HIGH_Threshold
MEDIUM =所有測試用例優(yōu)先級>= LOW_Threshold AND 優(yōu)先級 < HIGH_Threshold $tlCfg->urgencyImportance_LOW_Threshold = 3;
$tlCfg->urgencyImportance_HIGH_Threshold = 6;
8.3、在執(zhí)行頁面添加一個新的結果類型
1.需要用到的配置文件有:
cfg/const.inc.php
custom_config.inc.php <-- 創(chuàng)建它,如果它還不存在的話
locale/en_GB/custom_strings.txt <-- 創(chuàng)建它,最好不要編輯 strings.txt gui/themes/theme_m2/css/testlink.css 配置過程: 1. 打開 cfg/const.inc.php ,找到字段: $tlCfg->results['status_code']
2. 拷貝下面這幾行到 custom_config.inc.php文件:
$tlCfg->results['status_code'] = array (
"failed" => 'f',
"blocked" => 'b',
"passed" => 'p',
"not_run" => 'n',
"not_available" => 'x',
"unknown" => 'u',
"all" => 'all'
);
$tlCfg->results['status_label'] = array(
"all" => "test_status_all_status",
"not_run" => "test_status_not_run",
"passed" => "test_status_passed",
"failed" => "test_status_failed",
"blocked" => "test_status_blocked",
"not_available" => "test_status_not_available",
"unknown" => "test_status_unknown"
);
$tlCfg->results['status_label_for_exec_ui'] = array(
"passed" => "test_status_passed",
"failed" => "test_status_failed",
"blocked" => "test_status_blocked"
);
$tlCfg->results['default_status'] = "passed";
3. 加入新狀態(tài),并保存:
tcstatus_1 -> code q
tcstatus_2 -> code w
4. custom_config.inc.php 文件變?yōu)?
$tlCfg->results['status_code'] = array (
"failed" => 'f',
"blocked" => 'b',
"passed" => 'p',
"not_run" => 'n',
"not_available" => 'x',
"unknown" => 'u',
"all" => 'all',
"tcstatus_1" => 'q',
"tcstatus_2" => 'w'
);
$tlCfg->results['status_label'] = array(
"all" => "test_status_all_status",
"not_run" => "test_status_not_run",
"passed" => "test_status_passed",
"failed" => "test_status_failed",
"blocked" => "test_status_blocked",
"not_available" => "test_status_not_available",
"unknown" => "test_status_unknown",
"tcstatus_1" => "test_status_new_one",
"tcstatus_2" => "test_status_new_two"
);
$tlCfg->results['status_label_for_exec_ui'] = array(
"passed" => "test_status_passed",
"failed" => "test_status_failed",
"blocked" => "test_status_blocked",
"tcstatus_1" => "test_status_new_one",
"tcstatus_2" => "test_status_new_two"
);
$tlCfg->results['default_status'] = "blocked";
5. 修改 css 如果你想要新的顏色的話.
.tcstatus_1, div.tcstatus_1 {
color: black;
background: yellow;
}
.tcstatus_2, div.tcstatus_2 {
color: black;
background: orange;
}
div.tcstatus_1, div.tcstatus_2 {
margin: 8px;
padding: 6px;
text-align: center;
}
9、測試規(guī)約
步驟和預期結果文本域的設置:
'horizontal' - steps and expected results panes are side-by-side,水平
'vertical' - steps pane is above the expected results (default behaviour) 垂直
$g_spec_cfg->steps_results_layout = 'vertical';
在測試規(guī)約導航的測試集過濾有效性:
ENABLED -> User will see a test suite filter (default behaviour)
DISABLED -> no filter available
$g_spec_cfg->show_tsuite_filter = ENABLED;
測試規(guī)約導航的刷新:
ENABLED -> 每次用戶做了編輯操作,刷新
DISABLED -> 樹不會自動刷新,用戶手工
$g_spec_cfg->automatic_tree_refresh = ENABLED;
允許編輯一個測試用例的執(zhí)行版本。
ENABLED -> user can edit executed Test case versions
DISABLED -> editing of executed Test case versions is blocked. [DEFAULT VALUE]
$tlCfg->testcase_cfg->can_edit_executed = DISABLED;
用戶可以從測試計劃移除一個測試用例的已執(zhí)行版本(至少有一個測試結果存在):
$tlCfg->testcase_cfg->can_remove_executed = ENABLED;
測試規(guī)約模板:
對于測試用例,用戶初始需要定義的內(nèi)容是:summary,steps,預期結果。每個對象的配置包含類型和值,類型:
'none' ->模板不被使用,默認是空的編輯域,[DEFAULT VALUE]
'string' -> 值成員的值被分配給 FCK object
'string_id' -> value member is used in a lang_get() call, and return value is assigned to FCK object. 配置 string_id 在文件 custom_strings.txt
'file' -> value member is used as file name. The file is read and it's contents assigned to a text area component as input
$g_testcase_template->summary->type = 'string';
$g_testcase_template->summary->value = '
Objective: TBD
Precondition:
N/A
';
$g_testcase_template->steps->type = 'none';
$g_testcase_template->steps->value = '';
$g_testcase_template->expected_results->type = 'none';
$g_testcase_template->expected_results->value = '';
User can define the initial content of a new Test Suite description similar way:
$g_testsuite_template->details->type='file';
$g_testsuite_template->details->value='D:\w3\tl\head_20080103\logs\tsuite.txt';
10、附件
$g_attachments->enabled = TRUE; (true or false)設置是否可以上傳附件
儲存類型可以是數(shù)據(jù)庫也可以文件系統(tǒng)
TL_REPOSITORY_TYPE_DB => database
TL_REPOSITORY_TYPE_FS => filesystem
$g_repositoryType = TL_REPOSITORY_TYPE_FS;(文件系統(tǒng))
$g_repositoryPath = TL_ABS_PATH . "upload_area" . DS;(文件系統(tǒng)的存儲路徑,推薦改變路徑,增強安全性)
在存儲系統(tǒng)中可以使用壓縮,配置字段是:
TL_REPOSITORY_COMPRESSIONTYPE_NONE => no compression
TL_REPOSITORY_COMPRESSIONTYPE_GZIP => gzip compression
配置:
$g_repositoryCompressionType = TL_REPOSITORY_COMPRESSIONTYPE_NONE;
對每一個存儲文件的默認最大size是1MB.
define("TL_REPOSITORY_MAXFILESIZE_MB", 1);
也可檢查你的php設置 (通常默認為 2MBs)
用戶需要為每一個附件加標題。
// TRUE -> 上傳的文件可以沒有標題,默認為true
$g_attachments->allow_empty_title = TRUE;
此時你可以要求系統(tǒng)完成:
// 'none' -> 寫入db一個空標題
// 'use_filename' ->使用文件名作為標題
//$g_attachments->action_on_save_empty_title='use_filename';
$g_attachments->action_on_save_empty_title='none';
表示是用來作為下載時的鏈接描述的,如果標題為空,那么顯示時系統(tǒng)需要完成的操作可以有:
'show_icon' ->字段$g_attachments->access_icon 被使用.
'show_label' -> $g_attachments->access_string 的值被使用 .
$g_attachments->action_on_display_empty_title='show_icon';
$g_attachments->access_icon='';
$g_attachments->access_string="[*]";
你可以設置上傳文件的顯示順序:
$g_attachments->order_by=" ORDER BY date_added DESC ";
11、需求支持
需求功能對每一個測試產(chǎn)品水平可以是有效或無效的,作為管理員進入編輯測試產(chǎn)品頁面,TL的一個特性就是需求管理。
需求的經(jīng)典結構允許兩種層次:SRS文檔和需求列表。字段child_requirements_mgmt允許的需求的樹形組織。
ENABLED: 允許N層樹
DISABLED: 僅一層
$tlCfg->req_cfg->child_requirements_mgmt = DISABLED;
需求標識字符串(req_doc_id)必須是唯一的,
TRUE -> req_doc_id 在整個 DB (system_wide)中是唯一的
FALSE -> req_doc_id 在SRS中是唯一的
$g_req_cfg->reqdoc_id->is_system_wide = FALSE;
在創(chuàng)建了軟件需求點后(srs),你可以選擇為每個requirement創(chuàng)建test case(部件和分類也同時被創(chuàng)建)。
配置字段:$g_req_cfg
$g_req_cfg->use_req_spec_as_testsuite_name = TRUE;
(FALSE -> test cases被創(chuàng)建和分配給以$g_req_cfg->default_testsuite_name為名稱的test suite,
TRUE -> REQuirement Specification 標題 被用來作為 testsuite 的名字)
$g_req_cfg->default_testsuite_name = "Test suite created by Requirement - Auto";