How to read the error code in console output from Jenkins pipeline script
Hello, I have configured my jenkins pipeline with Declarative pipeline script as shown below. Currently I am able to send the emails when the build is unstable. But there are some other situations where the build fails due to testExecute launch error on the remote machine. And even for that failure it is sending emails to everyone in the recipient list. I want to check if the error code is -1 then send the email only to selected emails list else send to everyone. pipeline{ agent {label "windows"} stages { stage('Test complete'){ steps { Step1 } } } post{ unstable { // echo "This will run when test unstable" emailext ( subject: "EA smoke test results in Prod", body: "Please click below to access the test results \n" + env.BUILD_URL+"TestComplete/", to: "vinod@xxx.com", from: "donotreply@cloudbees.com") } } } console output with the error exit code to read in the above pipeline script and if that's true then send the emails to only selected people. [TestComplete] Test runner exit code: -1. [TestComplete] [WARNING] Error: The user did not log in using the SmartBear account or did not pass the accesskey in the command-line arguments. TestComplete will be closed.The user did not log in using the SmartBear account or did not pass the accesskey in the command-line arguments. TestComplete will be closed.. [TestComplete] [WARNING] Unable to find the log file "1677263408853.tclogx". [TestComplete] [WARNING] Unable to find the log file "1677263408853.htmlx". [TestComplete] [WARNING] Unable to find the log file "1677263408853.mht". [TestComplete] [WARNING] Errors occurred during the test execution. [TestComplete] Marking the build as UNSTABLE. [TestComplete] [WARNING] Unable to publish test results (xml data is empty). [TestComplete] The test execution finished (Prod_SmokeTest/CORE_Prod_Smoke).5.8KViews0likes13CommentsHow to read .mht file attachment created by TC? Microsoft Edge displays blank
I have setup Issue Tracking in TC so I can create a bug item in AzureDevOps. Bug Item is created with an attachment in .mht format that should show the failed test. I have Edge and .mht file opens but is blank. What is the best way to read .mht file created by TC?Solved5.4KViews0likes6CommentsSend Test Results to Azure DevOps W/O pipeline setup?
Hello all, Is it possible to link TestComplete Test Cases to Azure DevOps without the Test Adapter and pipeline integration? In other words, I want to run the tests from TestComplete or TestExecute with the Execution Plan instead of running them as part of the build pipeline and link the test results to Azure DevOps for review by others? If I try to link a test case via the Execution Plan I am unable to log into my DevOps repository, This could be the only issue I need to resolve. If the Test Adapter is required and this can only be done via an Azure DevOps pipeline build process I will need to wait until we have other items worked out and in placed. Thanks everyone, Scott H.Solved3.8KViews0likes24CommentsIntegration with Azure DevOps failed
Hello, I get the following error when I try to connect to Azure DevOps in order to get test case ids. Update your browser Your browser is not supported or up-to-date. Try updating it, or else download and install the latest version of Microsoft Edge. You could also try to access https://aka.ms/mysecurityinfo from another device. I am using TestComplete Version: 15.30.355.7 x64 on Windows Server 2019 machine I guess the pop-up window uses Internet Explorer. I installed MS Edge, and set it as default browser, also uninstalled Internet Explorer but it did not help This message appears after I successfully authenticate with username and password. Is there any way in TestComplete to configure to use another browser to authenticate to Azure DevOps, not Internet Explorer?Solved3.4KViews0likes6CommentsDesign For Automated testing of a Grid template UI usnig ReadyAPI
##URGENT###Hi Guys, My team is looking to automate our applicationGrid Based Application. I am very new to automation and the requirement is to build a test-suite in ReadyAPI . The Requirement is to validate the Stored Procs/ Various services that run behind to generate data and validate it against a query that gets the same data using query . As a QA i have very minimal knowledge of SQL and to be able to do something requires a humongous effort . Question : Can someone please help suggest any framework design in mind for such validation or any other ideas for example if we could take the data from the website and validate it against the query would it make sense . Please suggest and share your expertise .2.8KViews0likes7CommentsComparing Json node values against each other
Hi Team, I have query regarding the json values comparison. I have request say Request-1 and gives response as Response-1. Gives 10 node values One more request say Request-2 and gives response as Respnse-2. Gives 10 node values I need to compare both response values of all the node values which are common to both. Kindly let me know. I added smart assertion to do comparison, but if node value changes from 10 to 11 the fails to compare or may miss to validate. Thanks, Vivek KulkarniSolved2.5KViews0likes8CommentsAzure DevOps Integration - Re-running Failed Test
Hi Community, Did anyone manage to find a way how to re-run failed tests using AzureDevops? We currently are facing the problem that when a test fails inside a job (ex: a job has 5 tests, 4 passed but 1 failed), when rerunning failed jobs, all the 5 tests are re-executed. We would like to run only the specific test case which failed rather than the full job. Appreciate your feedback :)!2.3KViews0likes6CommentsTestComplete with Zephyr Scale
In this post, we are going to talk about SmartBear’s UI testing tool, TestComplete, and writing the results to Zephyr Scale in an automated fashion. When we think about using TestComplete with any test management tool, it can really be accomplished in two ways: Natively inside TestComplete or integrating with some CI-CD system. When we are using Zephyr Scale, both ways will utilize the Zephyr Scale REST API. When we link to Zephyr Scale natively from TestComplete, it is a script heavy approach. An example of that can be found here. Today we are going to go into detail about using TestComplete, with a CI-CD system, and sending the results to Zephyr Scale. Now let’s talk about automating this process. The most common way to automate triggering TestComplete tests is through one if its many integrations. TestComplete can integrate to any CI-CD system as it has Command Line options, REST API options, and many native integrations like Azure Dev Ops or Jenkins. The use of a CI-CD system makes managing the executions at scale much easier. The general approach to this workflow would be a two-stage pipeline something like: node { stage('Run UI Tests') { // Run the UI Tests using TestComplete stage('Pass Results') { //Pass Results to Zephyr Scale } } First, we trigger TestComplete to execute our tests somewhere. This could be a local machine or a cloud computer, anywhere, and we store the test results in a relative location. Next, we use a batch file (or alike) to take the results from that relative location, send them to Zephyr Scale. When executing TestComplete tests, there are easy ways to write the results to a specific location in an automated fashion. We will look at options through the CLI as well as what some of the native integrations offer. Starting with the TestComplete CLI, the /ExportSummary:File_Name flag will generate a summary report for the test runs, and save it to a fully qualified or relative path in Junit-XML structure. At a basic level we need this: TestComplete.exe <ProjectSuite Location> [optional-arguments] So something like this: TestComplete.exe "C:\Work\My Projects\MySuite.pjs" /r /ExportSummary:C:\Reports\Results.xml /e The /ExportSummary flag can be stored in a relative or fully qualified directory. We could also use one of TestComplete’s many native integrations, like Jenkins and specify in the settings where to output results: Now that our TestComplete tests are executing, and the results are writing to a relative location we are ready for stage 2 of the pipeline, sending the results to Zephyr Scale. So now let’s send our results to Zephyr Scale. I think the easiest option is to use the Zephyr Scale API, and the Auto-Create Test Case option to true. The command below is a replica of what you would use in a batch file script in the pipeline. curl -H "Authorization: Bearer Zephyr-Scale-Token-Here" -F file= Relative-Location-of-Report-Here\report.xml;type=application/xml "https://api.zephyrscale.smartbear.com/v2/automations/executions/junit?projectKey=Project-Key-Here&autoCreateTestCases=true" After you modify the API token, relative location, and project key you are good to run the pipeline. The pipeline should look something like this: After we run the pipeline let’s jump into Jira to find to confirm the results are populating. Even with execution data: Also, with transactional data to analyze the failed test steps:2.1KViews1like0Comments