我的批处理文件脚本运行编码的UI测试不起作用! [英] My batch file script to run coded UI test is not working!

查看:104
本文介绍了我的批处理文件脚本运行编码的UI测试不起作用!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个编码的UI测试工作正常。我已经创建了一个批处理文件脚本,以便我可以在Windows任务调度程序中运行。它一直显示失败



我尝试过:



cd /

cdC:\Users\alish\source \repos\CodedUITestProject6 \CodedUITestProject6 \obj \Debug \ CodedUITestProject6.dll







@echo off

set max = .set count =。

echo开始测试执行

echo =======================

C: \Program Files(x86)\ Microsoft Visual Studio \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ CodedUITestProject6 \obj\Debug \ CodedUITestProject6.dll / test:CodedUITestMethod1







echo all done

@exit

So i have a coded UI test that works fine. I've create a batch file script so that i can run in windows task scheduler. It keeps showing "Failed"

What I have tried:

cd /
cd "C:\Users\alish\source\repos\CodedUITestProject6\CodedUITestProject6\obj\Debug\CodedUITestProject6.dll "



@echo off
set max=.set count=.
echo starting test execution
echo =======================
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\MSTest.exe" /testcontainer:C:\Users\alish\source\repos\CodedUITestProject6\CodedUITestProject6\obj\Debug\CodedUITestProject6.dll/test:CodedUITestMethod1



echo all done
@exit

推荐答案

可能是权限问题:调度程序不能在您的用户ID下运行,所以它赢了无法访问你的文件。尝试将数据和DLL文件移动到另一个文件夹 - 直接挂在根目录下的测试很好 - 并将测试文件夹上的访问权限设置为所有人的所有权。

然后更改批处理脚本使用该文件夹而不是您的用户数据,它应该工作。
Probably, it's a permissions problem: the Scheduler does not run under your user ID, so it won't have access to your files. Try moving the data and DLL files to a different folder - "Tests" hanging directly off the root is good - and set the access permissions on the Tests folder to all for everyone.
Then change your batch script to use that folder instead of your user data, and it should work.


这篇关于我的批处理文件脚本运行编码的UI测试不起作用!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