I have set up my own PC as a build machine that runs regression tests automatically at night and then emails me the test result upon completion so that I can check it when I get in the morning.
The mechanism I use to do is:
- Windows Task Sceduler to run the test automatically at certain time
- Bat script to run the tests, generate Specflow report, and email the report. Note that I have included %date% and %time% variables to automatically include the date and time in the email subject
“C:Program Files (x86)NUnit 2.6.2binnunit-console.exe” /labels /out=TestResult.txt /xml=TestResult.xml C:gitPmasterbinDebugTestsRegressionRegression.dll
“C:Program Files (x86)TechTalkSpecFlowspecflow.exe” nunitexecutionreport C:gitPmasterTestsRegressionRegressionRegression.csproj /out:TestResult.html
“c:blat” c:gitPmasterTestsRegressionTestResult.html -s “TestResult at %time% on %date%” -to email@example.com
As you can see in the Bat script, I have used a 3rd party open source tool Blat to send email. This blog gives comprehensive information on how to set up Blat.
Leave a Reply