Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006108TestLinkAPI - XMLRPCpublic2013-12-18 21:272013-12-25 15:31
Reporterlczub 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.9 (2013 Q4 - bug fixing) 
Fixed in Version1.9.10 (2014 Q1 - bug fixing) 
Summary0006108: createTestCaseSteps creates steps without test case references
Descriptioncalling xml-rpc api method createTestCaseSteps with
- a valid testcaseexternalid or testcaseid
- but without any version information
creates new step records without a reference to the expected test case.

it seams, that following 1.9.9 comments for createTestCaseSteps is not correct
* @param string $args["version"]
* - optional if not provided LAST ACTIVE version will be used
* if all versions are INACTIVE, then latest version will be used.

Problem is reproducible with TL-1.9.9 and latest code from gitorious
Steps To Reproduce1. create project 'P-A' with test suite 'TS-A' and test case 'TC-A', including
   one step
   [{'step_number' : 1, 'actions' : "Step action 1" ,
     'expected_results' : "Step result 1", 'execution_type' : AUTOMATED}])
   
2. call xml-rpc api method createTestCaseSteps with
   - action = 'create'
   - testcaseexternalid = full_tc_external_id of test case 'TC-A'
   - no version information
   - steps = [{'step_number' : 1, 'actions' : "Step action 1" ,
          'expected_results' : "TC-Ex-ID result 1 createTestCaseSteps.create",
          'execution_type' : AUTOMATED},
         {'step_number' : 2, 'actions' : "Step action 2" ,
          'expected_results' : "TC-Ex-ID result 2 createTestCaseSteps.create",
          'execution_type' : AUTOMATED}
          
   response includes no error, but information, that 2 new step records has been created referencing the test case id ''
   example:
     {'tcversion_id': '', 'feedback': [{'step_number': 1, 'operation': 'create'}, {'step_number': 2, 'operation': 'create'}], 'stepSet': [], 'stepNumberIDSet': [], 'testcaseid': '4601', 'item': '', 'version': 'DOES NOT exists'}
   expectation was: step 1 = "skip", step 2 = "create"
   example:
     {'tcversion_id': '4582', 'feedback': [{'step_number': 1, 'operation': 'skip'}, {'step_number': 2, 'operation': 'create'}], 'stepSet': {'1': {'step_number': '1', 'actions': 'Step action 1', 'execution_type': '2', 'active': '1', 'id': '4583', 'expected_results': 'Step result 1'}}, 'stepNumberIDSet': {'1': '4583'}, 'testcaseid': '4581', 'item': '', 'version': 'exists', 'stepID': [['4583', 1]]}
        
3. open TestLink -> project 'P-A' -> Test Specification -> Test Case 'TC-A'
   - test case 'TC-A' only includes one step

4. check entries in table 'tcsteps' (compare column 'expected_results')
   -> there exist three records
   a) 'expected_results' : "Step result 1"
   b) 'expected_results' : "TC-Ex-ID result 1 createTestCaseSteps.create"
   c) 'expected_results' : "TC-Ex-ID result 2 createTestCaseSteps.create"
   
   Expectation was, that a) and c) exist, but not b)
   
5. check referenced FOREIGN KEY nodes_hierarchy
   a) tcsteps record "Step result 1"
      id references nodes_hierarchy record with parent_id = 'TC-A'.id
   b) tcsteps record "TC-Ex-ID result 1 createTestCaseSteps.create"
      id references nodes_hierarchy record with parent_id = NULL
   c) tcsteps record "TC-Ex-ID result 2 createTestCaseSteps.create"
      id references nodes_hierarchy record with parent_id = NULL
     
   or search for test case step records in table nodes_hierarchy, which not have
   a reference to test case
   
   SELECT id, parent_id, node_type_id FROM nodes_hierarchy
   WHERE parent_id IS NULL AND node_type_id = '9'
   
-> tcsteps and nodes_hierarchy includes records which have no reference to an existing test case

6. TestLink -> Test Project Managerment -> Delet project 'P-A'
    check tables tcsteps and nodes_hierarchy
    -> record a) is delete, records b) and c) still exist
TagsNo tags attached.
Database (MySQL,Postgres,etc)postgres 9.2
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships
related to 0006109closedfman createTestCaseSteps with action 'update' does not change existing steps 
child of 0006048closedfman Availables hot-fixes for 1.9.9 & How To get full fixed package from gitorious 

-  Notes
(0020231)
fman (administrator)
2013-12-20 09:38
edited on: 2013-12-20 09:46

https://gitorious.org/testlink-ga/testlink-code/commit/2304140b213f1abd4f4fa6546a7a39d1b15b1bb1 [^]

https://gitorious.org/testlink-ga/testlink-code/commit/0aacfc9180dab898f5d7e93b9f82ee75a4b1a64a [^] [^]

(0020232)
fman (administrator)
2013-12-20 09:39

please get latest code, retest and provide feedback
(0020241)
fman (administrator)
2013-12-25 15:31

no more user feedback

- Issue History
Date Modified Username Field Change
2013-12-18 21:27 lczub New Issue
2013-12-20 09:38 fman Note Added: 0020231
2013-12-20 09:39 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2013-12-20 09:39 fman Assigned To => fman
2013-12-20 09:39 fman Status new => assigned
2013-12-20 09:39 fman Note Added: 0020232
2013-12-20 09:39 fman Status assigned => feedback
2013-12-20 09:40 fman Relationship added child of 0006048
2013-12-20 09:46 fman Note Edited: 0020231 View Revisions
2013-12-20 09:47 fman Relationship added related to 0006109
2013-12-25 15:31 fman Note Added: 0020241
2013-12-25 15:31 fman Status feedback => closed
2013-12-25 15:31 fman Resolution open => fixed
2013-12-25 15:31 fman Fixed in Version => 1.9.10 (2014 Q1 - bug fixing)



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker