检查代码和DAL访问的性能 [英] Check Performance of Code and DAL Access

查看:52
本文介绍了检查代码和DAL访问的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个三层体系结构(服务,业务逻辑和数据访问层).在我们的公司中,我们有单元测试,提示,现在我们想创建一个性能"界面.测试之类的东西.

we have a 3 layer architecture (service, Businesslogic and data access layer). In our company we have unit test, cuit and now we like to create a "performance" test or something like that.

我们想检查从业务逻辑的入口点开始运行一次所需的时间,该操作将数据从dal保存到数据库中.我们已经具有用于创建数据库和所有其他依赖项的基础结构.

We want to check the time which we need for one run from the entry point of a businesslogic save data over the dal to the database. We have already a infrastructure for creating the database and all other dependencies.

我们目前所缺少的是让"UnitTest"成为可能.例如,运行10次.

What we are currently missing is a possibility to let the "UnitTest" run let´s say for example 10 times. 

我认为它几乎类似于LoadTest/PerformanceTest,但我们需要的是将一些其他程序集发布到LoadTest的执行路径,或者LoadTest将在BuildOutput目录中运行.在我们的UnitTest中,我们使用了 使用以下参数的runsettings文件:

I think it nearly something like a LoadTest/PerformanceTest but what we need is that some other assemblies are published to the execution path of the LoadTest or that the LoadTest will run in the BuildOutput Directory. In our UnitTest we used for that the runsettings file with this parameters:

但是我们找不到在buildoutput目录中执行loadtest或将所有程序集复制到执行路径的任何解决方案.

But we can´t find any solution to execute the loadtest in the buildoutput directory or copy all Assemblies to the execution path.

有人知道我们如何创建这种测试吗?

Does anyone has a idear how we could create some kind of this tests?

感谢您的帮助.

推荐答案

您好Mirko_V,

Hi Mirko_V,

不使用Runsettings文件,如何在命令行中将testsettings文件与MStest一起使用?

Not use the Runsettings file, how about using the testsettings file with MStest in command line?

http ://stackoverflow.com/questions/3738819/do-mstest-deployment-items-only-work-when-present-in-the-project-test-settings-f

如果使用VS IDE,它将不会将Deployment文件复制到测试结果文件夹,但是使用mstest命令行可以很好地工作.

If you use the VS IDE, it would not copy the Deployment file to the test result folder, but it works well using the mstest command line.

此外,Deployment文件已复制到测试结果文件夹,而不是项目输出路径.

In addition, the Deployment files were copied to test result folder, not the project output path.

>>  < MSTest>
           < DeploymentEnabled> False</DeploymentEnabled>
      </MSTest>

>>  <MSTest>
            < DeploymentEnabled>False</DeploymentEnabled>
       </MSTest>

如果将其设置为false,则在测试方法中指定的部署项目将不会复制到部署目录中.

If you set this to false, deployment items that you have specified in your test method will not be copied to the deployment directory.

如果您要将文件复制到项目输出路径,则其他社区成员也在此处共享其他解决方法:

Other community members also shared other workaround here if you want to copy files to the project output path:

http://stackoverflow.com/questions/22873922/deployment-items-in-runsettings

如果我对这个问题有误解,请随时告诉我.

If I have misunderstood this issue, please feel free to let me know.

最好的问候,

Jack


这篇关于检查代码和DAL访问的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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