ArtOfTest running from Powershell in Release Management

5 posts, 0 answers
  1. Zac Everett
    Zac Everett avatar
    15 posts
    Member since:
    Sep 2012

    Posted 12 Sep Link to this post

    Im trying to run a Test Studio test as part of my Release Management.

    I have a Powershell script to run the test.

    try
    {
        artoftest.runner.exe test="E:\TestStudioTry1\TestingPrototype\logon.tstest" 
        if (!$?)
        {
            write-output "Failed"
            throw "Tests Failed"
        }
    }
    catch
    {
        Write-Error $_.Exception.Message   
       # exit 1 # to get an error flagged so it can be seen by RM
    }

    This script runs fine from Powershell ISE but when running as a step in  RM it fails, looking at the logs i get.

             "Message": "------------------------------------------------------------\r\n'09/09/2016 16:45:02' - Executing test: 'logon', path: 'logon.tstest.'\r\n'09/09/2016 16:45:02' - Using .Net Runtime version: '4.0.30319.42000' for test execution. Build version is '2016.2.630.0'.\r\n'09/09/2016 16:45:02' - Starting execution....\r\n'09/09/2016 16:45:04' - Failure detected during execution. Details:\r\n------------------------------------------------------------\r\n'09/09/2016 16:45:04' - ArtOfTest.WebAii.Exceptions.UnsupportedNonInteractiveOperationException: Dialog monitoring can not be enabled when running in non-interactive mode. Follow the link for more information: http://docs.telerik.com/teststudio/user-guide/command-line-test-execution/continuous-integration/team-foundation-server-builds.aspx\r\n   at ArtOfTest.WebAii.Design.Execution.ExecutionContext.SetDialogMonitoring()\r\n   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTestIteration(Object codeBehindInstance, Boolean isDataDriven)\r\n   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)\r\n   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)\r\n------------------------------------------------------------\r\n'09/09/2016 16:45:04' - Test completed!\r\n",

    How does one include a test as part of a release management flow?

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    253 posts

    Posted 15 Sep Link to this post

    Hello Zac,

    There are two possible reasons for the exception listed in your query. One is that Telerik tests need to be able to interact with the desktop to successfully run. In order for them to do that the build agent needs to be run in interactive (i.e. console) mode and not as a windows service. If this requirement is met than an active session will be required on the execution machine where tests are running. Here you could read further how to successfully implement Test Studio tests in a Continuous Integration Environment. 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Zac Everett
    Zac Everett avatar
    15 posts
    Member since:
    Sep 2012

    Posted 15 Sep in reply to Elena Tsvetkova Link to this post

    My build agent is set to run interactive but it's actually Release Management that is trying to run the Powershell script to execute the Telerik Test.

    Let me explain what i'm trying to achieve and you could perhaps point me in the right direction

     

    Queue new build is triggered and puts the compiled app to the drop folder.

    Release Management is executed as part of the build

         Creates the environments/sets up dbs etc

     

     

  4. Zac Everett
    Zac Everett avatar
    15 posts
    Member since:
    Sep 2012

    Posted 15 Sep Link to this post

    After creating the Testing environment via powershell.

    Run Telerik Tests against the fresh Test installation.

     

    It's the running Telerik Tests using Release Management I'm struggling with, possibly because it's not how it's intended to be used. May be I should be running MTM from Release Management and having the Telerik tests executed from MTM.

    Somebody must be doing this already?

  5. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    253 posts

    Posted 19 Sep Link to this post

    Hello Zac,

    Please note that we are not familiar with Release Management tool and we do not have an example to provide. As of the error you get and the experience we have with other build agents I shared my recommendation to ensure the agent runs in console mode. 

    Anyways, please give a try to your suggestion adding the MTM and share further observation on what the result would be. This will be useful experience for us as well. Thank you in advance for the cooperation! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top