Answered by:
Testing Coded UI Tests

Question
-
Dears,
i read that we can run the coded UI tests without VS 2010 using test agents. But usually when we run a coded ui test in Visual Studio 2010 we can see whether it failed or not by using the test results pane. When it comes to a test agent how to make sure the test passed or failed?
thanks,
Ammar
Wednesday, November 16, 2011 11:24 AM
Answers
-
you still get a test result file which you can open anytime in VisualStudio to see what all tests have failed/passed.
- Proposed as answer by Rajeev - MSFT Wednesday, November 16, 2011 1:03 PM
- Marked as answer by AmmarBIZ Thursday, November 17, 2011 5:26 AM
Wednesday, November 16, 2011 1:03 PM -
AmmarBIZ,
Rajeev is correct, you can create a .trx output file by using the /resultsfile flag when executing a test from mstest.
See:
MSTest.exe Command-Line Options
http://msdn.microsoft.com/en-us/library/ms182489(v=VS.80).aspx
The .trx format is simple xml that is rendered readable in Visual Studio, but lets say you do not have Visual Studio and want to view the results in a nice formatted manner. You can create a .bat to execute the test and then run trx2html on the resulting .trx to get a nice visual output in html.
TRX2HTML
For example:
mstest /testcontainer:%test.dll% /resultsfile:%testResultsPath%testoutput.trx trx2Html.exe "%testResultsPath%\testoutput.trx"
and then, you could do something really cool like send an e-mail of the results with blat.
set eMail=Paul.DeCarlo@WinCoder.co set To=QATeam@WinCoder.co set pass="MyPassword" set subj=-s "QA Test Report" set server=-server MyMailServer set debug=-debug -log blat.log -timestamp blat testResults.html -to %To% -f %eMail% -p %pass% %subj% %server% %debug%
Cheers,
Paul
- Proposed as answer by Paul DeCarloMicrosoft employee Wednesday, November 16, 2011 4:41 PM
- Marked as answer by AmmarBIZ Thursday, November 17, 2011 5:27 AM
Wednesday, November 16, 2011 4:41 PM
All replies
-
you still get a test result file which you can open anytime in VisualStudio to see what all tests have failed/passed.
- Proposed as answer by Rajeev - MSFT Wednesday, November 16, 2011 1:03 PM
- Marked as answer by AmmarBIZ Thursday, November 17, 2011 5:26 AM
Wednesday, November 16, 2011 1:03 PM -
AmmarBIZ,
Rajeev is correct, you can create a .trx output file by using the /resultsfile flag when executing a test from mstest.
See:
MSTest.exe Command-Line Options
http://msdn.microsoft.com/en-us/library/ms182489(v=VS.80).aspx
The .trx format is simple xml that is rendered readable in Visual Studio, but lets say you do not have Visual Studio and want to view the results in a nice formatted manner. You can create a .bat to execute the test and then run trx2html on the resulting .trx to get a nice visual output in html.
TRX2HTML
For example:
mstest /testcontainer:%test.dll% /resultsfile:%testResultsPath%testoutput.trx trx2Html.exe "%testResultsPath%\testoutput.trx"
and then, you could do something really cool like send an e-mail of the results with blat.
set eMail=Paul.DeCarlo@WinCoder.co set To=QATeam@WinCoder.co set pass="MyPassword" set subj=-s "QA Test Report" set server=-server MyMailServer set debug=-debug -log blat.log -timestamp blat testResults.html -to %To% -f %eMail% -p %pass% %subj% %server% %debug%
Cheers,
Paul
- Proposed as answer by Paul DeCarloMicrosoft employee Wednesday, November 16, 2011 4:41 PM
- Marked as answer by AmmarBIZ Thursday, November 17, 2011 5:27 AM
Wednesday, November 16, 2011 4:41 PM