billylam / wdio-wdiov5testrail-reporter

https://www.npmjs.com/package/wdio-wdiov5testrail-reporter
MIT License
6 stars 8 forks source link

Log Invalid Tests on strictCaseMatching value as true #21

Closed shubham0803 closed 1 year ago

shubham0803 commented 1 year ago

We have logged an issue for logging of invalid tests when strictCaseMatching value as true https://github.com/billylam/wdio-wdiov5testrail-reporter/issues/20

hdesai-dave commented 1 year ago

@billylam we have modified the PR to log invalid cases in case strictCaseMatching is set to false. Didn't look into, how to log in case strictCaseMatching set to true. Let us know, if you have any pointers on that and we can address in a separate PR.

billylam commented 1 year ago

@billylam we have modified the PR to log invalid cases in case strictCaseMatching is set to false. Didn't look into, how to log in case strictCaseMatching set to true. Let us know, if you have any pointers on that and we can address in a separate PR.

let invalidTestCases = [];
invalidFilteredTests.forEach(result => invalidTestCases.push(result.case_id));
console.log(`Invalid Test Cases - ${invalidTestCases}`);

can you change this to something like

if (invalidFilteredTests.length > 0) console.log(`Invalid Test Cases - ${invalidFilteredTests.map(test => test.case_id)}`);

to conditionally log and clean up. Rest of PR seems fine now.

shubham0803 commented 1 year ago

@billylam we have modified the PR to log invalid cases in case strictCaseMatching is set to false. Didn't look into, how to log in case strictCaseMatching set to true. Let us know, if you have any pointers on that and we can address in a separate PR.

let invalidTestCases = [];
invalidFilteredTests.forEach(result => invalidTestCases.push(result.case_id));
console.log(`Invalid Test Cases - ${invalidTestCases}`);

can you change this to something like

if (invalidFilteredTests.length > 0) console.log(`Invalid Test Cases - ${invalidFilteredTests.map(test => test.case_id)}`);

to conditionally log and clean up. Rest of PR seems fine now.

code updated