Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008327TestLinkAPI - XMLRPCpublic2018-07-09 13:402018-07-12 09:02
Assigned To 
PrioritynormalSeverityfeature requestReproducibilityalways
PlatformOSUbuntu 18.04 KernelOS Version4.15.0-24
Product Version1.9.17 (2018 Q1) 
Fixed in Version 
Summary0008327: Unable to get the fk_id for uploading attachments to the single step of testcase
DescriptionUsing the Testlink API Client of Python ( [^]) I'm not able to upload an attachment to a single step.

tls.uploadAttachment('%s' % filename, fk_id, 'execution_tcsteps')

I need the fk_id. I've tried to get from the last execution but the XMLRPC API doesn't return anything
Database (MySQL,Postgres,etc)MySQL Ver 14.14 Distrib 5.7.22, for Linux (x86_64)
BrowserGoogle Chrome 67.0.3396.99 (Official Build) (64-bit)
PHP VersionPHP 7.2.7-0ubuntu0.18.04.2 (cli)
QA Team - Task Workflow StatusTBD
Attached Filespng file icon Selection_031.png [^] (27,681 bytes) 2018-07-10 13:25

- Relationships

-  Notes
fman (administrator)
2018-07-09 16:13

We do not are responsible for python client
please test with the sample clients PHP, and provide feedback
dreamwhite (reporter)
2018-07-09 16:16

Just tested on PHP sample clients provided by TL and the result is still the same. I can't get the FK_ID
fman (administrator)
2018-07-09 18:03

please provide detailed steps to reproduce.
dreamwhite (reporter)
2018-07-10 10:55

Used another language (below JAVA). I need the fkId for uploading the attachment. I know the other parameters.

public Attachment uploadAttachment(Integer fkId, String fkTable, String title, String description, String fileName,
            String fileType, String content) throws TestLinkAPIException {
        return this.miscService.uploadAttachment(fkId, fkTable, title, description, fileName, fileType, content);
fman (administrator)
2018-07-10 12:34

please again:
please provide detailed steps to reproduce.

without requested info I'm going to close issue
dreamwhite (reporter)
2018-07-10 13:04

*downloads the file from* [^]
*edits the infos about the server and the dev key*

Compile it with javac and then java TestLinkApi.class

The code works but only if I provide the fkId statically. I want to get it automatically from the API but I don't know how.
fman (administrator)
2018-07-10 13:06

I need steps FROM LOGICAL POINT OF VIEW I can test only on PHP
dreamwhite (reporter)
2018-07-10 13:20

Step 1: Reports test case result with reportTCResult(tcid, tpid, buildname, status, notes, platform, execduration, timestamp, steps)
Step 2: Uploads the attachment with uploadAttachment(file_path, fkid, fktable)
The error is in the latest API call where I need the fkid dynamically. I can't pass it as a static value. If I need to upload 8 screenshot I can't guess the fkid.
fman (administrator)
2018-07-11 20:58

there is no method to get exec id for a step, you will need to change reportTCResult to return exec id for each step or create a method that using test case exec ID, will return info about exec id for each test case step execution
Meanwhile, your workaround is to use the whole test case exec ID (if reportTCResult() returns it) and attach all files to it

- Issue History
Date Modified Username Field Change
2018-07-09 13:40 dreamwhite New Issue
2018-07-09 16:13 fman Note Added: 0027673
2018-07-09 16:13 fman Status new => feedback
2018-07-09 16:14 fman QA Team - Task Workflow Status => TBD
2018-07-09 16:14 fman Priority immediate => normal
2018-07-09 16:16 dreamwhite Note Added: 0027674
2018-07-09 16:16 dreamwhite Status feedback => new
2018-07-09 18:03 fman Note Added: 0027675
2018-07-10 10:55 dreamwhite Note Added: 0027681
2018-07-10 12:34 fman Note Added: 0027683
2018-07-10 13:04 dreamwhite Note Added: 0027684
2018-07-10 13:06 fman Note Added: 0027685
2018-07-10 13:20 dreamwhite Note Added: 0027686
2018-07-10 13:21 dreamwhite Tag Attached: FKID
2018-07-10 13:21 dreamwhite Tag Attached: XMLRPC
2018-07-10 13:25 dreamwhite File Added: Selection_031.png
2018-07-11 20:58 fman Note Added: 0027687
2018-07-11 20:58 fman Severity block => feature request
2018-07-11 21:08 fman Status new => feedback

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker