lczub / TestLink-API-Python-client

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

How to use the tls.reportTCResult without "platformname"?? #98

Closed paulopimenta6 closed 6 years ago

paulopimenta6 commented 6 years ago

Hi Iczub,

I am using your API to connect Testlink to my PC and I have found a problem using it. So in my testcases created in Testlink I don't have plataforms. I tried to put platformname="None" or let it empty.

Could you help me, please? If I don't use a platform in Testlink how I could run this part of code?

This is the parte I am trying:

import testlink tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIClient) tls.reportTCResult(None, newTestPlanID_A, None, 'f', '', guess=True, testcaseexternalid=tc_aa_full_ext_id, platformname=NEWPLATFORM_A, execduration=3.9, timestamp='2015-09-18 14:33', steps=[{'step_number' : 6, 'result' : 'p', 'notes' : 'result note for passed step 6'}, {'step_number' : 7, 'result' : 'f', 'notes' : 'result note for failed step 7'}] )

Best Regards.

Paulo.

lczub commented 6 years ago

Hello Paulo,

the arguments argname= are optional arguments , so if you do not want to set them, just don't use them in your call. With argname=NONE you explicite set them to the value NONE. In your sample, the solution should be

import testlink
tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIClient)
tls.reportTCResult(None, newTestPlanID_A, None, 'f', '', guess=True,
testcaseexternalid=tc_aa_full_ext_id, 
execduration=3.9, timestamp='2015-09-18 14:33',
steps=[{'step_number' : 6, 'result' : 'p', 'notes' : 'result note for passed step 6'},
{'step_number' : 7, 'result' : 'f', 'notes' : 'result note for failed step 7'}] )

Ohter sample see TestLinkExample.py - Line 485

Hope this helps, Regards Luiko

paulbodean88 commented 6 years ago

Hi Luiko,

Thanks for your reply, it works like this.

Best regards, Paul

Get Outlook for iOShttps://aka.ms/o0ukef


From: Luiko Czub notifications@github.com Sent: Saturday, January 27, 2018 3:40:43 PM To: lczub/TestLink-API-Python-client Cc: Subscribed Subject: Re: [lczub/TestLink-API-Python-client] How to use the tls.reportTCResult without "platformname"?? (#98)

Hello Paulo,

the arguments argname= are optional arguments , so if you do not want to set them, just don't use them in your call. With argname=NONE you explicite set them to the value NONE. In your sample, the solution should be

import testlink tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIClient) tls.reportTCResult(None, newTestPlanID_A, None, 'f', '', guess=True, testcaseexternalid=tc_aa_full_ext_id, execduration=3.9, timestamp='2015-09-18 14:33', steps=[{'step_number' : 6, 'result' : 'p', 'notes' : 'result note for passed step 6'}, {'step_number' : 7, 'result' : 'f', 'notes' : 'result note for failed step 7'}] )

Ohter sample see TestLinkExample.py - Line 485https://github.com/lczub/TestLink-API-Python-client/blob/1a8b5d8ee642e83c44e474df947840d9ee12f045/example/TestLinkExample.py#L485

Hope this helps, Regards Luiko

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/lczub/TestLink-API-Python-client/issues/98#issuecomment-360985634, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMcSGBVBX3-0Iph-9vkHE_Yv0CarVeTQks5tOydbgaJpZM4Rr5g-.