Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001983TestLinkAPI - XMLRPCpublic2009-01-15 16:082010-05-01 20:36
Reporterhnishiyama 
Assigned Tofman 
PrioritynormalSeverityfeature requestReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.8 RC 2 
Fixed in Version1.9 Beta 2 
Summary0001983: Patch files for TestLink 1.8(RC2) XML-RPC
Description=================================
======= Release Notes ======= ver. 0.31
=================================
This is patch files for TestLink 1.8(RC2) XML-RPC.
You can see that people likes to test by automatic.
This is a thing of such people.

------------
Change files
------------
testlink/lib/api/xmlrpc.php:$Revision: 1.29 $
testlink/lib/functions/testcase.class.php:$Revision: 1.134 $

------------
Change functions
------------
testlink/lib/api/xmlrpc.php:
   reportTCResult()
    -->add @param string $args["testerlastname"] - optional
    -->add @param string $args["bugid"] - optional

   getTestCaseIDByName()
    -->add @param string $args["testprojectname"] - optional

   createTestCase()
    -->change checkTestCaseName for checkTCNameForProjectIDandSuiteID

testlink/lib/functions/testcase.class.php:
   get_by_name()
    -->add @param string [$testProje]

------------
New functions
------------
testlink/lib/api/xmlrpc.php:
   getTCResult():Get Test Case Result
   getTCSteps():Get Test Case Steps
   getTCStatistics():Get Test Case Statistics
   getTestSuitesForTestProject():Get List test suites within a test projecid
   checkTCNameForProjectIDandSuiteID():Check TestCaseName For TestProjectID and TestSuiteID


------------
Patch files
------------
testcase.class.diff
xmlrpc.diff
130xmlrpc.diff

--->Download Patch files URL
TestLinkTools::TestLinkPatch
http://sourceforge.jp/projects/testlinktools/releases/?package_id=8784 [^]
v031_testlinkPatch_18RC2.tar.gz


================================
Applications for XML-RPC Patch
================================
testlink/lib/api/sample_clients/php/getTestLinkClient.php
testlink/lib/api/sample_clients/php/clientSample3.php
GetTestLinkClient.rb
clientSample2.rb
setTCResultByTCName.rb

--->Download Applications URL
TestLinkTools::getTestLinkClient
https://sourceforge.jp/projects/testlinktools/releases?package_id=8714 [^]
v043_getTestLinkClient.tar.gz

Additional InformationDear Sir or Madam,

If you release this patch, I will be very happy.
I appreciate your great Tool of Software Test Management.
Sincerely,

http://testlinkjp.org [^]
Hiromi NishiYama
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filesgz file icon v031_testlinkPatch_18RC2.tar.gz [^] (99,885 bytes) 2009-01-15 16:08
gz file icon v051_getTestLinkClient.tar.gz [^] (34,534 bytes) 2009-01-28 10:38
lzh file icon xml_ImportFile.lzh [^] (64,064 bytes) 2009-01-28 14:21

- Relationships

-  Notes
(0005012)
fman (administrator)
2009-01-15 18:05

Thanks for your work, Il will review and try to add to nesxt release (not RC3)

Would you mind to provide also full code and not only patchs?
(0005016)
fman (administrator)
2009-01-15 23:49

few things
1. I've found complete code on zip file => forget about:
>>> Would you mind to provide also full code and not only patchs?

2. Please next you do some contribute, comment your changes, explained what is new feature.
You can see in our code that we tag changes using developer email and date in iso format.

I will give more feedback after tests
(0005018)
fman (administrator)
2009-01-16 02:25

changes to testclass method get_by_id() do not work as thinked.
You do not get a test case searching for these AND conditions:

test case name AND parent test suite name AND test project name

but

test case name AND parent test suite name AND parent of parent test suite with name

I will fix it to work as expected.
(0005019)
hnishiyama (reporter)
2009-01-16 09:42
edited on: 2009-01-16 14:21

Good morning!
It's very cold and clear today.
My time zone:+9H(Tokyo)

>I will fix it to work as expected.


        Proje1---SuiteA1---SuiteA2---CaseA1

------
Your spec. of get_by_name ?
------
testcase::get_by_name('CaseA1', 'SuiteA2', 'Proje1');
 -->can not get CaseA1.recordset

testcase::get_by_name('CaseA1', 'SuiteA1', 'Proje1');
 -->get CaseA1.recordset

------
My spec. of get_by_name
------
testcase::get_by_name('CaseA1', 'SuiteA2', 'Proje1');
 -->get CaseA1.recordset
 
testcase::get_by_name('CaseA1', 'SuiteA1', 'Proje1');
 -->get CaseA1.recordset

(0005021)
hnishiyama (reporter)
2009-01-16 10:17
edited on: 2009-01-16 14:22

>>It's very cold and clear today.
I watched Mt. Fuji of snow from the window of the train.

I take a vacation on January 19.
Sorry, I can not add notes.

(0005022)
hnishiyama (reporter)
2009-01-16 14:19
edited on: 2009-01-16 15:20

>2. Please next you do some contribute, comment your changes, explained what is new feature.

Sorry, My English is the same as Prime Minister Aso.
You can read comments of function.
And, you can see "Flow Chart of TestLinkTools, and Load Map".

https://sourceforge.jp/projects/testlinktools/docs/FlowChartOfTestLinkTools/en/FlowChartOfTestLinkTools.txt [^]

==========================
   Load Map for XML-RPC
==========================
1. assignRequirements
   getRequirementsIDByName(proj_id, ReqSpec, ReqDoc)
   assignRequirements(testcaseid, Reqid)
   unassignRequirements(testcaseid, Reqid)
2. getReqCoverageStatistics()
3. getCoverageByReqSpecDoc()


--------
[PR] "Let's climb up the stair to Everest !" (PHP,MySQL,JavaScript)
http://monte8848.site90.net/ [^]

[GoogleGadget] "Stair Climbing Everest Club Map" (JavaScript)
http://www.google.co.jp/ig/adde?hl=ja&moduleurl=monte8848.site90.net/mapplet/map_gadget_e.xml&source=imag [^]

(0005081)
hnishiyama (reporter)
2009-01-22 13:12
edited on: 2009-01-22 18:00

I tested xmlrpc.php:$Revision:1.33(RC3) on RC2.
because, RC3/newInstallStart_TL.php can not install on my XAMPP(Windows XP).

-------------------
Change functions
-------------------
1 change createTestCase()
    -->add checkTCNameForProjectIDandSuiteID()

$checkFunctions = array('authenticate','checkTestProjectID','checkTestSuiteID','checkTestCaseName'
, 'checkTCNameForProjectIDandSuiteID');

*** Run RC3 ***
createTestCase( Proje1, SuiteA1, CaseA1 );
createTestCase( Proje1, SuiteA1, CaseA1 );
createTestCase( Proje1, SuiteA1, CaseA1 );

*** Result RC3 ***
Proje1---SuiteA1---CaseA1
Proje1---SuiteA1---CaseA1
Proje1---SuiteA1---CaseA1

2 change checkTestCaseName()
     -->check null string of testcasename

        $testCaseName = $this->args[self::$testCaseNameParamName];
        if( "" == $testCaseName ) // by hnishi
        {
                $this->errors[] = new IXR_Error("9999", "Test Case Name is null string!");
                  $status=false;
        }

3 change _isBuildNamePresent()
     -->check null string of BuildName

    private function _isBuildNamePresent() // by hnishi
    {
    $status= true;
    $buidname= $this->args[self::$buildNameParamName];
    if( "" == $buidname )
    {
        $this->errors[] = new IXR_Error("9999", "Build Name is null string!");
            $status= false;
    }
    return $status;
    }

4 change checkTestCaseVersionNumber()
     -->check zero of Test Case version

      $version = $this->args[self::$versionNumberParamName]; // by hnishi
      if( 0 == $version ) // by hnishi
      {
        $this->errors[] = new IXR_Error("9999", "Test Case version is zero!");
        $status=false;
      }

