简体   繁体   中英

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?

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM