lczub / TestLink-API-Python-client

A Python client to use the TestLink API
104 stars 63 forks source link

implement 1.9.17 new api - getRequirements, getReqCoverage #82

Closed lczub closed 7 years ago

lczub commented 7 years ago

TL future release 1.9.17 delivers new api

related TL Mantis Task

/**
   * Get requirements
   *
   * @param string $args["testprojectid"]
   * @param string $args["testplanid"] OPTIONAL
   * @param string $args["platformid"] OPTIONAL
   *
   * @return mixed error if someting's wrong, else array of test cases
   *
   * @access public
   */
  public function getRequirements($args)
  {
/**
   * Get requirement coverage
   *
   * Retrieve the test cases associated to a requirement
   *
   * @param struct $args
   * @param string $args["devKey"]: used to check if operation can be done.
   *                                if devKey is not valid => abort.
   *
   * @param string $args["testprojectid"]
   * @param string $args["requirementdocid"]
   *
   * @return mixed error if someting's wrong, else array of test cases
   *
   * @access public
   */
  public function getReqCoverage($args)
lczub commented 7 years ago

Unfortunately, currently it still not possible create a round trip a) collect all available requirements of a test project with getRequirements b) assign some of these requirements to test cases with assignRequirement

reason is, that getRequirements returns a list with id and reg_doc_id attributs, but not the srs_id. This req_spec_id is required as a mandatory parameter for assignRequirements.

Maybe someone with php experience can take a look into the TL Mantis change request 7914 and find a valid solution