jenkinsci / uipath-automation-package-plugin

A Jenkins plugin for packaging UiPath project and deploying it to UiPath Orchestrator
https://plugins.jenkins.io/uipath-automation-package/
Other
24 stars 28 forks source link

UiPathTest Not able to Write Test Result even if test set executed successfully on Orchestrator #110

Open SATMAN778 opened 2 years ago

SATMAN778 commented 2 years ago

Jenkins and plugins versions report

Jenkins: 2.346.2 OS: Windows 11 - 10.0

ace-editor:1.1 antisamy-markup-formatter:2.7 apache-httpcomponents-client-4-api:4.5.13-1.0 bootstrap5-api:5.1.3-7 bouncycastle-api:2.26 branch-api:2.1046.v0ca_37783ecc5 build-timeout:1.21 caffeine-api:2.9.3-65.v6a_47d0f4d1fe checks-api:1.7.4 cloudbees-folder:6.729.v2b_9d1a_74d673 command-launcher:84.v4a_97f2027398 credentials:1139.veb_9579fca33b credentials-binding:523.vd859a_4b_122e6 display-url-api:2.3.6 durable-task:496.va67c6f9eefa7 echarts-api:5.3.3-1 email-ext:2.91 font-awesome-api:6.1.1-1 git:4.11.3 git-client:3.11.0 git-server:1.11 github:1.34.4 github-api:1.303-400.v35c2d8258028 github-branch-source:1677.v731f745ea_0cf gradle:1.39.4 handlebars:3.0.8 jackson2-api:2.13.3-285.vc03c0256d517 jakarta-activation-api:2.0.0-3 jakarta-mail-api:2.0.0-6 javax-activation-api:1.2.0-4 javax-mail-api:1.6.2-7 jaxb:2.3.6-1 jdk-tool:1.5 jjwt-api:0.11.5-77.v646c772fddb_0 jquery3-api:3.6.0-4 jsch:0.1.55.2 junit:1119.1121.vc43d0fc45561 ldap:2.10 localization-support:1.1 mailer:435.v79ef3972b_5c7 matrix-auth:3.1.5 matrix-project:772.v494f19991984 mina-sshd-api-common:2.8.0-30.vf9df64641cb_d mina-sshd-api-core:2.8.0-30.vf9df64641cb_d momentjs:1.1.1 okhttp-api:4.9.3-105.vb96869f8ac3a pam-auth:1.8 pipeline-build-step:2.18 pipeline-github-lib:38.v445716eaedda pipeline-graph-analysis:195.v5812d95a_a_2f9 pipeline-groovy-lib:598.vcd66b_a_336510 pipeline-input-step:449.v77f0e8b_845c4 pipeline-milestone-step:101.vd572fef9d926 pipeline-model-api:2.2114.v2654ca_721309 pipeline-model-definition:2.2114.v2654ca_721309 pipeline-model-extensions:2.2114.v2654ca_721309 pipeline-rest-api:2.24 pipeline-stage-step:293.v200037eefcd5 pipeline-stage-tags-metadata:2.2114.v2654ca_721309 pipeline-stage-view:2.24 plain-credentials:1.8 plugin-util-api:2.17.0 popper2-api:2.11.5-2 resource-disposer:0.19 scm-api:616.ve67136f6c77d script-security:1175.v4b_d517d6db_f0 snakeyaml-api:1.30.2-76.vc104f7ce9870 ssh-credentials:291.v8211e4f8efb_c ssh-slaves:1.834.v622da_57f702c sshd:3.242.va_db_9da_b_26a_c3 structs:324.va_f5d6774f3a_d timestamper:1.18 token-macro:293.v283932a_0a_b_49 trilead-api:1.67.vc3938a_35172f uipath-automation-package:2.9.2 variant:1.4 workflow-aggregator:590.v6a_d052e5a_a_b_5 workflow-api:1188.v0016b_4f29881 workflow-basic-steps:980.v82219a_ed188e workflow-cps:2759.v87459c4eeaca workflow-durable-task-step:1199.v02b_9244f8064 workflow-job:1207.ve6191ff089f8 workflow-multibranch:716.vc692ae52371b workflow-scm-step:400.v6b_89a1317c9a workflow-step-api:639.v6eca_cd8c04aa workflow-support:833.va1c71061486b ws-cleanup:0.42

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows 10 & Windows 11

