SSL error when trying to post execution results from DAI to Jira-Xray

Hi,

I’m trying to integrate DAI with Jira-Xray so when a test case in my model is run the execution results are posted to Jira-Xray.

I’ve initiated the t-csm-service.exe and the service starts up and starts monitoring fine.

2024-06-06 16:40:02.482 | INFO     | MainThread - Server http://daiserver:8000/ version 6.2.1-2 use Client Authentication
2024-06-06 16:40:02.498 | INFO     | MainThread - t-csm-service v1.7.3
2024-06-06 16:40:02.498 | INFO     | MainThread - Service started, waiting for test execution from Eggplant DAI server http://daiserver:8000/
2024-06-06 16:40:02.498 | INFO     | MainThread - Monitoring Model(s) ['TestModel'] for executions
2024-06-06 16:40:02.771 | INFO     | MainThread - Starting DAI Client connection 6.2.1-2

I then kick off a test in DAI and the t-csm-service.exe detects this, but when it tries to post the results to Jira-Xray it fails with the below SSL error. Any idea what could be causing the error, and how to fix please?

2024-06-06 16:41:28.859 | INFO     | MainThread - Starting new process RUNID3665
2024-06-06 16:41:28.870 | INFO     | RUNID3665  - Process started with process id : 27628
2024-06-06 16:41:28.914 | INFO     | RUNID3665  - Testcase JIRA-228 Model based of Model TestModel, Status INCOMPLETE
2024-06-06 16:41:35.565 | INFO     | RUNID3665  - Results for Testcase JIRA-228 Model based of Model TestModel, Status PASSED
2024-06-06 16:41:35.581 | INFO     | RUNID3665  - Processing for XRay Server integration [xray_server]
2024-06-06 16:41:35.581 | INFO     | RUNID3665  - posting to Xray server implementation in Alpha 2
2024-06-06 16:41:35.645 | INFO     | RUNID3665  - posting to Xray: {"info": {"summary": "Execution of Eggplant DAI automated test", "description": "Execution created by Eggplant. \n\n Link to model runs in DAI: http://daiserver:8000/controller/results?model_id=2008480c-d7c2-4d16-8f06-5e11e766bc76\n\n Link to test run in DAI: None\n\n", "startDate": "2024-06-06T15:41:26.099286+00:00", "finishDate": "2024-06-06T15:41:33.024286+00:00", "testPlanKey": "JIRA-220", "project": "TEST"}, "tests": [{"testKey": "JIRA-228", "start": "2024-06-06T15:41:26.099286+00:00", "finish": "2024-06-06T15:41:33.024286+00:00", "comment": "Execution created by Eggplant DAI.", "status": "PASSED"}]}
2024-06-06 16:41:35.764 | ERROR    | RUNID3665  - An XRAY Server exception occurred: Failed to Unable to create test execution: HTTPSConnectionPool(host='jira', port=443): Max retries exceeded with url: /rest/raven/2.0/api/import/execution (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))
2024-06-06 16:41:38.015 | INFO     | MainThread - Finished execution closing <Thread(RUNID3665, stopped 27812)>
2024-06-06 16:41:43.253 | INFO     | MainThread - Restarting DAI Client connection 6.2.1-2

If you want to isolate the problem, you could install the openssl package for your platform and examine the output of the command " openssl s_client -connect hostname:port" as per this article: https://docs.pingidentity.com/r/en-us/solution-guides/htg_use_openssl_to_test_ssl_connectivity - for example, in this case you may need to create a root certificate authority (root CA) and use its key to generate the certificate that you want to use. In this case the digital certificate of the root CA would need to be installed into the trust store of the Jira-Xray host for it to be able to verify the certificate that you are sending.

Hi , Even i am trying to set up JIRA and DAI connectivity , can you please help.
I could not find any sample projects with detailed steps elsewhere.

hey @liki7411 ,

We can intergrate DAI with JIRA and vice versa.

Kindly ask you to reach out to our technical consultant and or your Eggplant Account manager or the eggplant Support. They will guide you on how to configure a DAI Jira integration.

Jira can be cloud hosted, onpremise or a datacenter server. Each of these do work slightly different and use different API endpoints.
Each JIRA app does have a different API these do vary slightly depending how JIRA is hosted

In addition, we need to understand what you want to achieve.

  • What do you mean exactly by integration JIRA and DAI. Are you using any apps like xraym zephyr etc.
  • Do you want to send Results from DAI to JIRA XRAY
  • Do you want to trigger DAI test configs from Jira ?
  • Jira is not JIRA it really matters how you setup is.

Hope the questions above help to understand that there is not the one way integrating.

Cheers,
Karsten

Hi Harpreet,

IF your organisation uses self signed certificates then they have started the process with generating a CA Root certificate. This is then used to create SSL certificates for that specific domain. When a browser connects to a website with a self-signed certificates it displays a warning and allow you to add it as an exception to the specific web browser. If you would try to use another web browser it would have to repeat this process. Applications do not have this process so they would need to be able to reach the CA Root certificate to be able to validate the certificate.

Below is an example of such an CA Root certificate which you can install by right click on the rootCA.cert file:

When you install the certificate you have to make sure to add it to the “Trusted Root Certificate Authorities” in the certificate store browse option

Now your SSL connection with the website can be validated using the above installed CA Root certificate.

I hope this helps.

Joost