Forum Discussion

malj's avatar
malj
Contributor
5 years ago

Running Report Generator on a Jenkins slave

I am trying to launch SmartBear Report Generator to be able to generate a report when TestExecute hangs on any of our Jenkins slaves, which happens intermittently. I have been told by support to run the command line below before the test starts.

 

"C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\ReportGenerator.exe" --desktop SE.SBO.WorkStation --generate-report C:\temp\DebugTrace --storage-directory C:\temp\DebugTrace

 

I have added an "Execute Windows batch command" build step before the "TestComplete Test" build step in one of our Jenkins jobs but my build hangs when trying to execute that new build step and the Report Generator process does not start. It seems to be some kind of permission issue. If I login to the slave via Remote Desktop Connection it is possible to launch the Report Generator using the same command.

 

Any ideas how to solve this?    

 

  • The support engineer reproduced the problem with launching Report Generator using an "Execute Windows batch command" build step. The problem is that is creates a "headless session". When the TestComplete plugin creates a session for the test, it is another session, i.e. the Report Generator and TestComplete are launched in different sessions. 

    We successfully used a different approach to make the Report Generator and TestComplete run in the same session. We added script to our TestComplete project (see below) to execute Report Generator as the very first step. 

     

    We added the following to our Python scripts: 

     

    cmd = '\"C:\\Program Files (x86)\\SmartBear\\TestExecute 14\\x64\\Bin\\ReportGenerator.exe\" --desktop SE.SBO.WorkStation.exe --generate-report C:\\dev --storage-directory C:\\dev'
    shell = Sys.OleObject['WScript.Shell']
    shell.Run(cmd, 1, False)

    This works well for us.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Just a wild guess - do you have an active user desktop session on the Jenkins slave when Jenkins tries to start Report Generator?

     

    P.S. Why not to continue to work with Support and ask they as well?

     

    • malj's avatar
      malj
      Contributor

      The result is the same whether I am logged-in to the slave via Remote Desktop Connection or not during the build.

       

      I am still working on this with support but it is taking a lot of time. Usually I can get quicker response here. 

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Sorry, but no other good ideas at the moment... :(

        Another reincarnation of my question, just to be on the safe side:

        Is Jenkins slave that starts Report Generator runs as an application but not as a service (which is the default)?