----------------------------------------------------
Change comments(@param,@return) of public functions.
----------------------------------------------------
0001982: new method addTestCaseToTestPlan()
     /**
      * Add a test case version to a test plan
      *
      * @param args[self::$testProjectIDParamName]
      * @param args[self::$testPlanIDParamName]
      * @param args[self::$testCaseExternalIDParamName] <----- ["testcaseid"]!
      * @param args[self::$versionNumberParamName]
      * @param args[self::$executionOrderParamName] - OPTIONAL
      * @param args[self::$urgencyParamName] - OPTIONAL
      *
      */

/**
 * Add a test case version to a test plan
 *
 * @param array $args comments by hnishi
 * @param int $args["testprojectid"]
 * @param int $args["testplanid"]
 * @param int $args["testcaseid"]
 * @param int $args["version"]
 * @param int $args["executionorder"] - optional
 * @param int $args["urgency"] - optional
 *
 * @return array $resultInfo
 * [0][feature_id] => testplan_tcversions id
 *
 * @access public
 */
 public function addTestCaseToTestPlan($args)

 /**
  * Get list First Level test suites within a test projec
  *
  * @param array $args comments by hnishi
  * @param string $args["devKey"]
  * @param int $args["testprojectid"]
  *
  * @return array $suitesInfo
  * [elements]["id"] => test suite id
  * ["parent_id"] => parent_id
  * ["node_type_id"] => 2
  * ["node_order"] => node_order
  * ["node_table"] => 'testsuites'
  * ["name"] => suite name string
  * @access public
  */
  public function getFirstLevelTestSuitesForTestProject($args)

/**
 * Create a new test case
 *
 * @param array $args comments by hnishi
 * @param string $args["authorlogin"]
 * @param int $args["testprojectid"]
 * @param int $args["testsuiteid"]
 * @param string $args["testcasename"]
 * @param string $args["summary"]
 * @param string $args["steps"]
 * @param string $args["expectedresults"]
 *
 * @return array $resultInfo
 * ["id"] => test case id
 * ["external_id"]=> tc_external_id
 * ["status_ok"] => 1
 * ["msg"] => 'ok'
 * ["new_name"] => ''
 */
 public function createTestCase($args)
----------------------------------------------------

You must write comments(@param,@return) of public API functions.
Because only by a name, we do not understand the feature of function.

I can not understand and change class.php, because there are not comments(@param,@return) of functions with uneven indents.
If you show a beautiful cord, we can support you.

It is not difficult to write a beautiful code.
 1. Write comments(@param,@return) of all functions.
 2. All indents are Tab 8.

I hope that you impress us with a beautiful cord.

---
P.S.
>because, RC3/newInstallStart_TL.php can not install on my XAMPP(Windows XP).

I found 0002000: reportCheckingWeb threw some errors during installation.
http://testlink.org/mantis/view.php?id=2000 [^]

I will download and replace a configCheck.php...

(0005110)
hnishiyama (reporter)
2009-01-26 16:28

You can download my arts for TestLinkTools.

TestLinkTools/releases
https://sourceforge.jp/projects/testlinktools/releases/ [^]

TestLinkTools::getTestLinkClient
v051_getTestLinkClient.tar.gz (for RC3)

-------rev:0.5
2009/01/23 0.5
xmlrpc.php: ver. 0.5 Tag: hnishi
  change Revision 1.29 for 1.33(RC3)
  change createTestCase()
     *** Run RC 3 ***
     createTestCase( Proje1, SuiteA1, CaseA1 );
     createTestCase( Proje1, SuiteA1, CaseA1 );
     *** Result RC 3 ***
     Proje1---SuiteA1---CaseA1
     Proje1---SuiteA1---CaseA1
   -->add checkTCNameForProjectIDandSuiteID()
  change reportTCResult()
    -->add @param string $args["testerlastname"] - optional
    -->add @param string $args["bugid"] - optional
    -->add @return $resultInfo [bugidstatus]=> true/false
  change checkTestCaseName(), _isBuildNamePresent()
    -->check null string of testcasename, BuildName
  change checkTestCaseVersionNumber()
    -->check zero of Test Case version

