问题描述
我对MSTest的理解非常有限,所以这可能是一个不合理的问题,或者我现在正在Google搜索中使用正确的关键字。这不是一个真正的代码问题,而是更多的解决方案设置问题。
我想要做的是创建一个集成测试环境,其中我要测试的服务实际上正在运行,然后我将值推到它并检查状态。
从某种意义上说,这是我的意思的文字图。
[整合计划]< - > [测试中的服务]< - > [集成程序]
这意味着我发送一条初始消息,接收所需的响应,然后回复通过循环返回的响应。
不幸的是,这些服务是紧密耦合的,因此可以同时考虑所有服务。
我试图这样做的原因是为了避免制作专有的测试框架。
我尝试过:
我目前所尝试的是一个包含两个项目的解决方案。 1是MSTest(单元测试)项目,另一个是可以实际挂钩到被测服务端点的API。
我的困惑是,如何我会在mstest项目下运行测试来执行并使用其他项目连接和发送消息/检查响应的能力吗?
这个设置是否有效或者我应该采取不同的方法?
Hi, my understanding of MSTest is very limited so this may be an unreasonable question, or I am now using the right keywords in Google searches. This is not really a code question but more of a solution setup question.
What I am trying to do is create an integration test environment where the services I want to test actually are running and then I push values to it and check state through out.
In a sense here is a text diagram of what I mean.
[Integration Program] <-> [Services Under Test] <-> [Integration Program]
What this means is that I send an initial message in, receive desired response out, then respond to the response going back through the loop.
Unfortunately, the services are tightly coupled so they can be considered all under test at the same time.
The reason I am trying to do this is to avoid making a proprietary testing framework.
What I have tried:
What I currently have tried is a solution with two projects under it. 1 is a MSTest (Unit Test) Project, and the other is the APIs that can actually hook into the ends of the services under test.
My confusion is, how would I run the tests under the mstest project to execute and use the other projects ability to connect and send messages/check responses?
Is this setup even valid or should I take a different approach?
推荐答案
这篇关于如何使用mstest创建集成测试可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!