How to call a codedUI TestMethod from other project? RRS feed

  • General discussion

  • I have created coded UI Project and test cases are recorded.My requirement,recorded testcase .dll is playback from web application.

    My code :

    public void test()
                string testName = "CodedUITestMethod1";
                string testcase = "\"C:\\Users\\muthukumar\\Documents\\Visual Studio 2012\\Projects\\CodedUITest\\TestResults\\muthukumar_VGSYSTEM74 2014-06-24 14_24_46\\Out\\codeduitest.dll\"";
                String Path = @"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe";
                Process myProcess = new Process();
                ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(Path + " /testcontainer:" + testcase + " /testsettings:TestSettings1.testsettings /test:" + testName+ " /nologo");
                myProcessStartInfo.UseShellExecute = false;
                    myProcess.StartInfo = myProcessStartInfo;
                catch (Exception ex)



    Path is showing like

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe /testcontainer:"C:\Users\muthukumar\Documents\Visual Studio 2012\Projects\CodedUITest\TestResults\muthukumar_VGSYSTEM74 2014-06-24 14_24_46\Out\codeduitest.dll" /testsettings:TestSettings1.testsettings /test:CodedUITestMethod1 /nologo

    But, system throw the error is "The system cannot find file specified".

    I hope your possible reply

    Thanks in Advance

    Thursday, June 26, 2014 9:15 AM

All replies