Within this page you'll be able to find some examples of automated tests implemented with TestNG.

Since TestNG produces a XML report understandable by Xray, you will be able to process and present those results in Xray.