Reproduction steps

TRY Running UiPathTest

// Test Stages stage('Perform Tests') { steps { echo 'Testing the workflow...' UiPathTest ( testTarget: [$class: 'TestSetEntry', testSet: "UiPathJenkinsDevOps_Tests"], orchestratorAddress: "${UIPATH_ORCH_URL}", orchestratorTenant: "${UIPATH_ORCH_TENANT_NAME}", folderName: "${UIPATH_ORCH_FOLDER_NAME}", timeout: 10000, traceLevel: 'None', testResultsOutputPath: "result.xml", //credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: "credentialsId"] credentials: Token(accountName: "${UIPATH_ORCH_LOGICAL_NAME}", credentialsId: 'APIUserKey'), parametersFilePath: '' ) } }

Expected Results

  1. The executed test set returns the test result as junit.xml. relative to the Jenkins workspace directory (e.g. result.xml).
  2. Results are not produced as output even if Tescase is successful on the orchestrator.

Actual Results

`Started by user Satish

git.exe rev-parse --resolve-git-dir C:\ProgramData\Jenkins.jenkins\caches\git-69751726b18e1b829b330605e8af8b08.git # timeout=10 Setting origin to https://github.com/rpabotsworld/UiPathJenkinsDevOps git.exe config remote.origin.url https://github.com/rpabotsworld/UiPathJenkinsDevOps # timeout=10 Fetching origin... Fetching upstream changes from origin git.exe --version # timeout=10 git --version # 'git version 2.37.1.windows.1' git.exe config --get remote.origin.url # timeout=10 using GIT_ASKPASS to set credentials git.exe fetch --tags --force --progress -- origin +refs/heads/:refs/remotes/origin/ # timeout=10 Seen branch in repository origin/development Seen branch in repository origin/master Seen 2 remote branches Obtained Jenkinsfile from 4c0b121bb80a0081e212f4108f5539b246ba7c2a [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace [Pipeline] { [Pipeline] withEnv [Pipeline] { [Pipeline] timeout Timeout set to expire in 1 hr 20 min [Pipeline] { [Pipeline] stage [Pipeline] { (Preparing) [Pipeline] echo Jenkins Home C:\ProgramData\Jenkins.jenkins [Pipeline] echo Jenkins URL http://localhost:8080/ [Pipeline] echo Jenkins JOB Number 9 [Pipeline] echo Jenkins JOB Name UiPathJenkinsDevOps/development [Pipeline] echo GitHub BranchName development [Pipeline] checkout Selected Git installation does not exist. Using Default The recommended git tool is: NONE using credential fa523cc9-a3f8-4e92-a2ea-b8093f18ea71 Cloning the remote Git repository Cloning with configured refspecs honoured and without tags Cloning repository https://github.com/rpabotsworld/UiPathJenkinsDevOps git.exe init C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace # timeout=10 Fetching upstream changes from https://github.com/rpabotsworld/UiPathJenkinsDevOps git.exe --version # timeout=10 git --version # 'git version 2.37.1.windows.1' using GIT_ASKPASS to set credentials git.exe fetch --no-tags --force --progress -- https://github.com/rpabotsworld/UiPathJenkinsDevOps +refs/heads/:refs/remotes/origin/ # timeout=10 git.exe config remote.origin.url https://github.com/rpabotsworld/UiPathJenkinsDevOps # timeout=10 git.exe config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10 Avoid second fetch Checking out Revision 4c0b121bb80a0081e212f4108f5539b246ba7c2a (development) git.exe config core.sparsecheckout # timeout=10 git.exe checkout -f 4c0b121bb80a0081e212f4108f5539b246ba7c2a # timeout=10 Commit message: "Updated Jenkins File" First time build. Skipping changelog. [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build Tests) [Pipeline] echo Building package with C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace [Pipeline] UiPathPack Expected plugin jar path on Jenkins master: C:\ProgramData\Jenkins.jenkins\plugins\uipath-automation-package\WEB-INF\lib\uipath-automation-package.jar, extracting... Extracting cli to temp folder C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp...done! [net461] $ C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\cli-1.0.8136.25036\lib\net461\uipcli.exe run C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\uipcliargs3890795366405890652 Packing project(s) at path C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace\project.json... Detected schema version 4.0 Compiling... done. Building... done. Signing... done. Packaged project UiPathJenkinsDevOps_Tests v1.1.9 saved to C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace\Output\Tests${env.BUILD_NUMBER}. [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build) [Pipeline] echo Creating Assests with C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace [Pipeline] UiPathAssets Expected plugin jar path on Jenkins master: C:\ProgramData\Jenkins.jenkins\plugins\uipath-automation-package\WEB-INF\lib\uipath-automation-package.jar, extracting... Extracting cli to temp folder C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp...done! [net461] $ C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\cli-1.0.8136.25036\lib\net461\uipcli.exe run C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\uipcliargs3478066158714070905 Deploy asset asset_1_name Deploy asset asset_3_name Deploy asset asset_4_name Deploy asset asset_2_name Asset asset_1_name was successfully deployed. Asset asset_2_name was successfully deployed. Asset asset_3_name was successfully deployed. Asset asset_4_name was successfully deployed. [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy Tests) [Pipeline] echo Deploying development to orchestrator [Pipeline] UiPathDeploy Expected plugin jar path on Jenkins master: C:\ProgramData\Jenkins.jenkins\plugins\uipath-automation-package\WEB-INF\lib\uipath-automation-package.jar, extracting... Extracting cli to temp folder C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp...done! [net461] $ C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\cli-1.0.8136.25036\lib\net461\uipcli.exe run C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\uipcliargs10678376815355164431 Deploying package UiPathJenkinsDevOps_Tests.1.1.9 to tenant DEV on https://cloud.uipath.com/... FeedId for FolderId 674203: . Deploying project(s) C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace\Output\Tests${env.BUILD_NUMBER}\UiPathJenkinsDevOps_Tests.1.1.9.nupkg to https://cloud.uipath.com/ and tenant DEV to Package feed. Status: OK Key: C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace\Output\Tests${env.BUILD_NUMBER}\UiPathJenkinsDevOps_Tests.1.1.9.nupkg Body: {"Id":"UiPathJenkinsDevOps_Tests","Version":"1.1.9"} Process will be deployed in modern folder. Deployed UiPathJenkinsDevOps_Tests v1.1.9 to folder Shared. [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Perform Tests) [Pipeline] echo Testing the workflow... [Pipeline] UiPathTest Expected plugin jar path on Jenkins master: C:\ProgramData\Jenkins.jenkins\plugins\uipath-automation-package\WEB-INF\lib\uipath-automation-package.jar, extracting... Extracting cli to temp folder C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp...done! [net461] $ C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\cli-1.0.8136.25036\lib\net461\uipcli.exe run C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace@tmp\uipcliargs5282746461984672949 Running tests in set UiPathJenkinsDevOps_Tests on https://cloud.uipath.com/ (tenant DEV) with a timeout of 10000 seconds... Starting test set run for UiPathJenkinsDevOps_Tests... Started test set UiPathJenkinsDevOps_Tests with execution id 31360. Running tests... 0 passed, 0 failed or canceled, 1 total. Waiting for 20s. Running tests... 1 passed, 0 failed or canceled, 1 total. Waiting for 20s. Finished running test set UiPathJenkinsDevOps_Tests... Writing test results of type junit to C:\JenkinsRoot\UiPathJenkinsDevOps\development\workspace\result.xml... Recording test results [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build Process) Stage "Build Process" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy Process) Stage "Deploy Process" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] cleanWs [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Deferred wipeout is used... [WS-CLEANUP] done [Pipeline] echo FAILED: Job 'UiPathJenkinsDevOps/development [9]' (http://localhost:8080/job/UiPathJenkinsDevOps/job/development/display/redirect) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // timeout [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline java.lang.AbstractMethodError: Receiver class com.uipath.uipathpackage.UiPathTest does not define or inherit an implementation of the resolved method abstract isSkipOldReports()Z of interface hudson.tasks.junit.JUnitTask. at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:158) at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:190) at com.uipath.uipathpackage.UiPathTest.publishTestResults(UiPathTest.java:355) at com.uipath.uipathpackage.UiPathTest.perform(UiPathTest.java:213) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Finished: FAILURE`

