Add support for running tests with xUnit.

Fixes #4950