Search code examples
kiwi-tcms

Where can I find kiwi tcms parameters information about json-rpc?


I practice to use json-rpc to create test case, and I want to assoicate a test paln with test case, but I don't know the parameter of the plan.

Can anyone give me some suggestions?? Thanks.

My example like this Test plan ID : 3 Test plan name: test

Using postman request

{
  "jsonrpc":"2.0",
  "method":"TestCase.create",
  "params":{"values":{"summary":"jsonrpctest","case_status":2,"category":2,"priority":1,"text":"20201005test","plan":[3,"test"]}},
  "id":1
}

Response

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "id": 191,
        "create_date": "2020-10-06 04:44:13",
        "is_automated": false,
        "script": "",
        "arguments": "",
        "extra_link": null,
        "summary": "jsonrpctest",
        "requirement": null,
        "notes": "",
        "text": "20201005test",
        "case_status_id": 2,
        "case_status": "CONFIRMED",
        "category_id": 2,
        "category": "--default--",
        "priority_id": 1,
        "priority": "P1",
        "author_id": 1,
        "author": "ardyn",
        "default_tester_id": null,
        "default_tester": null,
        "reviewer_id": null,
        "reviewer": null,
        "plan": [],
        "component": [],
        "tag": []
    }
}

Solution

  • https://kiwitcms.readthedocs.io/en/latest/api/index.html says "Server side RPC methods are documented in tcms.rpc.api."

    Which is https://kiwitcms.readthedocs.io/en/latest/modules/tcms.rpc.api.html

    And there is the TestPlan.add_case() method: https://kiwitcms.readthedocs.io/en/latest/modules/tcms.rpc.api.testplan.html#tcms.rpc.api.testplan.add_case