Telerik Integration with Team City

9 posts, 0 answers
  1. Padmashree
    Padmashree avatar
    39 posts
    Member since:
    May 2018

    Posted 16 May Link to this post

    Hi,

    I am exploring Telerik Test studio integration with TeamCity. Referring Telerik documentation on Team city build configuration.
    My goal is to run build verification tests against web application . Here is the build server and Telerik Test studio configuration.

    1) Telerik Test Studio license is installed on VM1
    2) Scheduling Server is installed on VM1
    3) Execution Server installed on VM1 and on Team City Build server (VM2)
    4) I have configured Execution server on the Team City Build server and it is running

    Question I have is , how to trigger test execution on the VM through Team City build ?
    Per this documentation (https://docs.telerik.com/teststudio/advanced-topics/build-server/team-city-builds) , local path to tests is specified under build step >Custom Script section . Screenshot attached.

    I am getting error when build is run

    [Step 2/3] Process exited with code 0
    [14:28:48]Step 3/3: Build verification tests (Command Line)
    [14:28:48][Step 3/3] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script2321983325468603385.cmd
    [14:28:48][Step 3/3] in directory: C:\TeamCity\buildAgent\work\e2ede0137adfbe15
    [14:28:48][Step 3/3] The system cannot find the path specified.
    [14:28:48][Step 3/3] 'test' is not recognized as an internal or external command,
    [14:28:48][Step 3/3] operable program or batch file.
    [14:28:48][Step 3/3] 'out' is not recognized as an internal or external command,
    [14:28:48][Step 3/3] operable program or batch file.
    [14:28:48][Step 3/3] Process exited with code 1
    [14:28:48][Step 3/3] Process exited with code 1 (Step: Build verification tests (Command Line))
    [14:28:49][Step 3/3] Step Build verification tests (Command Line) failed
    [14:28:49]Ant JUnit report watcher

     

     

    Thanks in advance for your help

     

    -

    Padmashree

     

     

  2. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    157 posts

    Posted 17 May Link to this post

    Hello Padmashree,

    Thank you for sharing the details about your setup and configurations.

    I notice that the test and out execution options for ArtOfTest.Runner.exe are not recognized. This is most likely the reason for the failed execution. Please share the full command that you have used and I will analyze it.

    In the meantime, please check the location of the ArtOfTest.Runner.exe. As of Test Studio release 2017 R3, the default installation folder is changed to "C:\Program Files (x86)\Progress\Test Studio". Please make the necessary changes to the path, if needed.

    One more thing that might be causing the issue, is if you are running a windows build agent as a service. This means that the agent will not be able to access the UI. You can try to run Team City in console mode by running the agent.bat with parameter start and see if that makes a difference.

    I am looking forward to hearing from you and continue analyzing the issue.

    Regards,
    Plamen Mitrev
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Padmashree
    Padmashree avatar
    39 posts
    Member since:
    May 2018

    Posted 17 May Link to this post

    Thanks for your quick response.

    Here is my full command that I am using under Build step

     

    "C:\Program Files (x86)\Telerik\Test Studio\Bin\ArtOfTest.Runner.exe"
    test="C:\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\Login to myTASB.tstest"
    out="C:\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\Results" junitstep

    One more thing that might be causing the issue, is if you are running a windows build agent as a service. This means that the agent will not be able to access the UI. You can try to run Team City in console mode by running the agent.bat with parameter start and see if that makes a difference.

    >> Not exactly clear on what you meant, please explain

    I am running build through Build server localhost site :http://DevVM-build.ms.ABCD.org:8080/

     

     

     

  4. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    157 posts

    Posted 21 May Link to this post

    Hello Padmashree,

    I believe that you have entered the command in 3 separate lines and this means that each line is executed as a new command. It should be written on the same line separated with a single space and then all parameters should be recognized. Please ensure that the path to the ArtOfTest.Runner.exe is correct on that machine and enter it like this:
    "C:\Program Files (x86)\Telerik\Test Studio\Bin\ArtOfTest.Runner.exe" test="C:\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\Login to myTASB.tstest" out="C:\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\Results" junitstep

    When the Team City agent is started as a service, it can't access the GUI and this might cause the tests to fail. The resolution for this potential issue, is to start the agent in console mode. In case you test need to access the GUI, you need to make sure that the Team City agent on the build server is started in console mode. This should be also the machine with the ArtOfTest.Runner.exe.

    I hope that the above suggestions and details will help you automate this scenario. Please do not hesitate to contact us again, if you need further assistance.

    Regards,
    Plamen Mitrev
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. Padmashree
    Padmashree avatar
    39 posts
    Member since:
    May 2018

    Posted 05 Jun in reply to Plamen Mitrev Link to this post

    Hi Plamen

     

    Sorry in delay in responding back on this . Had other project deadlines .

    As per your recommendation , I made sure there isn't extra space in the build step command.

    Here is the build error I am getting 

    [14:50:40]The build is removed from the queue to be prepared for the start
    [14:50:40]Collecting changes in 1 VCS root
    [14:50:41]Starting the build on the agent BuildAgent2
    [14:50:42]Clearing temporary directory: C:\BuildAgent\temp\buildTmp
    [14:50:42]Publishing internal artifacts
    [14:50:42]Building and caching clean patch for VCS root: EnergyCoop
    [14:50:42]Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
    [14:50:42]Checkout directory: C:\BuildAgent\work\e2ede0137adfbe15
    [14:50:42]Updating sources: server side checkout (10s)
    [14:50:53]Step 1/3: Get NuGet Packages (NuGet Installer) (19s)
    [14:51:12]Step 2/3: Energy Coop Debug (Visual Studio (sln)) (31s)
    [14:51:43]Step 3/3: Build verification tests (Command Line)
    [14:51:44][Step 3/3] Starting: C:\BuildAgent\temp\agentTmp\custom_script1345738618859301646.cmd
    [14:51:44][Step 3/3] in directory: C:\BuildAgent\work\e2ede0137adfbe15
    [14:51:44][Step 3/3] The system cannot find the path specified.
    [14:51:44][Step 3/3] Process exited with code 1
    [14:51:44][Step 3/3] Process exited with code 1 (Step: Build verification tests (Command Line))
    [14:51:44][Step 3/3] Step Build verification tests (Command Line) failed
    [14:51:44]Publishing artifacts
    [14:51:44]Ant JUnit report watcher
    [14:51:44][Ant JUnit report watcher] No reports found for paths:
    [14:51:44][Ant JUnit report watcher] C:\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\Results\*.xml
    [14:51:44]Publishing internal artifacts
    [14:51:45]Build finished

    Not quite clear on what you meant by this . Please clarify ..

    One more thing that might be causing the issue, is if you are running a windows build agent as a service. This means that the agent will not be able to access the UI. You can try to run Team City in console mode by running the agent.bat with parameter start and see if that makes a difference.

    Thanks for your help 

    -

    Padmashree

     

  6. Padmashree
    Padmashree avatar
    39 posts
    Member since:
    May 2018

    Posted 05 Jun in reply to Padmashree Link to this post

    Attached log from Telerik Execution server on Build VM

     

  7. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    157 posts

    Posted 06 Jun Link to this post

    Hello Padmashree,

    It seems that the TeamCity build has failed and this is why the test has not been executed. As a result there are also no results in the specified output location.

    The reason for the failure is not clear to me, but we can start by ensuring that the environment is setup for UI testing. This means that the agent must be started in a console mode, otherwise it is running as a service and will not be able to access the Windows' UI. This condition is crucial for successful test or test list execution.

    Please use the command prompt and start the agent in this way (from the bin folder - "C:\TeamCity\buildAgent\bin"). Let me know what is the result with this approach.

    If you continue to encounter any issues, please share more details about your setup and build agent configuration. I will do my best to help you automate this scenario.

    Regards,
    Plamen Mitrev
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  8. Padmashree
    Padmashree avatar
    39 posts
    Member since:
    May 2018

    Posted 11 Jun in reply to Plamen Mitrev Link to this post

    Thanks Plamen .

    I tried to run build agent in a console mode but still no luck . I have attached log files.

    I created new project as explained under Telerik Documentation. I am still not clear how build agent can access the Telerik test which is on the VM1 and Build server is on VM2. I am getting file not found error when build is executed

    [06/11 14:52:47,ArtOfTest.Runner.exe(7836:1),Error] CommandLineRunner.LogError() : LoadTest: Unable to find test at 'C:\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\Login to myTASB.tstest'!

    I also tried by file path with VM name like test=\\dev-12r2-001\c$\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\Login to myTASB.tstest under build steps command line

    Thanks for your help.

     

    _

    Padmashree

     

     

     

     

  9. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    157 posts

    Posted 13 Jun Link to this post

    Hello Padmashree,

    I see that the execution is not able to find the test on the specified path or the network path, as you mentioned. You can try to call the ArtOfTest.Runner.exe, from the build server, on VM1 and start the test execution on the same machine, similar to the way you tried to provide the test file path. For this to work properly you need to ensure that both locations are accessible from the build server. 

    Another option would be to install the Test Studio Run-Time on VM2 and start it locally from the build agent, as it is configured in the current build. You can also copy the test file to the build server and this should eliminate any issues with the network access. Please let me know if this option is possible for you and if you need any additional details.

    I am looking forward to hearing from you and continue investigating the issue further.

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