How export Testcase from KIWI TCMS by use API?

独自空忆成欢 提交于 2019-12-11 14:58:24

问题


I am solving in the company how to export saved test cases from kiwi to xls file. I just found how to import data (https://gist.github.com/atodorov/f5aed028b6f254d97bcaf93453abe8d2).

Didn't you solve someone similar problem here, how to export test cases from kiwi? A specific example would help me .. thank you.


回答1:


https://tcms-api.readthedocs.io/en/latest/modules/tcms_api.html?highlight=rpc_client%20exec%20testcase

from tcms_api import TCMS

rpc_client = TCMS()

for test_case in rpc_client.exec.TestCase.filter({'pk': 46490}):
    print(test_case)

Instead of printing the test_case, just save it into XLS via some python library.



来源:https://stackoverflow.com/questions/56627818/how-export-testcase-from-kiwi-tcms-by-use-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!