低调

发布新日志

  • 电影重整旗鼓中的一段经典

    2010-07-09 08:46:01

    A writer, like a boxer must stand alone. Having your words published , like entering a ring puts your talent on display. And there's nowhere to hide. I never intended to write a story about myself  or my son. Or about love. Or the lies that can sometimes come from love. We live in the fear. I will tell you this about the man I called Champ, whom everybody called Champ. He was, against all reason , my friend. And he was also a liar. But was that because he was trying to make himself  better than who he was? Or was it because the one force more powerful than a son wanting the admiration of his father, is the father wanting the admiration of his son? Some times we need the help of our imagination to achieve that status. For it is no easy task being the strongest, wisest, most beloved man in all the land than that moment when our children dicover that we are not the illusory supermen we've created.  But rather, as Herman Melville once wrote, "men drained of  valor"?  The lies that come from love can devastate as much as those that come from malice.  Champ's legacy, I suppose is the inspiration for truth. And the beauty that can emerge from it.

    A beauty that lets our children admire us unconditionally. Love us unconditionally. As I love my son , mucho grande.

  • 如何看测试方面的书籍

    2010-07-07 13:10:13

    以前看书的时候,只是从头到尾看一遍,完了,倒是记住不少东西,但是去用的时候,能想起来用到的少之又少...
     
    某一天,想起来毛主席看二十四史,读书笔记做的很细致,突然发现这才是会读书,读到自己脑子里去了...
     
    又想起以前学习马哲,毛概,方法论真的很重要,没有方法来指导实践,真的是很浪费时间,当然,读书的时候也是一样...
     
    想到了这些之后,发现如果不仅仅是走马观花,而是能够深刻的理解,结合实际的工作,思考这些知识如何能用到实际工作中,又或许这些知识不能仅仅是看,而应该实践中去理解,慢慢形成做读书笔记的习惯,真的是事半功倍...
     
    想起来以前上高中的时候,看到《读者》中的一篇文章说,儿子一般在小的时候盲目的相信父亲的话,到了初中高中有点半信半疑父亲的话,到了大学完全不相信父亲的话,到了工作的时候又开始半信半疑父亲的话,到了中年有开始笃信父亲的话...
     
    真的是这样,以前看到这些教我们看书方法什么的文章不屑一顾,直到用的时候才知道真的是真理...
  • [论坛] 关于如何分析需求

    2010-07-07 12:58:21

    看到此版块很多想知道如何分析需求的,小弟不才,提点建议:
    1.不知道要做这部分工作的同仁,你们是否都看了软件工程,其中的第三章讲的就是需求分析,没看的同仁请先看看这部分吧,至于其他部分等需要时再看也不迟。
    2.要进行需求分析,首先要明白一个合格的需求需要满足哪些条件,比如:完整性,准确性,一致性,可行性,无二义性,原子性(也就是不可分割性),可测试性,健壮性等等,如果这个都不了解的话,试问就算了让你参加需求分析了,你又能提出什么有用的建议呢?
    3.需求建模...不细说了,大家自己看软件工程吧

    其实我写这篇文章是告诉大家,这些资料论坛上都有,甚至还有直接关于需求分析的,而大家只是在这里发个帖子问,如何进行需求分析?仅仅期待有人出来直接把答案告诉你,甚至于联系你自己的实际情况告诉你该怎么做,试问要你有什么用?问问题的连这方面的资料都不找一找,最起码要知道定义是什么吧,不然如何讨论?

    可能说的有些废话,愿意看的就看看,不原因看的就轻点拍,只是希望大家都能有自主学习,自己思考,自己总结,然后有所提升的测试人...
  • 测试工作之功能说明书设计

    2010-07-02 09:58:52

    近期正在写功能说明书,看到原来的编写方法遗漏很多细节,于是自己思考之后,决定如下:
     
    三大要素:功能点,界面,工作流
     
    如图所示,可能看到多的功能点的时候,有时候会觉得很乱,不知道该怎么写才好。
    后来想到,何不按照界面分为不同的功能模块,然后不同的功能模块可以再分为不同的等级,最后细化到一个按钮。
     
    不同之处,以前写的时候直接拿一块大的功能模块来写,无法对应最小的功能。
    现在将一个按钮就作为一个功能点
    然后写这个功能点的输入,输出,异常处理,适用范围,和其他功能点的联系.
     
    这样一来,不会出现遗漏,并且可以做到点对点的要求,编写测试用例的时候,每条用例都对应一个点.
  • 测试工作之需求部分

    2010-07-02 09:55:01

    1.需求分析
    由于70%缺陷都是需求阶段引入的,因此早期工作必须做好:
    a.根据软件工程要求的需求几大要素判断
    b.统一项目成员对需求的理解的一致性

     
    2.需求管理
    a.收录经过分析通过的需求
    b.找到可以覆盖需求的用例,对应之
    c.覆盖是否完全
    d.形成需求跟踪矩阵,并且列出可以证明需求被覆盖的测试记录或报告
    e.控制需求来源,如果决定要做的需求,先经过步骤1
     
    3.需求管理工具
    不能否认一个好的工具可以起到事半功倍的作用,准备自己在mantis上创建一个新的界面来做需求管理.
  • 测试学习的误区

    2010-06-28 14:14:59

    不知何时,突然发现自己在工作上如此追求完美,近乎有点强迫自己了...
     
    也不清楚自己是如何养成的习惯,做事情之前,学东西之前,总是无法马上动手,必须得经过很长时间的思想准备,到底怎么样学习才能不至于遗漏一些东西,怎么样才能把这个东西一下学得让他人五体投地,怎么样才能尽量规范,而不至于以后无据可查...
     
    最近,这种情况有点升级了,有点受不了自己了。
     
    今天由于要写一个自动化测试的小东西,写之前搜了一大堆自动化测试框架的文章,包括国内国外的论坛,最后知道了关于自动化测试的框架选择,以及合适采用自动化,什么样的选择才是性价比最高的选择,两个小时过去了,发现自己跑题了...
     
    后来发现,这个小东西只不过需要个数据驱动,顺便封装下,就OK了...
     
    学习东西真的不能一味的考虑如何能把原理学到手,关键还要看是否符合实际工作需要,就像巧妇难为无米之炊...
  • [论坛] [我和51Testing]论坛内外

    2010-04-27 13:55:37

          好久没发过帖子了,曾经也是某论坛的BZ,先祝福下51的生日吧,seng yier cu ka ha mi da!

          国内的测试很年轻,很朝气蓬勃,同时也很浮躁,很急功近利。
          
          当然,自己也是从什么也不会,走到会一点点,再到发现自己不会的太多了,最后到现在的开始钻研一个方面,在这个过程中,51扮演的是一个始终给我动力的角色。
       
          相信对于很大一部分人来说,刚刚进入测试行业,都会有所失望,有所迷惑,也有一丁点的希望。
          失望的是,测试在新人看来就是简单的点点鼠标,碰碰键盘,每日重复这种无聊的行为,偶尔来个贼不讨人喜欢的文档,所有的一切都看起来好无趣。
          迷惑的是,测试是一种很模糊的行为,没有人来告诉测试人员什么东西改怎么做,怎么做是对,怎么做是错,所有的东西都要靠自己,很多人工作一年多了,还不知道黑盒测试是什么。
          希望,有希望终归是美好的,看了很多技术方面的牛人之后,才知道原来做测试也是可以这么有话语权。
          
          在摸索的过程中,偶然发现了有一个51testing的地方,到这里之后才发现,原来有这么多和我一样在摸索的朋友,这一刻,我不再孤单,这种感觉就像一个人一直在怀疑自己是否是一个正常的人,突然发现有很多人都和我一样,于是开始大步往前走,原来生活是美好的。
          
          在学习的过程中,我渐渐的发现很多理论在实际工作中很不适用,这时候才开始知道原来生搬技术是不行的,得考虑实际情况,于是从那个时候起,学习不再是空洞的理论学习,开始考虑哪种技术可以应用在实际的工作中,如何应用,和项目成员开会时也开始有自己的想法,这种想法也被大家渐渐的认可。

          学习了一段时间,我在某一天突然意识到,前面学的东西很多都给忘记了,包括以前的成功和失败的经验,于是我开始总结,消化成功的经验,消化失败的教训,这种方法也逐渐的被领导赞赏。

          时光荏苒,自己学习的动力被消耗的所剩无几,思考,询问,知道自己一直没有一个明确的目标,职业生涯要如何发展,居然自己都没考虑过,真是该打。于是我开始寻找自己的定位,然而就在两个月后,居然无厘头的达到了我的目标,生活真的是很会调戏人,于是继续寻找自己的目标,继续自己的职业生涯。


          在我的职业成长过程中,51Testing的很多文章都给了我很大的帮助,就像是我和我理想中的测试世界的一个中介,而且是一个不需要交中介费的中介。衷心的感谢51Testing给我的帮助,测试的世界因为有51Testing,更精彩!


  • Mantis在IE7下的多条件筛选功能的支持

    2009-03-26 11:21:52

     

    此解决方法来自mantis官方,有兴趣的朋友可以去查看原帖子 http://www.mantisbt.org/bugs/view.php?id=7557

    将压缩包中的dynamic_filters.js文件解压到mantis\javascript文件夹下,问题即可解决。
  • 在Mantis中的bug页面添加安全评审按钮的方法

    2009-03-11 10:05:08

    1.bug_view_page.php界面中添加安全问题评审按钮,也就是在html_api中增加safety部分,添加代码:

    function html_button_bug_safety( $p_bug_id ) {

                  if ( access_has_bug_level( config_get( 'safety_bug_threshold' ), $p_bug_id ) ) {

                         html_button( string_get_bug_safety_page(),

                                               lang_get( 'safety_bug_button' ),

                                               array( 'bug_id' => $p_bug_id ) );

                  }

           }

    2.config_ini中设置safety_bug_threshold权限为safetymanager,也就是说只有安全风险管理员才有权利查看和更改safety相关字段。

    3.接着,在string.api中添加string_get_bug_safety_page函数,而字符串safety_bug_button需要在lang_chinese_simplified中添加,函数代码:

    function string_get_bug_safety_page( $p_user_id = null ) {

                  return string_get_bug_page ( 'safety', $p_user_id );

           }

    4.这个添加完毕之后,函数string_get_bug_page会要求两个参数,show_safetybug_safety_advanced_page

    5.Show_safety需要在config_ini中添加,bug_safety_advanced_page需要添加,而代码则可以从bug_update_advanced_page中得到想法,删除掉update界面的其它代码,只保留自定义字段的部分,而其中<!-- Custom Fields -->

    <?php

           $t_custom_fields_found = false;

           $t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );

           foreach( $t_related_custom_field_ids as $t_id ) {

                  $t_def = custom_field_get_definition( $t_id );

                  if( (  $t_def['display_safety'] && !$t_def['advanced']  ) && custom_field_has_write_access( $t_id, $f_bug_id ) ) {

                         $t_custom_fields_found = true;

    ?>

    6.需要更改display_safety部分,这个字段由于没有添加到数据库,需要在数据库中添加此字段,方法是使用phpmyadmin打开mantis数据库,找到manage_custom_field_table,添加display_safety字段,类型和默认值以及长度都和display_update一致即可。

    而使用到advanced_page的时候需要用到advanced_safety字段,数据库中依然没有,因此需要在mantis_user_pref_table中添加advanced_safety字段,类型默认值等等和advanced_safety一致。

    7.html_api中找到 html_buttons_view_bug_page函数,在其中添加:

    echo '<td class="center">';

    html_button_bug_safety( $p_bug_id );

    echo '</td>';

    此代码为了让safety_button显示在bug中。

    8.至此,添加按钮以及新的界面完成,接下来,需要做自定义字段的代码。

    首先,在manage_custom_field_edit_page.php中添加

                  <tr <?php echo helper_alternate_class() ?>>

                         <td class="category">

                                <?php echo lang_get( 'custom_field_display_safety' ) ?>

                         </td>

    <td>

                                <input type="checkbox" name="display_safety" value="1" <?php check_checked( $t_definition['display_safety'] ) ?> />

                         </td>

                  </tr>

    然后在custom_field_api.php中添加

    $c_display_safety      = db_prepare_bool(         $p_def_array['display_safety'] );

    if( array_key_exists( 'release_note', $p_def_array ) ) {

                         if ( !$t_update_something ) {

                                $t_update_something = true;

                         } else {

                                $query .= ', ';

                         }

                         $query .= " display_safety ='$c_ display_safety '";

                  }

    最后在manage_custom_field_update.php中添加

    $t_values['display_safety ']            = gpc_get_bool( ' display_safety ' );

    9.代码添加完毕之后,需要在自定义字段中添加感兴趣的字段,选中其中的:在创建问题时显示,在更新问题时显示,在设置完全问题时显示。如果前两个不选择的话,会出现写入数据库错误的情况,至此,安全问题评审按钮的添加工作结束。

  • php去bom方法

    2008-06-17 13:53:08

    <?php

    //remove the utf-8 boms
    //by magicbug at gmail dot com

    if (isset($_GET['dir'])){ //config the basedir
    $basedir=$_GET['dir'];
    }else{
    $basedir = '.';
    }

    $auto = 1;

    checkdir($basedir);

    function checkdir($basedir){
    if ($dh = opendir($basedir)) {
    while (($file = readdir($dh)) !== false) {
    if ($file != '.' && $file != '..'){
    if (!is_dir($basedir."/".$file)) {
    echo "filename: $basedir/$file ".checkBOM("$basedir/$file")."
    ";
    }else{
    $dirname = $basedir."/".$file;
    checkdir($dirname);
    }
    }
    }
    closedir($dh);
    }
    }

    function checkBOM ($filename) {
    global $auto;
    $contents = file_get_contents($filename);
    $charset[1] = substr($contents, 0, 1);
    $charset[2] = substr($contents, 1, 1);
    $charset[3] = substr($contents, 2, 1);
    if (ord($charset[1]) == 239 && ord($charset[2]) == 187 && ord($charset[3]) == 191) {
    if ($auto == 1) {
    $rest = substr($contents, 3);
    rewrite ($filename, $rest);
    return ("BOM found, automatically removed.");
    } else {
    return ("BOM found.");
    }
    }
    else return ("BOM Not Found.");
    }

    function rewrite ($filename, $data) {
    $filenum = fopen($filename, "w");
    flock($filenum, LOCK_EX);
    fwrite($filenum, $data);
    fclose($filenum);
    }
    ?>

    将其保存在网站根目录下,后缀为.php,然后运行即可去除bom

  • 解决testlink中testsuite和testproject关联测试需求的方法

    2008-03-27 15:50:15

    首先,找到testlink\lib\req\reqTcAssign.php,下面是原代码

    // redirect if a user doesn't choose test case
    if ($edit == 'testproject' || $edit == 'testsuite')
    {
      redirect($_SESSION['basehref'] . "/lib/general/show_help.php?help=assignReqs&locale={$_SESSION['locale']}");
     exit();
    }
    else if($edit == 'testcase')
    {
     //get list of ReqSpec (not_empty)
     $get_not_empty=1;
     $arrReqSpec = getOptionReqSpec($db,$tproject_id,$get_not_empty);

      $SRS_qty=count($arrReqSpec);
     
      if( $SRS_qty > 0 )
      {
       $tc_mgr = new testcase($db);
       $arrTc = $tc_mgr->get_by_id($tc_id);
       if ($arrTc)
       {
        $tcTitle = $arrTc[0]['name'];
       
        //get first ReqSpec if not defined
        if (!$idReqSpec && $SRS_qty > 0)
        {
         reset($arrReqSpec);
         $idReqSpec = key($arrReqSpec);
         tLog('Set first SRS ID: ' . $idReqSpec);
        }
        
        if ($idReqSpec)
        {
         $arrAssignedReq = getRequirements($db,$idReqSpec, 'assigned', $tc_id);
         $arrAllReq = getRequirements($db,$idReqSpec);
         $arrUnassignedReq = array_diff_byId($arrAllReq, $arrAssignedReq);
        }
       }
      }  // if( $SRS_qty > 0 ) 
    }
    else
    {
     tlog("Wrong GET/POST arguments.", 'ERROR');
     exit();
    }

     

    将这段代码修改如下,即可使testsuite和testproject关联需求

    $tsuite_id = isset($_GET['id']) ? intval($_GET['id']) : null;
    #----testcase--------

    if($edit == 'testcase')
    {
     //get list of ReqSpec (not_empty)
     $get_not_empty=1;
     $arrReqSpec = getOptionReqSpec($db,$tproject_id,$get_not_empty);

      $SRS_qty=count($arrReqSpec);
     
      if( $SRS_qty > 0 )
      {
       $tc_mgr = new testcase($db);
       $arrTc = $tc_mgr->get_by_id($tc_id);
       if ($arrTc)
       {
        $tcTitle = $arrTc[0]['name'];
       
        //get first ReqSpec if not defined
        if (!$idReqSpec && $SRS_qty > 0)
        {
         reset($arrReqSpec);
         $idReqSpec = key($arrReqSpec);
         tLog('Set first SRS ID: ' . $idReqSpec);
        }
        
        if ($idReqSpec)
        {
         $arrAssignedReq = getRequirements($db,$idReqSpec, 'assigned', $tc_id);
         $arrAllReq = getRequirements($db,$idReqSpec);
         $arrUnassignedReq = array_diff_byId($arrAllReq, $arrAssignedReq);
        }
       }
      }  // if( $SRS_qty > 0 ) 
    }

    #-------testproject------------
    else if($edit == 'testproject' )
    {
     //get list of ReqSpec (not_empty)
     $get_not_empty=1;
     $arrReqSpec = getOptionReqSpec($db,$tproject_id,$get_not_empty);

      $SRS_qty=count($arrReqSpec);
     
      if( $SRS_qty > 0 )
      {
       $tproject_mgr = new testproject($db);
       $arrTproject = $tproject_mgr->get_by_id($tproject_id);
       if ($arrTproject)
       {
        $tprojectTitle = $arrTproject[0]['name'];
       
        //get first ReqSpec if not defined
        if (!$idReqSpec && $SRS_qty > 0)
        {
         reset($arrReqSpec);
         $idReqSpec = key($arrReqSpec);
         tLog('Set first SRS ID: ' . $idReqSpec);
        }
        
        if ($idReqSpec)
        {
         $arrAssignedReq = getRequirements($db,$idReqSpec, 'assigned', $tproject_id);
         $arrAllReq = getRequirements($db,$idReqSpec);
         $arrUnassignedReq = array_diff_byId($arrAllReq, $arrAssignedReq);
        }
       }
      }  // if( $SRS_qty > 0 ) 
    }
    #-----testsuite-------------------

    else if($edit == 'testsuite')
    {
     //get list of ReqSpec (not_empty)
     $get_not_empty=1;
     $arrReqSpec = getOptionReqSpec($db,$tproject_id,$get_not_empty);

      $SRS_qty=count($arrReqSpec);
     
      if( $SRS_qty > 0 )
      {
       $tsuite_mgr = new testsuite($db);
       $arrTsuite = $tsuite_mgr->get_by_id($tsuite_id);
       if ($arrTsuite)
       {
        $tsuiteTitle = $arrTsuite[0]['name'];
       
        //get first ReqSpec if not defined
        if (!$idReqSpec && $SRS_qty > 0)
        {
         reset($arrReqSpec);
         $idReqSpec = key($arrReqSpec);
         tLog('Set first SRS ID: ' . $idReqSpec);
        }
        
        if ($idReqSpec)
        {
         $arrAssignedReq = getRequirements($db,$idReqSpec, 'assigned', $tsuite_id);
         $arrAllReq = getRequirements($db,$idReqSpec);
         $arrUnassignedReq = array_diff_byId($arrAllReq, $arrAssignedReq);
        }
       }
      }  // if( $SRS_qty > 0 ) 
    }

    else
    {
     tlog("Wrong GET/POST arguments.", 'ERROR');
     exit();
    }

  • 如何在mantis的查看问题列表中自定义添加一项

    2008-03-06 10:02:54

    解决方法:

    进入mantis,依次选择 管理->配置管理->configuration_report

    到页面的最下方,帐号选择all users,项目名称选择你希望设置生效的项目,configuration option写view_issues_page_columns,类型默认就好,值设为array ( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment', 'category', 'severity', 'status', 'last_updated', 'summary' );这里的项可以自己添加,但是得保证和配置文件中的名字一致,要不内容不会自动添进去.

  • 如何让mantis的测试人员具有删除自己问题和附件的权限

    2008-03-06 08:48:27

    在config_defults_inc.php中
    # allow users to delete attachments uploaded by themselves even if their access
    # level is below delete_attachments_threshold.
    $g_allow_delete_own_attachments = ON;
       
    # --- reporter can close ----------
    # Allow reporters to close the bugs they reported, after they're marked resolved.
    $g_allow_reporter_close        = ON;

    这两项都改成ON之后,报告人员可以有删除自己问题的权限,并且有删除自己附件的权限.

  • 如何将mantis中报告问题的项改为必填项

    2008-03-06 08:40:03

    1.打开Apache>htdocs>mantis>core>bug_api.php
    # Additional info cannot be blank
           if ( is_blank( $c_additional_info ) ) {
               error_parameters( lang_get( 'additional info' ) );
               trigger_error( ERROR_EMPTY_FIELD, ERROR );
           }
    当然,得看变量名字是什么,就改成什么

    2.打开Apache>htdocs>mantis>bug_report_advanced_page.php
    找到addtional information部分
    在<td class="category">下面加上
    <span class="required">*</span>

    完成,第一步是改成必填项,第二步是加上"*"号.

Open Toolbar