3

I am trying to integrate TestRail with TestCafe in order to update the test script execution status on TestRail. I followed the below link but did not succeed https://www.npmjs.com/package/testcafe-reporter-html-testrail tried with below one, but not succeeded.

test('<< Group Name>> | << Test Name >> | << Testrail Case_ID >> ', async t => { .... });

Can you please help me with this?

note: my question is same as : https://testcafe-discuss.devexpress.com/t/is-there-anyway-to-post-test-results-from-a-run/377

Alex Skorkin
  • 4,034
  • 3
  • 21
  • 44
Yuvaraja KS
  • 151
  • 5

2 Answers2

2

As I understand from the https://testcafe-discuss.devexpress.com/t/is-there-anyway-to-post-test-results-from-a-run/377 thread, it's enough to send some requests to TestRail API to solve the issue.

I took a look at testcafe-reporter-html-testrail and, at first glance, it should send such requests.

I would recommend you review code of testcafe-reporter-html-testrail and debug it to find the cause why it does not work. I suggest you start from these reporter methods: https://devexpress.github.io/testcafe/documentation/extending-testcafe/reporter-plugin/reporter-methods.html.

Since testcafe-reporter-html-testrail is not an official TestCafe reporter, we cannot provide any detailed information about it. I cannot find the repository of testcafe-reporter-html-testrail on GitHub, but it still exists on npm, so probably you can contact the author of this module.

Alex Kamaev
  • 4,985
  • 1
  • 10
  • 26
  • Thanks Alex, As you mentioned i did not find testcafe-reporter-html-testrail repository hence i need help to exact method with parameter info to send request to TestRail API. As you looked at testcafe-reporter-html-testrail , do you have any idea how TESTRAIL-HOST, TESTRAIL_USER, TESTRAIL_PASS, PROJECT_NAME would be passed through. – Yuvaraja KS Mar 25 '19 at 12:07
  • 1
    I'm not familiar with the TestRail API, so I'm not sure how those parameters are passed through. – Alex Kamaev Mar 26 '19 at 07:43
0

If you are running tests using the TestCafe CLI, then this is how you would pass the required testrail environment variables required for the testcafe-reporter-html-testrail plugin to work:

TESTRAIL_ENABLE=true TESTRAIL_HOST=http://example.net/ TESTRAIL_USER=abc@example.net TESTRAIL_PASS=password PROJECT_NAME='ABC' testcafe chrome test.js