0

So the situation is I have one machine having Visual Studio installed in it. There are multiple other machines in the LAN. I wont have the permission to install visual studio on other machines. The other machines will only have the code.

Can I execute the c# unit tests on those remote machines without installing visual studio? If yes what is the procedure and minimum system requirement or software requirement ?

The tests should be run on those machines only to test those servers.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    You need a test runner (mstest, NUnit.ConsoleRunner, ...) and then you can execute your tests (e.g. from console) – Tobias Apr 17 '18 at 06:45
  • vstest.console.exe ? is it one of the test runner ? I am new to asp.net – Snehal Gokhale Apr 17 '18 at 07:52
  • Yes, but I think this comes with Visual Studio installation. In your question you ask to run it without VS. Are you using MSTest? Checkout: https://stackoverflow.com/questions/261290/how-do-i-use-mstest-without-visual-studio – Tobias Apr 17 '18 at 08:13
  • Will check with MSTest. I am not sure whether I will be allowed to install any tool on the servers? Is there any way say suppose no such tool is available on the remote machine and only dlls are available? Can we then run the tests ? – Snehal Gokhale Apr 17 '18 at 08:20
  • You could install the runner via nuget. At least thats how we do it on our jenkins ci server. – Tobias Apr 17 '18 at 08:25
  • 1
    Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Apr 17 '18 at 08:50
  • 1
    What do you use to ru your tests? Nunit? xUnit? Theoretically, you don't need Visual Studio to run your tests, you need the test runner. For a more detailed answer, we would need to know what's the setup – buxter Apr 17 '18 at 13:34
  • The setup sound a bit crazy! Why should one computer have a IDE and the other just the code? What is the use case you want to solve here? Sound like this will bite you anyhow – Jocke Apr 17 '18 at 13:35
  • @jocke it's not that crazy. You might have some dev machine with VS and all the tooling setup, but for a test run you need that nothing runs in the background cause it might interfere with test results (perf test e.g.) So, you'd want to build everything locally, but execute on a dedicated machine in the LAN. – buxter Apr 17 '18 at 13:39
  • Then you set up a proper build server (like Jenkins or Team City - they know how to build and test stuff). This setup is fragile and will bite back! – Jocke Apr 17 '18 at 14:03

1 Answers1

1

I highly recommend you to try Typemock's Isolator, its a user-friendly unit-testing environment and it has a feature that matches your descriiption - the TMockRunner, a runner that can run tests on servers from the command line