Search code examples
azurenunittddazure-service-fabric

nUnit and Azure - How to start Dev Fabric from nUnit


I'm trying to create a worker process for Azure and I'd like to test it via nUnit. I need to write a process which connect to storage and uploads data to it. The problem is I can't find any references to how you actually set up the testing framework to start dev fabric etc.

I've created the Work Processor role and then created a testing project, wired up nunit to start and for the project to pick up the test project dll. This all works fine with nUnit opening, I'm able to see the test dll and run the test.

My issue is "How do I get the dev fabric to start up when running the project through nUnit?" I'm presuming that I need to put something into the setup routine within the test project but I can't see what I should put in.

If anyone has any tips, experience etc., links to how to etc. I'd be very grateful. I'm sure that I can't be the first person who want to put Azure projects under test.


Solution

  • Haven't done this myself, but the DevFabric (compute and store) has a command-line interface.

    You would just invoke the commdn from your test stand-up routine and it should be good to go.

    CSrun.exe is the command, please see MSDN for usage reference:

    http://msdn.microsoft.com/en-us/library/gg433001.aspx