Forum Discussion

praveenskg's avatar
praveenskg
Contributor
2 years ago

run session creator from github actions workflow yml file

i am working on CICD setup using github actions yml file, i dont see any example for running session creator cmd using yml. If some one who had prior experience in implementing can you share sample yml file or cmd to run session creator. Also would like to know if there any other alternate solution for session creator to create interactive user session when running from github action workflow

  • AlexKaras - i am able to execute the command line for session creator and it works. when i convert the same command line to powershell for github action workflow yml, it is not working. 

    below is the command i am using 

    Start-Process -FilePath 'C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\SessionCreator.exe' -ArgumentList "RunTest /UserName:xxx\usernmae /Password:xxxx /UseActiveSession /ProjectPath:"C:\pathtoproj\project.pjs" /ExportLog:report.mht /exit" -wait

    i am not sure if i am missing anything

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      I think that there are not escaped quotes in your command line.

      "C:\pathtoproj\project.pjs" must be either in doubled (or tripled?) quotes (i.e. ""C:\pathtoproj\project.pjs"") or in single quotes (i.e. 'C:\pathtoproj\project.pjs')

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    In PowerShell script, try using the following command

    & 'C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\SessionCreator.exe' RunTest /UserName:xxx /password:xxx /UseActiveSession /ScreenResolution:"1920*1080" /ProjectPath:"C:\Sandbox\TestComplete\ALS\ALS.pjs" /ExportLog:report.mht

     Note the use of the ampersand at the beginning of the line.

    • praveenskg's avatar
      praveenskg
      Contributor
      I am able to run this powershell it works on the machine. However i am not able to use the exact cmd in yml file. It is not allowing '&'.
  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Is it possible to create a PowerShell script file (script.ps1) with the command I provided, and then call

    Powershell.exe -File C:\Temp\script.ps1

     from your yml file?

    • praveenskg's avatar
      praveenskg
      Contributor
      Yes i am able to keep it in .ps1 file and run it from yaml. Thank you!!