Question

I'm working on running MSTEST from within a .NET application (simplifying the process for some of our testers) and I'm running into a problem and could use a second set of eyes on this. Here is the code.

    Dim rwSettings = "D:\Source\Infinity\Dev\Firebird\QA\LoadTesting\WebTests\perfvsctlr2.testsettings"
    Dim rwContainer = "D:\Source\Infinity\DEV\FIREBIRD\QA\LoadTesting\WebTests\Test.TestFx.LoadTesting.Enterprise\LoadTestDefs\Workload.loadtest"
    Dim rwResults = "D:\TestResults\workload.trx"
    System.Diagnostics.Process.Start("C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTEST.EXE /Testsettings:" & rwSettings & " /Testcontainer:" & rwContainer & " /Resultsfile:" & rwResults)

There are several known issues with this right now (using hardcoded paths for one) but I'm just trying to get it to work currently and I wanted to make sure the variables are in there so that I can have other inputs populate them based on some user selections.

Can I not do what I'm trying to do, there? That is, can I not call arguments for the MSTEST.EXE like that? There are the 3 listed arguments that I'm going to need to use.

Était-ce utile?

La solution

The arguments should work, you just need to move them to the arguments parameter of the start method:

System.Diagnostics.Process.Start("C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTEST.EXE", "/Testsettings:" & rwSettings & " /Testcontainer:" & rwContainer & " /Resultsfile:" & rwResults)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top