jenkins pipeline catch the exit code 0
Hello, I need you're help, i am using Testcomplete 15 and TestExecute 15 with jenkins With jenkins pipeline def RunTest(String TestInfos) { try { testcompletetest actionOnErrors: 'MAKE_FAILED', actionOnWarnings: 'MAKE_UNSTABLE', credentialsId: 'VEGA-TEST', executorType: 'TE', launchType: 'lcItem', project: 'Macro_Standard_Beta', sessionScreenResolution: '1920x1080', suite: 'Alocpro\\Alocpro.pjs', useTCService: true, test: "$TestInfos" stageResult = 'SUCCESS' echo "< Build SUCESS >" } catch (Exception e) { catchError(stageResult: 'FAILURE') { sh "exit 1" } echo "< Build Failed >" } } pipeline { agent { label 'Srv-Test01' } options { timeout(time: 1, unit: 'HOURS') } stages { stage('Reset BDD Beta') { steps { script{ RunTest('Beta_02_Reset_BDD') } } } stage('CartesCarburant') { steps { RunTest('Avancee1|Beta_2_01_CartesCarburant1') } } stage('Contentieux') { steps { RunTest('Avancee1|Beta_2_02_Contentieux') } } stage('Contraintes') { steps { RunTest('Avancee1|Beta_2_03_Contraintes') } } /* stage('CRM') { steps { RunTest('Avancee1|Beta_2_04_CRM') } } stage('EtatStatistique') { steps { RunTest('Avancee1|Beta_2_05_1_EtatStatistique') } }*/ stage('Financement') { steps { RunTest('Avancee1|Beta_2_06_Financement') } } stage('Comptabilite') { steps { RunTest('Avancee1|Beta_2_07_0_Comptabilite') } } stage('Assurance') { steps { RunTest('Avancee1|Beta_2_08_Assurance') } } stage('GestionDesPetroliers') { steps { RunTest('Avancee1|Beta_2_09_GestionDesPetroliers') } } stage('Prestation') { steps { RunTest('Avancee1|Beta_2_10_Prestation') } } } post { failure { emailext body: '''$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS : \n $BUILD_LOG maxLines=8000, escapeHtml=true \n \n Check console output at $BUILD_URL to view the results.''', recipientProviders: [brokenBuildSuspects()], from: '##', subject: 'Build failed in jenkins : $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!', to: '##', attachLog: true } unstable { emailext body: '''Build unstable - $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS : unstable\n $BUILD_LOG maxLines=8000, escapeHtml=true \n \n Check console output at $BUILD_URL to view the results.''', recipientProviders: [brokenBuildSuspects()], from: '##', subject: 'Build instable in jenkins : $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!', to: '##', attachLog: true } fixed { emailext body: '''$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS : Back to normal !\n Check console output at $BUILD_URL to view the results.''', recipientProviders: [brokenBuildSuspects()], from: '##', subject: 'Build back to normal : $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!', to: '##' } } } The jenkinspipeline works, but in my jenkins view i dont have my stage in red when it failed. What i would like to do is to catch the exit code =! 0 and setstageResult = 'FAILURE' But the other stages needs to continue even if one of them failed there are independent I have triedcatchError steps but this is not really what i want. In this exemple the try catch does nothing even if a test crashed because of the exit code which seems not to be handled in jenkins this way The error i did in this scenario is in purpose to test the exitcode I have linked a log of the lastest execution i did >logs jenkins.txt Is there a way to catch the exitcode in jenkins? Thanks6.1KViews0likes0Comments[TechCorner Challenge #1] Passing custom command-line arguments as test parameter
Hi Community! This resource we are creating together has gained so much value over the years. Tons of helpful content can be found in the TestComplete Community thanks to all of you! I propose that we take it to the next level by adding even more useful things to the TechCorner tag - a tag where we keep your tech articles, script examples, use cases, etc. Here's your chance to share expertise and contribute. Task:Write a script that will take the value of a custom argument from the TC command line and use this value to run a parameterized test. Difficulty: For example, imagine that you have a web test that takes the name of the browser as a parameter. The script should check the command line TC was launched with, find the /BrowserName parameter, read its value, and pass it to the web test as a parameter. If the command line contains /BrowserName=chrome, the web test should launch Chrome; for /BrowserName=firefox the web test should launch Firefox, etc. Good luck!Solved5.3KViews3likes7CommentsTestComplete command line problems
I have written come python scripts to call TestComplete as a part of the CI system I am building. I then installed Test Complete on a remote machine and am having problems understanding why TestComplete is trying to open TestComplete.exe. Is this a bug or am I just missing something obivious? I never encourtered this on my local machine.Solved4.2KViews0likes14CommentsTestExecute 10 - Can't run /SilentMode from CMD
I created a very simple project that opens Windows Calculator and closes it. It is bound to Source Control Perforce P4V. I can run it in CMD without /SilentMode, but not with /SilentMode. When I call TestExecute, it doesn't load in Task Manager Processes. Am I missing something? [Please see attached screenshot.] The project runs fine in TC10 and FinalBuilder7.Solved4.1KViews0likes5CommentsOpen file Security - Warning Popup
Hi, How can we handle these "Open file Security - Warning" popups in Testcomplete14. How can I click on the Run button? While accessing the desktop application I am getting this popup. I can able to map those buttons 'Run' and 'Cancel' but during the Test Execution the script is failing.Solved4KViews0likes11Comments.exe file run in test execute
Hi, Is it possible to convert the project suite(with project scripts, keywords) into binary executable? And run in Test Execute Tool. Since, Test execute support file format -> .pjs and .mds. Does the Extensions(has installed with .net framework) will run .exe file? (Note: Test Execute providing .Net Framework->so, Can we run .exe file)Solved3.9KViews0likes14CommentsStarting Testexecute with powershell hanging process windows update 1803
Hey, I encounter a problem using testexecute after an update of windows Problem: The process TestExeute.exe keeps runnning after the test has finished. The powershell script that is waiting for the process to finish never continues and gets stuck. The test is started on a windows 10 (build 17134) machine with TestExecute 11 on itusing the following command: Start-Process "C:\Program Files (x86)\SmartBear\TestExecute 11\Bin\TestExecute.exe" -ArgumentList '"C:\PAthToTestPRoject\TestProject TEST.pjs" /project:"TestProject TEST" /test:"Script|TestCentrum|TestCentrum_Main" /r /e /SilentMode /ForceConversion' This script has worked until we installed the windows update 1803. After rebooting the virtual machine and starting an instance of testcomplete or testexecute a edge browser would start. I followed the advice on the forum to not enable support for microsoft store apps. the Edge browser didn't start anymore but the TestExecute process still didn't always close at the end of the test. What I have found so far: I found a process cftmon.exe that when I analyse the wait chain it's waiting for the testeExecute proces. in the testexecute proces it says it's waiting for cftmon.exe. when I kill the cftmon.exe process it restarts immidiatly and the testexecute process is closed.3.3KViews0likes7CommentsIntegrate TestComplete Tests into Gitlab CI/CD Pipeline
I am trying to integrate my TestComplete Tests into the Gitlab CI/CD Pipeline, using the Gitlab Runner which runs tests on my remote machine. I understand that in order for TestComplete tests to be executed, an active user session is required to be present. I tried to use the SessionCreater Utility to circumvent this problem, yet I can't seem to get my tests to run on Gitlab. Does anyone have any experiences with integrating TestComplete tests into the Gitlab CI/CD Pipeline using the Gitlab Runner? Is it even possible to do so? Thank you!Solved3.2KViews0likes3CommentsTest Execute Summary Report Incomplete
Hi We're currently using Test Execute to run our smoke tests everyday. We've use the /ExportSummary argument on the CLI for Test Execute and noticed that only the first KWT on a test item collection is being written in the Export Summary: i.e. if we call "NAT|NA"LeadManager" we should be running 5 KWTs but the export summary only says that it ran 1 test, and only the failure of the first of the 5 KWTs is considered for the results. According to the definition of the CLI argument: " /ExportSummary:file_name(or/es:file_name) - Commands TestExecute to generate a Summary report for the current test run and to save it in the JUnit report format to the XML file that thefile_nameparameter specifies. The report will include the total number of run tests, the number of passed tests and the number of failed tests." Are we missing something or is this actually a bug for Test Execute?Solved3.1KViews0likes10CommentsRunning TestComplete on Jenkins through Command Line
Hello, I'm having an issue trying to execute a TestComplete suite on Jenkins through a Windows Batch Command build. However, when simply running only the TestComplete or TestExecute execution files, Jenkins hangs once it reaches that point and never finishes and I have to end up aborting the test all together. I understand that there is a TestComplete plugin and it is available to me and the suite works perfectly fine with that plugin, but the purpose of my project requires an execution through command line. I have also tried running the long and extensive command line argument: ("C:\Program Files (x86)\SmartBear\TestExecute 12\bin\TestCompleteService12.exe" //LogonAndExecute //lDomain: "" //lName: "jenkins" //lPassword: ******** //lTimeout: "-1"....) and that also fails to work. I have verified the service is running on that slave machine and that the license server is available. Thank you.3KViews0likes5Comments