惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Cloudflare Blog
T
Tenable Blog
V
Vulnerabilities – Threatpost
T
Troy Hunt's Blog
SecWiki News
SecWiki News
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Secure Thoughts
Cyberwarzone
Cyberwarzone
A
Arctic Wolf
H
Heimdal Security Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
N
News and Events Feed by Topic
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cisco Talos Blog
Cisco Talos Blog
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
Forbes - Security
Forbes - Security
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
T
Tor Project blog
WordPress大学
WordPress大学
AWS News Blog
AWS News Blog
Jina AI
Jina AI
阮一峰的网络日志
阮一峰的网络日志
Cloudbric
Cloudbric
O
OpenAI News
U
Unit 42
Google DeepMind News
Google DeepMind News
Simon Willison's Weblog
Simon Willison's Weblog
Recorded Future
Recorded Future
N
News | PayPal Newsroom
S
Schneier on Security
F
Full Disclosure
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
P
Privacy International News Feed
L
LINUX DO - 最新话题
F
Fortinet All Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements

博客园 - bobbychen

C++之不带指针类的设计——Boolean .ctor,.cctor 以及 对象的构造过程 C#中virtual 方法和abstract方法的区别 SQL循环插入批量数据 【VS.NET 调试异常】 CLR 无法从 COM 上下文 XXX 转换为 COM 上下文 XXX SQL重复记录查询 String.Format格式说明 C#数字格式化方法全面解析 HTML特殊字符 - 补遗 【Access】 LEFT OUTER JOIN 关联多表的查询语句 【转帖】C#与C Windows API数据类型对应关系 【转帖】C# 与 C++ 数据类型对照 【.Net Compact Framework开发】 使用 Visual Studio 对移动项目进行Unit Testing的方法总结 【转帖】const 与 readonly 的区别 【转帖】解决继承窗体或用户控件时“visual继承当前被禁用,因为基类引用设备特定的组件或包含 p/invoke”问题 PowerDesigner实体模型CDM中关于建立Entity之间关系的备忘 【部署】Visual Studio 2008 打包部署.Net Framework 2.0 应用程序提示需要安装.Net Framework 3.5的解决方法 SQL 使用CONVERT函数 格式化日期 【Winform窗体控件开发】之五 实现类型转换器TypeConverterAttribute
Visual Studio 进行单元测试时如何附加被测试文件的方法总结
bobbychen · 2011-09-05 · via 博客园 - bobbychen

  我们在完成一个模块的开发后需要进行单元测试,关于测试的方法不详细赘述了。其中一个问题倒是想说下:如果我在进行单元测试的时候需要对附加文件进行测试(例如:我想测试对mdb文件的读写操作),我该如何配置?才能让被测试文件正确的部署到Visual Studio替我们生成的测试项目目录中呢?

  答案很简单,只要我们配置一下【LocalTestRun.testrunconfig】这个文件,就能够将想要测试的文件正确的附加到被测试的目录了。

  步骤:

  第一步:打开LocalTestRun.testrunconfig文件;

  第二步:选择【部署】后,点击【添加文件】或【添加目录】;

  第三步:选择文件或目录后点击【确定】;

  我们要添加的文件已经显示在上面了

  2011-09-05_1417

  按照上述配置后,我们在生成测试文件的时候,VS就可以帮我们将想要测试的文件部署到测试项目的Out目录中了,如图:VS已经在测试项目的目录中为我们部署了*.accdb文件了。

  2011-09-05_1431