Tomasito
Tomasito

Reputation: 306

How export Testcase from KIWI TCMS by use API?

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.

Upvotes: 0

Views: 940

Answers (1)

Prome
Prome

Reputation: 477

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.

Upvotes: 1

Related Questions