Selenium和c#做自动化时遇到的问题2: 设置Windows定时任务

首先需要配置确认环境变量中配置了mstest.exe 或者vstest.exe 的路径 

Selenium和c#做自动化时遇到的问题2: 设置Windows定时任务

Selenium和c#做自动化时遇到的问题2: 设置Windows定时任务


Selenium和c#做自动化时遇到的问题2: 设置Windows定时任务

bat 文件运行 

"%VS140COMNTOOLS%..\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "smoketest.orderedtest" /logger:trx

powershell 运行

$vsTools=$env:VS140COMNTOOLS
$vsIDE=$vsTools.replace("Tools","IDE")

& "$vsIDE`mstest.exe"  /testcontainer:"$assemblyLocation\regress.orderedtest" /resultsfile:$resultFile

设置windows 定时任务每天自动执行

Selenium和c#做自动化时遇到的问题2: 设置Windows定时任务Selenium和c#做自动化时遇到的问题2: 设置Windows定时任务

-noexit "& ""C:\TFS93\2.0\Main\Test\UI\Selenium\NextGen2017\NextGenUIAutomation\UIAuto.ps1"""