Run test studio through UI

6 posts, 0 answers
  1. Cesar
    Cesar avatar
    3 posts
    Member since:
    Sep 2012

    Posted 28 Sep 2012 Link to this post

    Hello
    It is possible to run a test through Web app to test another Web app??
    What I'm trying to do is build a UI (Visual Studio) with a menu, then select one link and run a test.
    Already have the tests using Telerik.WebAii library, and in the local machine works fine, but when I deploy the app on the IIS(7), doesn't do anything.
    I'm I doing something wrong, or maybe it's not possible??
    In case it's possible, do you have to install Test Studio on every PC you want to run the Test, or the test runs with the server configuration??
    Thanks in advance.
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 04 Oct 2012 Link to this post

    Hello Cesar,
    yes, it's possible.

    But you will need at least a RunTime edition on the intended execution machines:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/overview/test-studio-vs-run-time.aspx

    Also, it sounds like you're basically interested in doing continuous integration. The Hudson integration server for instance is designed to be a web application that allows you to run tests against other applications. The whole section we have on Build Server integration might be of interest to you:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/command-line-test-execution.aspx

    If you haven't done so already you should also familiarize yourself with our Scheduling engine:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/scheduling-test-runs.aspx
    It's Test Studio's own continuous integration system.

    I hope this helps. Let me know if you have more questions on this.

    Regards,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Cesar
    Cesar avatar
    3 posts
    Member since:
    Sep 2012

    Posted 04 Oct 2012 Link to this post

    Thanks for your answer Stoich, but I don't know if that is what I'm looking for, correct me if I'm wrong. I'm attaching some images to explain my self more clearly. I have this Web App (1.png) if I choose first page I'm getting to the first test (2.png) where I have some parameters, then I click the button to execute the test. When I run it on Visual Studio works fine, but after the deploy on the IIS and browsing the URL http://localhost/Project and doing the same thing, throw me an error in the line "Manager.LaunchNewBrowser();" saying "Object reference not set to an instance of an object.". I debbuged the app on the IIS, I have a breakpoint before the line LaunchBrowser(), and when I saw the properties of Manager control I noticed that in the Desktop's value has 'Manager.Desktop' threw an exception of type 'ArtOfTest.WebAii.Exceptions.UnsupportedNonInteractiveOperationException'. Don't know if that's the main problem.
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 10 Oct 2012 Link to this post

    Hi Cesar,

    I discussed this with our engineers. 

    Here's what we think is happening: you're trying to invoke the test through a Windows service. A service does not have interactive desktop permissions.

    Instead you should use the RunHelper class to invoke your tests through MsTest. Invoking the test might look something like this:

    ArtOfTest.WebAii.Design.Execution.RunHelper.Test(@"c:\TestProjectDir\res.aii", @"c:\TestProjectDir\bin\debug\TestProject.dll");

    Check out the ArtOfTest.WebAii.Design.Execution.RunHelper and try to invoke the test through it. Let me know how it goes.

    Kind regards,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Cesar
    Cesar avatar
    3 posts
    Member since:
    Sep 2012

    Posted 12 Oct 2012 Link to this post

    Hello Stoich
    I did what you suggested without much success, locally works great but on the IIS throw me this:
            RawOutput    "------------------------------------------------------------\r\n'10/12/2012 9:12:29 AM' - Using .Net Runtime version: '4.0.30319.269' for tests execution.\r\n'10/12/2012 9:12:29 AM' - Starting execution....\r\n'10/12/2012 9:12:29 AM' - Failure detected during execution. Details:\r\n------------------------------------------------------------\r\n'10/12/2012 9:12:29 AM' - System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at ArtOfTest.WebAii.Core.Manager.SetupDialogMonitoring()\r\n   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)\r\n   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InitializeWeb(ExecutionEngineCreateParams initParams)\r\n   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.CreateAndInitializeEngine(Test test, ExecutionEngineCreateParams cp)\r\n   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)\r\n------------------------------------------------------------\r\n'10/12/2012 9:12:29 AM' - Test completed!\r\n"


    Also tried this:

    System.Diagnostics.ProcessStartInfo psi = new ProcessStartInfo();
    psi.WorkingDirectory = @"C:\Program Files\Telerik\Test Studio\Bin\";
    psi.FileName = "ArtOfTest.Runner.exe";
    psi.UseShellExecute = false;
    psi.Arguments = "test=" + "\"" + test_path" + "\"";
    Process p = Process.Start(psi);
    p.WaitForExit();

    And the same happened, locally works fine but no deployed.
    Definitely I'm doing something wrong, I'm sending you the code so you can take a look of that. Thanks
  6. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 18 Oct 2012 Link to this post

    Hi Cesar,
    the approach you've taken (using the ArtOfTest.Runner.exe to run your tests) should work. The problem is probably related to the state of the remote machine that you're trying to execute on. The machine needs to have an unlocked desktop:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/knowledge-base/test-execution/no-tests-execute-on-locked-machine.aspx

    Regards,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top