0

I am trying to organize our testing framework and what we have right now look something like:

test.meta({ testID: '1234' })('testTheButton', async () => {

    // the test code 

}

where the testID in metadata is referring to a testID in Testrail. what Im trying to do is to link this ID to actual test case in Testrail and make it clickable so it is faster to find the automated test cases in Testrail. so the main issue here is that I have no idea on how to make the test ID clickable or better say, to add external links in Testcafe metadata!

is this even possible??

Any help is appreciated.

thank you in advance

Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47
developi
  • 19
  • 6
  • Please clarify your question. Where do you want to click on the link that you send through the meta? – Alexey Popov Aug 04 '22 at 07:18
  • HI @Aleksey, in the above piece of code, id like to make '1234' (which is a testcase ID in testrail) clickable, so that when i click on 1234 in IDE, it redirects me to the testrail testcase with Id 1234 – developi Aug 04 '22 at 15:31
  • In the testCafe Document here : https://testcafe.io/documentation/402734/reference/test-api/test/meta. mentioned that it only accepts strings for its key/values, but I'm looking for a workaround to make it a link and clickable – developi Aug 04 '22 at 16:53

1 Answers1

0

Usually, IDE makes links clickable automatically if it has the full format. Try to send the full link to meta. Also, you can try to find an acceptable Reporter or create your own and format your string as required.

export default function () {
    return {
        async reportTaskStart (startTime, userAgents, testCount) {
        },

        async reportFixtureStart (name, path, meta) {
        },

        async reportTestDone (name, testRunInfo, meta) {
            this.write(format(meta.testID));
        },

        async reportTaskDone (endTime, passed, warnings, result) {
        }
    };
}
Alexey Popov
  • 1,033
  • 1
  • 4
  • 12