Contributions
Re: Sharing NameMapping from one project to another in the same project suite won't work
Hi 8kit and thanks for the reply. I did useright-click the project and choose Add>Existing Item but didn't work as expected. I wonder if that could happen for a different reason I edited my NameMapping file. I did change (drag and drop) things not only in the Aliases bit but also in the System bit. I wouldn't expect that not to happen as it allowed.498Views0likes1CommentSharing NameMapping from one project to another in the same project suite won't work
Hi, I have a project suite and have a few projects inside, in the first project I have a NameMapping that is working fine, I've shared this NameMapping to another project, and what a wonder it won't recognize the objects the original NameMapping does. it does recognizes the very high application level in the name mapping but won't recognize any objects which are down the hierarchy. by the way, when sharing scripts or feature files I don't see any issues, I also tried adding a new NameMapping to the other project and then merging it with the original one, but that didn't work the same outcome. Any idea why? An update: When I worked on the NameMapping I changed a few things in the Mapped Objects section (moved objects position etc.) and now when sharing the NameMapping file it looks like it changed a few of the values and therefore cannot trace the tree hierarchy. Thanks, Ofer618Views0likes4CommentsRe: Passing Test Parameters via Command Line won't work
Hi, Just for the sake of anyone else get into this problem, here is the solution: def processCommandLineArgument(VersionFromTheApp): #iterate through all parameters sent via command line set in Jenkins file for i in range (0, BuiltIn.ParamCount()): #verify any of tha parameters contain a string called LatestSprintVersionNumber if "LatestSprintVersionNumber" in aqConvert.VarToStr(BuiltIn.ParamStr(i)): #split the /LatestSprintVersionNumber=x.x.xxxx.xx parameter into 2 bits ('/' 'and LatestSprintVersionNumber=x.x.xxxx.xx') items = aqConvert.VarToStr(BuiltIn.ParamStr(i)).split("/") #split the LatestSprintVersionNumber=x.x.xxxx.xx parameter into 2 bits ('LatestSprintVersionNumber and 'x.x.xxxx.xx') items = aqConvert.VarToStr(items[1]).split("=") #check if the first item in position [0] in items array equals to 'LatestSprintVersionNumber' if aqConvert.VarToStr(items[0]) == "LatestSprintVersionNumber": #check if the value appears in the app in the help-->about window equals to the second item in position [1] in items array if VersionFromTheApp == aqConvert.VarToStr(items[1]): Log.Message("The latest sprint version passed via the command line is " + aqConvert.VarToStr(items[1])) Log.Message("The installed version is " + VersionFromTheApp) Log.Message("Both, latest sprint build version and the installed one are the same") else: Log.Message("The latest sprint version passed via the command line is " + aqConvert.VarToStr(items[1])) Log.Message("The installed version is " + VersionFromTheApp) Log.Message("The latest sprint build version and the installed one are not the same")773Views0likes0CommentsRe: Passing Test Parameters via Command Line won't work
Now when running this code on the Jenkins pipeline I get an error: 13:21:15 The TestExecute process has exited with the following code: 2. 13:21:15 IndexError: list index out of range this is my code and I can't understand why it is going out of range: This is my command line, the argument I am passing is in bold bat "SessionCreator.exe RunTest /UserName:%USERNAME% /UseActiveSession /Password:%PASSWORD% /ProjectPath:${env.WORKSPACE}\\DA_Automation_Test_Framework.pjs /p:AutomationSharedResources /arg:LatestSprintVersionNumber=$LatestSprintVersionNumber /ExportLog:${env.WORKSPACE}\\reports\\HTML\\report.html /ExportSummary:${env.WORKSPACE}\\reports\\report.xml" And this is the code I am trying to use when running the TE def processCommandLineArgument(): for i in range (0, BuiltIn.ParamCount() + 1): items = BuiltIn.ParamStr(i).split(":") items = items[1].split("=") if items[0] == "LatestSprintVersionNumber": Log.Message("The latest sprint version passed via the command line is " + items[1]) return items[1] Can you please tell me where do I go wrong? Any idea what is the problem? Thanks, Ofer817Views0likes1CommentRe: Passing Test Parameters via Command Line won't work
Hi Marsha, I managed to figure out what was the problem. in the examples on the URL you sent they count the number of parameters and then for loop through them. it looks like the loop should go 0 toParamCount() + 1 and not 0 toParamCount(), if I useParamCount() + 1 I get to see the desired value def processCommandLineArguments(): for i in range (0, BuiltIn.ParamCount() + 1): Log.Message(BuiltIn.ParamStr(i)) #processCommandLineArgument(BuiltIn.ParamStr(i)) processCommandLineArgument("/arg:LatestSprintVersionNumber=6.3") def processCommandLineArgument(arg): items = arg.split("=") Log.Message(items[0]) Log.Message(items[1])835Views0likes0CommentsPassing Test Parameters via Command Line won't work
Hi, I'm trying to launch test complete and pass a parameter via command line but, following the instructions from here -https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/custom-parameters.htmlit fails This is my command line -TestComplete.exe "C:\Testcomplete\DA_Automation_Test_Framework.pjs" /r /p:PlayGroundProject /u:Unit1 /rt:Main /LatestSprintVersionNumber=ppp I also tried /arg: (As I work with sessioncreator), I tried pv and psv. nothing is working. In TC report I can see all the parameters except the one I want which is/LatestSprintVersionNumber=ppp We are triggering TE to execute the code via jenkins file and I'm not sure what should I put in the command line. the parameter I want to transfer is being retrieved by jenkins, I want to take it and pass it to the executable code via the command line. If anyone knows why please let me know? Cheers, OferSolved848Views0likes4CommentsRe: Update Test Execution version using command line (via Jenkins) or in any other way
Hi Marsha, Is there way to run the installer as admin. we are struggling by passing the UAC approval, we tried using this command like which doesn't seems to work -bat "runas /user:Administator TestExecute1481.exe -SilentInstall", it still saks for user name and password. Is there a way to by pass the AUC via command like? Thanks, Ofer590Views0likes3CommentsRe: Update Test Execution version using command line (via Jenkins) or in any other way
Hi, Ok, I've managed to do that using this commanline -powershell "Invoke-WebRequest -OutFile c:\\temp\\TestExecute1481.exe -Uri https://my.smartbear.com/downloads/TestExecute1481.exe" Now we have another issue, while installing the TE on the vm it seems to log off, is it because of something to do with the installer or is it more likely to be related to Azure? that happened when i tried to run it manually and also via Jenkins. Thanks, Ofer1.5KViews2likes6Comments