Hello Steve,
sorry for the late response. We definitely plan to begin the work on a basic API soon. There's currently no concrete date for this but we expect to begin the work on an API (and also add support for automated tests) after our current roadmap is implemented:
http://blog.gurock.com/postings/testrai … 1-q2/1157/
The next release (scheduled for this week) will include support for custom fields. After we've added support for Unicode and changed the test case history behavior, we plan to work on automated tests and the API.
I hope that makes our plans a bit clearer.
I've tried manipulating the database tables directly, and while I can set a particular test result to pass, the other displays showing overall stats don't update. I assume there's more logic in choosing a state than simply changing that particular table.
When you change the status of a test (status_id of the tests table), TestRail also re-calculates and updates the stats of the parent test run (and also the parent test plan, if available). It's probably too time-consuming to re-implement the whole functionality yourself (and it may require changes for future TestRail updates).
Right now, I can't do anything here since changing the status of a test run involves javascript (AFAIK) which is not easily scriptable from a remote automation tool.
While TestRail uses Javascript and Ajax to implement the test dialog and submitting the test result, it's actually a normal HTTP POST request. TestRail just sends a POST request to:
/index.php?/tests/ajax_add_change
Arguments are passed as JSON encoded array. There are few additional details you would need to know in case you want to implement this (authentication handling, for example), just let me know in case you are interested in this option and I will prepare an example.
Regards,
Tobias