Tooling API: Run Tests and get results


I’m developing a tool to analyse merge scenarios. I want to compare the test results of each merge with the test results of its parents.
Can I use the tooling-api to run all junit tests and get a list with all tests and their results in it?
I saw there is a class Testloader with a method run(Resulthandler) but I didn’t find any examples how to use it.