Session Creator commandline arguments goes lenghty
In my current setup to execute tests from CICD on dedicated VDi machine, we are using session creator utility. I am able to run it using powershell command. However when it comes to maintenance the command line to trigger session creator utility with all the arguments it becomes very lengthy and i don't have success in concatenating all the arguments into one and use it in command line.
& $TC_SessionCreatorPath RunTest /UserName:$TestAccountUser /Password:$TestAccountPassword /UseActiveSession /ScreenResolution:$TC_ScreenResolution /ProjectPath:$TC_ProjectPath /p:$TC_ProjectName /tags:$Tags /arg:/pv:browser=$TC_Browser /arg:/pv:update_zephyr=$Zephyr_flag /arg:/pv:zephyrscale_token=$Zephyr_Token /AccessKey:$AccessKey
there are still lot more arguments i need to include in the commadline. My ask is how do i put all the arguments into a variable and pass the variable in the command line after 'RunTest'
I still don't quite understand the purpose. However, why not create a batch file or PowerShell script file that has all the required parameters and variables, which you can modify. You can also have variables defined in your CI/CD too.
It's possible to merge all of these,
/arg:/pv:browser=$TC_Browser
/arg:/pv:update_zephyr=$Zephyr_flag
/arg:/pv:zephyrscale_token=$Zephyr_Tokeninto one variable, but you will then require a function to split this into individual sections.
Either way, it's going to be lengthy.