Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception when trying update results for non-exising ID in testrail #43

Open
raga-varicent opened this issue Oct 13, 2022 · 2 comments
Open

Comments

@raga-varicent
Copy link

Issue:

test1 id exists in test rail, test2 id (C5215) does not exist or has been removed. when the results pushed to testrail, the below exception happens and no results are pushed to testrail. It would be better if there is check for testcase exists. if it does exit, then no results need to be pushed for that.

if you can provide a fix for this, that would be great

testcafe-reporter-testrail version = 0.11.1 or older versions.

test.meta({CID: 'C520'})('test1', async (t) => {

});

test.meta({CID: 'C5215'})('test2', async (t) => {

});

The "reporter" option from the configuration file will be ignored.
[TestRail] All TestRail mappings should be valid. Following test case id does not exist in TestRail: 5215.
[TestRail] Error during API request
[TestRail] Sending report to TestRail failed {
url: 'https://symonqa.testrail.io/index.php?/api/v2/update_run/44',
status: 400,
message: { error: 'Field :case_ids contains unrecognized case IDs.' }
}
ERROR The "reportTaskDone" method of the "testrail" reporter produced an uncaught error. Error details:
undefined

@DamianOsipiuk
Copy link
Owner

Hi,
If we change this loop to actually filter caseIds in addition to logging the warning, this error would go away.
https://github.com/DamianOsipiuk/testcafe-reporter-testrail/blob/main/src/index.ts#L238

Do you feel like contributing the change?

@raga-varicent
Copy link
Author

yeah, i should be able to fix it. I will test my change and send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants