Contributions
Re: Publish TestResult Azure DevOps
I guess my project is not running at all.... normally in the commandline I would use /r or use the tags... but now how to start running the .pjs file? It might be by tagname, but then how to add the tagname to the VsTest task in azure release pipeline.. Or is there a way to set the project itself to start when openned.... I search all the documentations, but so far no answers.3.2KViews0likes1CommentPublish TestResult Azure DevOps
Hi, I installed TestComplete on my Release Pipeline. But Publish TestResult from VsTest is continously returning the following message: ##[warning]No***resultfilesmatching**/TEST-*.trxwerefound. Even if I change it to **/*.trx it seems that there is no match... How can I solve this?Solved3.3KViews0likes3CommentsRe: Passing a parameter from Azure/devops into TestComplete
Ok, I have the answer from: Thank you for reaching out to us. Currently, it's not possible to control what parameters TestComplete will be launched with when using the Azure DevOps integration. So, I suggest that you pass the parameter to the agent machine using a scripting task (CMD or Powershell). For example, you can create a file and store the URL there or set an environment variable that will hold the value. Then, you need to modify the test accordingly so that the URL is ready from the file or obtained from the environment variable. With this answer from SmartBear self in mind, I created an xml file in the directory: <?xml version="1.0"?> -<configurations> -<settings> -<setting> <url>#{EnvironmentUrl}#</url> </setting> </settings> </configurations> The #{..}# are used to replace the url as token from Azure Pipeline. Then i wrote this script: function RetrieveUrlFromDeployment() { // Create a COM object var configFileXML = Sys.OleObject("Msxml2.DOMDocument.6.0"); configFileXML.async = false; // Load data from a XML file configFileXML.load("../Project/ConfigTestComplete.xml"); // Set error message when failure if(configFileXML.parseError.errorCode != 0) { var errorMessage = "Reason:\t" + configFileXML.parseError.reason + "\n" + "Line:\t" + aqConvert.VarToStr(configFileXML.parseError.line) + "\n" + "Pos:\t" + aqConvert.VarToStr(configFileXML.parseError.linePos) + "\n" + "Source:\t" + configFileXML.parseError.srcText; // Post an error to the log and exit Log.Error("Cannot parse the document.", errorMessage); return; } // Use an XPath expression to obtain a list of "url" nodes var nodes = configFileXML.selectNodes("url"); // Set Project variable to environment url. Project.Variables.url_loginscreen = nodes.context.text; } This will result that TC will be able to get indirectly receive a url from Azure pipeline.2.5KViews1like0CommentsRe: Passing a parameter from Azure/devops into TestComplete
I Thought this would be solved, but VsTest is not allowing me to put in a parameter. So how can I pass the environment url from the deployment from the pipeline. within the TestComplete.exe I am able to do it by commandline: for example: "C:\Program Files (x86)\SmartBear\TestComplete 14\x64\Bin\TestComplete.exe" "D:\Project\project.pjs" /r "env=https://projectenvironment.dev.project.com/test" This works fine with the code written above. But now, I want it running through the pipeline.... how to put through the url??2.5KViews0likes1CommentRe: Passing a parameter from Azure/devops into TestComplete
i found a solution. First, I entered an overriding paramter within the pipeline. Then, I found a script to retrieve parameters from the commandline. function ProcessCommandLine() { var i; for (i = 1; i <= BuiltIn.ParamCount(); i++) { ProcessCommandLineArgument(BuiltIn.ParamStr(i)); } } function ProcessCommandLineArgument(arg) { var items; items = arg.split("="); if (items.length != 2) { return; } switch (aqString.ToLower(aqString.Trim(items[0]))) { case "env": Log.Message("The 'env' argument is found! The value is '" + aqString.Trim(items[1]) + "'"); var url_deployment = items[1]; Project.Variables.url_loginscreen = url_deployment; break; } } now my persistent Variable url_loginscreen is changed and ready to be used with the given parameter from the commandline.2.6KViews1like2CommentsRe: Passing a parameter from Azure/devops into TestComplete
ThanksMarsha_R for your reply. If a read the parent item of this article, it says that using TcItem is or will become obsolete. I would rather use the Test Adapter, but i still dont know how to pass parameters through from azure.2.6KViews0likes3CommentsPassing a parameter from Azure/devops into TestComplete
Hi, i am recently start using TestComplete. I wonder how can I use paramters from a VsTest (e.g. Override Parameters) in order to pass a url from the pipeline into TestComplete as a parameter. Looking forward to your help!Solved2.7KViews0likes5Comments