-------rev:0.51
2009/01/26 0.51
xmlrpc.php: ver. 0.51 Tag: hnishi
  change checkTCNameForProjectIDandSuiteID()
    --> Check Max Test Suite Levels:10
  change getTestSuitesForTestProject()
    --> add @param int $args["suite_level"] (1to10) - optional
    --> change comments for "get List Any Level Test Suites within a Test Projec"

getTestLinkClient.php: ver. 0.41
GetTestLinkClient.rb: ver. 0.41
  change createTestCaseName()
    --> add @param int $TestSuiteLevel=1 (1to10) - optional
  change _getTSuiteId()
    --> add @param int $TestSuiteLevel=1
-------------------

I feel very disappointing that you change a name of getTestSuitesForTestProject and released it.
because I added @param $args["suite_level"] -optional to getTestSuitesForTestProject,
and added Checking of Max Test Suite Levels to checkTCNameForProjectIDandSuiteID.
(0005111)
fman (administrator)
2009-01-26 18:17

regarding your opinions about writting beautiful code.
1. I use space for tabbing and no tab char , and will not change.
2. I try to comment as much as I can, and you can see given a look to our
   code than 90% of time I comment changes made to file on file header,
   to help developers to understand what is happending.
3. Good comments IMHO are not done only by commenting parameters and return value, but also commenting what feature is supposed to do.
And may be given some method call examples, similar to examples you have adde here.

>> I feel very disappointing that you change a name of
>> getTestSuitesForTestProject and released it.
>> because I added @param $args["suite_level"] -optional to >>getTestSuitesForTestProject,
>> and added Checking of Max Test Suite Levels to
checkTCNameForProjectIDandSuiteID.

I'm sorry if you feel this way but, try to undertand something
1. I have changing name according to what the method do.
2. I will review you code and choose to add or not to stable code,
   because your code must be complaint with what we have choose as
   naming standard and other things.
   Then you must be ready to do changes to your code.
I appreciate every contribution but will not add blindly any code I get.

Again I will review your last additions and the choose to add or not it, this must be clear.


Meanwhile I have developed the assignRequirements() method that you can test.
(0005117)
fman (administrator)
2009-01-26 23:52

>>> $this->errors[] = new IXR_Error("9999", "Test Case version is zero!");
this is out of standard , because you need to create A CONSTANT FOR EVERY ERROR code, and a message that can be localized.
Please follow the standard
(0005127)
hnishiyama (reporter)
2009-01-27 10:39

>Meanwhile I have developed the assignRequirements() method that you can test.

My feature of assignRequirements function is that
because, unassignRequirementsByName( all of ReqDoc for proj_id and ReqSpec)
         unassignRequirementsByName( all of ReqDoc for proj_id )

getRequirementsIDByName(proj_id, ReqSpec="", ReqDoc="")
{
  // request is list of requirements.* for proj_id AND ReqSpec
  if( "" == ReqDoc )
  {
    1. get list of req_specs.id WHERE req_specs.testproject_id = proj_id AND req_specs.title = ReqSpec
    2. return list of requirements.* WHERE requirements.srs_id = req_specs.id
  }

  // request is list of requirements.* for proj_id
  if( "" == ReqDoc
  && "" == ReqSpec )
  {
    1. get list of req_specs_id WHERE req_specs.testproject_id = proj_id
    2. return list of requirements.* WHERE requirements.srs_id = req_specs.id
  }
}

==========================
   Load Map for XML-RPC
==========================
1. assignRequirements
   getRequirementsIDByName(proj_id, ReqSpec, ReqDoc)
   assignRequirements(testcaseid, Reqid)
   unassignRequirements(testcaseid, Reqid)