Anything else?

[Pipeline] End of Pipeline java.lang.AbstractMethodError: Receiver class com.uipath.uipathpackage.UiPathTest does not define or inherit an implementation of the resolved method abstract isSkipOldReports()Z of interface hudson.tasks.junit.JUnitTask. at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:158) at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:190) at com.uipath.uipathpackage.UiPathTest.publishTestResults(UiPathTest.java:355) at com.uipath.uipathpackage.UiPathTest.perform(UiPathTest.java:213) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Finished: FAILURE`

majhe commented 2 years ago

Hello Satish, Have you managed to workaround/solve this issue? We´re in the middle of this implementation (Jenkins, UiPath, and some other integrations), however we´re experiencing the same issue. We already tried to use older versions of UiPath plugin (down to 2.80), however the problem persists as in v2.9.2.

I tried to find information on github.io repository/community however so far, no luck in finding a solution or workaround.

ganeshborle commented 2 years ago

Hi,

This generally happens when the Junit installed on the Jenkins Server is greater than 1.30, could you please try with the lower or equal to Junit version 1.30? There is something that changed with the newer Junit version, we are working on it for the support.

bsloan-icl commented 2 years ago

Experiencing the same issue when using

jenkins:2.361.4
uipath-automation-package:2.11
junit:1160.vf1f01a_a_ea_b_7f

A lot of our plugins depend on a later version of Junit so downgrading to 1.30 isn't possible.

Would be great to get this fixed.

VictorRPA commented 1 year ago

image same issue in jenkins :2.375.1 junit:1166.va_436e268e972 downgrade to junit:1119.1121.vc43d0fc45561 same issue.

please help to fix it

ganeshborle commented 1 year ago

Hi @VictorRPA,

We are able to reproduce the issue and we are working on the fix. I could not comment on the exact timeline though but it will happen within a month or so.

For now, to resolve the issue you can downgrade the Junit version to 1.30.

hmlmartins commented 1 year ago

Any feedback on this issue since?

We are not able to downgrade JUnit due to security concerns.

ThomasStockerUiPath commented 1 year ago

Hi everyone, we have fixed this bug already in Jenkins plugin version 3.0: The publishing of test results failed with the following error: Receiver class com.uipath.uipathpackage.UiPathTest does not define or inherit an implementation of the resolved method 'abstract boolean isSkipOldReports()' of interface hudson.tasks.junit.JUnitTask.

https://docs.uipath.com/test-suite/standalone/2023.4/user-guide/uipath-automation-package-v-30

Can you pls upgrade your UiPath Jenkins plugin to the latest version and confirm that it is working? thx a lot.

hmlmartins commented 9 months ago

Hello,

I would say it is still not working. Current error on version 3.1 is:

Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f16fc8f3-aea6-47e0-84d5-ef919975569d java.lang.AbstractMethodError: Receiver class com.uipath.uipathpackage.UiPathTest does not define or inherit an implementation of the resolved method 'abstract boolean isKeepProperties()' of interface hudson.tasks.junit.JUnitTask. at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:159) at hudson.tasks.junit.JUnitResultArchiver.parseAndSummarize(JUnitResultArchiver.java:254) at com.uipath.uipathpackage.UiPathTest.publishTestResults(UiPathTest.java:452) at com.uipath.uipathpackage.UiPathTest.perform(UiPathTest.java:240) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

Probably related to junit specific version. Maybe there should a notice as to the lastest compatible junit version so we can better manage the Jenkins updates