Adding test plan to test run via API

Hey team, is there a way of adding all test cases from a test plan to a test run using the REST API? I don’t see a mapping available between the two entities. Adding the testplan_id value to the call for creating the test run doesn’t add the test cases.

Thank you,

Hi and welcome to the Testiny forum!

As you noticed, you need to map test cases to a test run “manually”, i.e. by adding the mappings between test cases and run.

Unfortunately, selecting and adding test cases based on the queries defined in the test plan is currently not available directly via API, sorry! But it’s definitely useful and will likely be added in the future.

Best Regards,
Alex

Regarding the comment to my last post (JSON does not format well in comments):

The easiest way to find out about the API is just open the developer console in your browser and have a look at what the Testiny frontend sends to the backend. The frontend uses the same public API.

so I can find all tests in a given test case folder ID.

See below for a sample JSON request content to retrieve the test cases in a folder with ID 12345:

{
	"map": {
		"entities": [
			"testcase",
			"testcase_folder"
		],
		"ids": {
			"testcase_folder_id": 12345
		}
	}
}

Regards,
Alex