Functional Tests in TFS?

I am running a nightly build in TFS. How do I make the functional tests run in the build and output the results into tfs with the build automatically unattended?

Same question for jenkins )