gurock / trcli

TR CLI (trcli) is a command line tool for interacting with TestRail.
Mozilla Public License 2.0
47 stars 42 forks source link

suite_id value not set on delete when upload fails #110

Closed kmurywed closed 1 year ago

kmurywed commented 1 year ago

TestRail CLI Version

1.3.1

CLI Environment

No response

TestRail Version

7.5.6 Default (3001)

TestRail Instance Type

Professional Cloud

Current behavior

suite_id seems to lose the initial value when test results fail to upload for some reason, so request sent with /api/v2/delete_cases/-1 , which fails with {'error': 'Field :suite_id is not a valid test suite.'}

`**** Adding test cases: 6/148 Adding test cases: 6/148 Your upload to TestRail did not receive a successful response from your TestRail Instance. Please check your settings and try again.

**** API Call method: POST url: https://xx.testrail.io/index.php?/api/v2/delete_cases/-1 payload: {'case_ids': [6622, 6627, 6624, 6671, 6626, 6623, 6625]} response status code: 400 response body: {'error': 'Field :suite_id is not a valid test suite.'}


Unable to delete created test cases: Field :suite_id is not a valid test suite. ===== Upload nebula/.github/scripts/step-upload-results-testrail/client-api.sh to TestRail Step Failed ====`

Desired behavior

suite_id value properly set

More Details

No response

kmurywed commented 1 year ago

This still doesn't work. It seems like when a suite has many tests, this just fails

TestRail CLI v1.4.3 Copyright 2021 Gurock Software GmbH - www.gurock.com Parse JUnit Execution Parameters

Report file: client_api_auto_tests.xml Config file: None TestRail instance: https://xyz.testrail.io/ (user: xyz@xyz.co) Project: Automated tests Run title: API 2023-02-23_18:05 Update run: No Add to milestone: No Auto-create entities: True Parsing JUnit report. Processed 1763 test cases in 23 sections. Checking project. Done. Found 198 test cases not matching any TestRail case. Adding missing test cases to the suite. Adding test cases: 2/240 Error during add_case. Trying to cancel scheduled tasks.

Aborting: add_case. Trying to cancel scheduled tasks.

Adding test cases: 2/240 Your upload to TestRail did not receive a successful response from your TestRail Instance. Please check your settings and try again. Unable to delete created test cases: Field :suite_id is not a valid test suite.