regards,
(0005128)
hnishiyama (reporter)
2009-01-27 12:12
edited on: 2009-01-27 13:20

>3. Good comments IMHO are not done only by commenting parameters and return value, but also commenting what feature is supposed to do.
 
We do not need the unnecessary comment, A thing of need is this for us.
Pleeeease write comments(only @param,@return) of public API functions!
If you write it, we can see a XML-RPC APInterface manuals by phpDocumentor.
http://localhost/testlink/lib/api/docs/phpdoc_generated/TestlinkAPI/TestlinkXMLRPCServer.html#methodcreateTestCase [^]

if you can not write it, We hope that you write XML-RPC APInterface manuals.

(0005131)
fman (administrator)
2009-01-27 15:49

I will reply via private e-mail, and ask you the same when talking about
how development is done.

Please use this to report issues.
If you contribute code, upload it here.
(0005139)
hnishiyama (reporter)
2009-01-28 10:44
edited on: 2009-01-28 15:05

I uploaded a v051_getTestLinkClient.tar.gz

I uploaded a xml_ImportFile.lzh for XMP improt file of 4th(Max.10th) Levels Test Suite.
--->Please see readme.txt.


- Issue History
Date Modified Username Field Change
2009-01-15 16:08 hnishiyama New Issue
2009-01-15 16:08 hnishiyama File Added: v031_testlinkPatch_18RC2.tar.gz
2009-01-15 18:05 fman Note Added: 0005012
2009-01-15 18:05 fman Status new => assigned
2009-01-15 18:05 fman Assigned To => fman
2009-01-15 23:49 fman Note Added: 0005016
2009-01-16 02:25 fman Note Added: 0005018
2009-01-16 09:42 hnishiyama Note Added: 0005019
2009-01-16 09:50 hnishiyama Note Added: 0005020
2009-01-16 10:17 hnishiyama Note Added: 0005021
2009-01-16 14:19 hnishiyama Note Added: 0005022
2009-01-16 14:21 hnishiyama Note Edited: 0005019
2009-01-16 14:22 hnishiyama Note Deleted: 0005020
2009-01-16 14:22 hnishiyama Note Edited: 0005021
2009-01-16 14:27 hnishiyama Note Edited: 0005022
2009-01-16 14:28 hnishiyama Note Edited: 0005022
2009-01-16 14:40 hnishiyama Note Edited: 0005022
2009-01-16 14:49 hnishiyama Note Edited: 0005022
2009-01-16 15:02 hnishiyama Note Edited: 0005022
2009-01-16 15:20 hnishiyama Note Edited: 0005022
2009-01-22 13:12 hnishiyama Note Added: 0005081
2009-01-22 18:00 hnishiyama Note Edited: 0005081
2009-01-26 16:28 hnishiyama Note Added: 0005110
2009-01-26 18:17 fman Note Added: 0005111
2009-01-26 23:52 fman Note Added: 0005117
2009-01-27 10:39 hnishiyama Note Added: 0005127
2009-01-27 12:12 hnishiyama Note Added: 0005128
2009-01-27 13:20 hnishiyama Note Edited: 0005128
2009-01-27 15:49 fman Note Added: 0005131
2009-01-28 10:38 hnishiyama File Added: v051_getTestLinkClient.tar.gz
2009-01-28 10:44 hnishiyama Note Added: 0005139
2009-01-28 14:21 hnishiyama File Added: xml_ImportFile.lzh
2009-01-28 14:39 hnishiyama Note Edited: 0005139
2009-01-28 15:05 hnishiyama Note Edited: 0005139
2009-04-29 15:09 fman Status assigned => resolved
2009-04-29 15:09 fman Fixed in Version => 1.9 (DEV)
2009-04-29 15:09 fman Resolution open => fixed
2010-05-01 20:36 fman Status resolved => closed
2013-04-25 17:30 fman Category TL API => XMLRPC API
2013-04-25 17:30 fman Category XMLRPC API => API - XMLRPC



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker