• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • testlink-plugin
    • None

      I'm using Selenium with Java-Api V1.9.6-1 for automated testing. Used Testlink-Version is 1.9.7.

      In the custom_config.inc.php file we changed $tlCfg->results in the following way:

      $tlCfg->results['status_code'] = array (
      "failed_h" => 'h',
      "failed_m" => 'm',
      "failed_l" => 'l',
      "blocked" => 'b',
      "passed" => 'p',
      "not_run" => 'n',
      "not_available" => 'x',
      "unknown" => 'u',
      "all" => 'a'
      );

      Now I am not able to write failed testcase results via api to the database, because of the enumeration object used for the execution that only allows FAILED for the result. Is there any way to write the custom result status via api to the testlink-database?

      So after modifying
      testlink/lib/api/xmlrpc/v1

      **

      • An array containing strings for valid statuses
      • Will be initialized using user configuration via config_get()
        */
        public $statusCode;
        public $codeStatus;

      /**

      • Constructor sets up the IXR_Server and db connection
        */
        public function __construct($callbacks = array())
        {
        $this->dbObj = new database(DB_TYPE);
        $this->dbObj->db->SetFetchMode(ADODB_FETCH_ASSOC);
        $this->_connectToDB();

      $this->tcaseMgr=new testcase($this->dbObj);
      $this->tprojectMgr=new testproject($this->dbObj);
      $this->tplanMgr = new testplan($this->dbObj);
      $this->tplanMetricsMgr = new tlTestPlanMetrics($this->dbObj);

      $this->reqSpecMgr=new requirement_spec_mgr($this->dbObj);
      $this->reqMgr=new requirement_mgr($this->dbObj);

      $this->tables = $this->tcaseMgr->getDBTables();

      $resultsCfg = config_get('results');
      foreach($resultsCfg['status_label_for_exec_ui'] as $key => $label )

      { $this->statusCode[$key]=$resultsCfg['status_code'][$key]; }

      if( isset($this->statusCode['not_run']) )

      { unset($this->statusCode['not_run']); }

      $this->codeStatus=array_flip($this->statusCode);

      $this->initMethodYellowPages();
      $this->methods += $callbacks;

      $this->IXR_Server($this->methods);
      }

      You will then need to have a mean to define custom result status from the plugin, e.g. only execute "failed_h" => 'h', "failed_m" => 'm', "failed_l" => 'l' test cases execution status while also able to write back these custom results

          [JENKINS-19369] Testlink "test error" results not selectable

          Andrew Sim created issue -
          Andrew Sim made changes -
          Description Original: Testlink have a new result that is not available as type of cases and saving results New: I'm using Selenium with Java-Api V1.9.6-1 for automated testing. Used Testlink-Version is 1.9.7.

          In the custom_config.inc.php file we changed $tlCfg->results in the following way:

          $tlCfg->results['status_code'] = array (
           "failed_h" => 'h',
           "failed_m" => 'm',
           "failed_l" => 'l',
           "blocked" => 'b',
           "passed" => 'p',
           "not_run" => 'n',
           "not_available" => 'x',
           "unknown" => 'u',
           "all" => 'a'
           );

           Now I am not able to write failed testcase results via api to the database, because of the enumeration object used for the execution that only allows FAILED for the result. Is there any way to write the custom result status via api to the testlink-database?


          So after modifying
          testlink/lib/api/xmlrpc/v1


          **
           * An array containing strings for valid statuses
           * Will be initialized using user configuration via config_get()
           */
           public $statusCode;
           public $codeStatus;
           

           /**
           * Constructor sets up the IXR_Server and db connection
           */
           public function __construct($callbacks = array())
           {
           $this->dbObj = new database(DB_TYPE);
           $this->dbObj->db->SetFetchMode(ADODB_FETCH_ASSOC);
           $this->_connectToDB();

           $this->tcaseMgr=new testcase($this->dbObj);
           $this->tprojectMgr=new testproject($this->dbObj);
           $this->tplanMgr = new testplan($this->dbObj);
           $this->tplanMetricsMgr = new tlTestPlanMetrics($this->dbObj);

           $this->reqSpecMgr=new requirement_spec_mgr($this->dbObj);
           $this->reqMgr=new requirement_mgr($this->dbObj);

           $this->tables = $this->tcaseMgr->getDBTables();


           $resultsCfg = config_get('results');
           foreach($resultsCfg['status_label_for_exec_ui'] as $key => $label )
           {
           $this->statusCode[$key]=$resultsCfg['status_code'][$key];
           }
           
           if( isset($this->statusCode['not_run']) )
           {
           unset($this->statusCode['not_run']);
           }
           $this->codeStatus=array_flip($this->statusCode);

           $this->initMethodYellowPages();
           $this->methods += $callbacks;

           $this->IXR_Server($this->methods);
           }

          You will then need to have a mean to define custom result status from the plugin, e.g. only execute "failed_h" => 'h', "failed_m" => 'm', "failed_l" => 'l' test cases execution status while also able to write back these custom results
          Bruno P. Kinoshita made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]

          Hi Andrew!

          Thanks for reporting the issue! See comments below :o)

          > I'm using Selenium with Java-Api V1.9.6-1 for automated testing. Used Testlink-Version is 1.9.7.

          >So after modifying
          >testlink/lib/api/xmlrpc/v1

          This issue must be first addressed in TestLink XML-RPC API.

          >You will then need to have a mean to define custom result status from the plugin, e.g. only execute "failed_h" => 'h', "failed_m" => 'm', "failed_l" => 'l' test cases execution status while also able to write back these custom results

          Sure thing. It will be a great new feature to be added to the plug-in.

          I'm stopping the work on this issue until someone take care to fill in issues in TestLink, and those issues get fixed there. Then I can either merge a pull request or work on this feature in a future development cycle.

          Thanks
          Bruno

          Bruno P. Kinoshita added a comment - Hi Andrew! Thanks for reporting the issue! See comments below :o) > I'm using Selenium with Java-Api V1.9.6-1 for automated testing. Used Testlink-Version is 1.9.7. >So after modifying >testlink/lib/api/xmlrpc/v1 This issue must be first addressed in TestLink XML-RPC API. >You will then need to have a mean to define custom result status from the plugin, e.g. only execute "failed_h" => 'h', "failed_m" => 'm', "failed_l" => 'l' test cases execution status while also able to write back these custom results Sure thing. It will be a great new feature to be added to the plug-in. I'm stopping the work on this issue until someone take care to fill in issues in TestLink, and those issues get fixed there. Then I can either merge a pull request or work on this feature in a future development cycle. Thanks Bruno

          Postponed due to the need to implement new feature in TestLink.

          Bruno P. Kinoshita added a comment - Postponed due to the need to implement new feature in TestLink.
          Bruno P. Kinoshita made changes -
          Resolution New: Postponed [ 6 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Andrew Sim added a comment -

          Sure i agreed this is a testlink internal api issue, i 've open an issue in testlink Mantis tracker regarding the custom results via api issue, i also notice it also affecting testlink internal test report via its direct URL link using api also.

          Andrew Sim added a comment - Sure i agreed this is a testlink internal api issue, i 've open an issue in testlink Mantis tracker regarding the custom results via api issue, i also notice it also affecting testlink internal test report via its direct URL link using api also.

          >i also notice it also affecting testlink internal test report via its direct URL link using api also.

          Nice catch. Let's work on this later when the issue is resolved in TestLink.

          Thanks Andrew

          Bruno P. Kinoshita added a comment - >i also notice it also affecting testlink internal test report via its direct URL link using api also. Nice catch. Let's work on this later when the issue is resolved in TestLink. Thanks Andrew
          Bruno P. Kinoshita made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

          Andrew Sim added a comment -

          $tlCfg->results['status_label_for_exec_ui'] = array (
          "my_status" => 'x'
          );

          I 've tried to configure custom "status" via testlink, so via testlink api "getLastExecutionResult" will return the custom status and write back to testlink via "reportTCResult" with the custom "status"

          So in Jenkins , there must be a way user can key in the keyword for the custom "status" for jenkins to retrieve this status from testlink or update the result with this status as well

          Andrew Sim added a comment - $tlCfg->results ['status_label_for_exec_ui'] = array ( "my_status" => 'x' ); I 've tried to configure custom "status" via testlink, so via testlink api "getLastExecutionResult" will return the custom status and write back to testlink via "reportTCResult" with the custom "status" So in Jenkins , there must be a way user can key in the keyword for the custom "status" for jenkins to retrieve this status from testlink or update the result with this status as well

            kinow Bruno P. Kinoshita
            redpiyo2003 Andrew Sim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: