Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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?
Posted
Updated 20-Sep-16 21:21pm
Comments
[no name] 20-Sep-16 12:26pm    
"execute and use the other projects ability to connect and send messages/check responses", it would be the exact same way to managed to do it in your regular code. We can't tell you because we can't possibly know what your code does or how it does it.
Member 12750312 20-Sep-16 12:59pm    
Thanks for the speedy response NotPolitcallyCorrect. I understand I have been much to vague with my question. The services I would like to test are all connected together via TCP, as is the application I use to connect on either ends of the "black box"/services under test.

I have two concerns. Will I need to copy the connection code into the MSTest Project and can the MSTest Project run as a standard .exe that can be called when to run and output results?
[no name] 20-Sep-16 13:53pm    
I would have no idea. I can't see your project architecture from here. Only you can answer that. You test code will need to reference your API somehow.

Unit tests are normally packaged in DLLs not EXEs.

1 solution

The more important question to ask is: where will those tests be running?
I'd integrate them in a Continuous Integration framework (Jenkins or Team Foundation Server). After a build and unit tests were successful, startup a virtual machine, install and start the required services, copy your test dlls there and run the tests by calling mstest.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900