KALYAN
KALYAN

Reputation: 31

Issue integrating robot-framework with KiwiTCMS

Am exploring kiwiTCMS, Trying to Integrate robot-framework with KiwiTCMS

Goal: Update Robot framework test-case execution status in KIWITCMS

  1. Created a KIWITCMS account and Signed In (https://public.tenant.kiwitcms.org/)
  2. Created a couple of Test-cases under a test plan
  3. pip install kiwitcms-robotframework-plugin
  4. Did not find Minimal config file ~/.tcms.conf. Hence created using below command nano .tcms.conf and added below to the file and saved.

[tcms]

url = https://public.tenant.kiwitcms.org/

username = ********

password = ********

5)Created a sample .robot script with the below code

*** Settings *** Documentation An example test suite Library OperatingSystem

*** Variables *** ${plan_id} 5603

*** Test Cases *** Scenario Maps To Existing TestCase [Tags] TC-13407 arbitrary_tag_here Should Be Equal "Hello" "Hello"

  1. Executed the below command robot --listener zealand.listener.KiwiTCMS Tests/Kiwi.robot

helloworld robot --listener zealand.listener.KiwiTCMS Tests/Kiwi.robot

Kiwi :: An example test suite

[ ERROR ] Calling method 'start_suite' of listener 'zealand.listener.KiwiTCMS' failed: ProtocolError: <ProtocolError for public.tenant.kiwitcms.org/: 403 Forbidden> [ ERROR ] Calling method 'end_test' of listener 'zealand.listener.KiwiTCMS' failed: TypeError: 'NoneType' object is not subscriptable Scenario Maps To Existing TestCase | PASS |

How to fix the error?

Upvotes: 0

Views: 285

Answers (1)

Alexander Todorov
Alexander Todorov

Reputation: 2245

You have not posted the entire Python traceback so I can't be sure if that's the same issue but basically upgrade to the latest version of this plugin.

For more info: https://github.com/kiwitcms/robotframework-plugin#v112-15-may-2022 and https://github.com/kiwitcms/tcms-api/#v112-15-may-2022

403 means you don't have permissions and the API method which returns this is User.filter. For security reasons viewing other user accounts requires extra permissions (https://kiwitcms.readthedocs.io/en/latest/admin.html#managing-permissions) which for the same reason are not applied to accounts on public.tenant.kiwitcms.org.

The updated versions work around this by not calling this particular API method unless ${build_user_email} is specified. And will also silently ignore 403s as well.

Disclaimer: this answer has been provided by a Kiwi TCMS core team member!

Upvotes: 1

Related Questions