I use Xray for JIRA Jenkins Plugin to upload test results to Jira as a post-build action
Console output in Jenkins provides error below:
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:17 min
[INFO] Finished at: 2021-06-28T19:21:23Z
[INFO] ------------------------------------------------------------------------
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/target/surefire-reports/testng-results.xml
Saving reports...
Processing '/data/jenkins/home/jobs/tests/builds/4/testng/testng-results.xml'
TestNG Reports Processing: FINISH
Starting XRAY: Results Import Task...
##########################################################
#### Xray is importing the execution results ####
##########################################################
File found: /var/lib/jenkins/workspace/tests/target/surefire-reports/testng-results.xml
Starting to import results from testng-results.xml
ERROR: Step ‘Xray: Results Import Task’ failed: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"components: components"}
Finished: FAILURE XRay result import task Format: TextNG XML
Project Key: HIS (the name of my Jira project)