gurock / trcli

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

not able to upload results when report contains some chars #230

Open mhajhassan opened 1 month ago

mhajhassan commented 1 month ago

TestRail CLI Version

1.9.5

CLI Environment

macOS

TestRail Version

8.0.1 Early Access (1029)

TestRail Instance Type

Enterprise Server

Current behavior

while trying to upload the results, I am getting this error: `Adding results: 0/397 No attachments found to upload. Field :results contains one or more invalid results (case C815 unknown or not part of the test run)

**** API Call method: POST url: https://domain/testrail/index.php?/api/v2/delete_run/254 response status code: 200 response body: b''


**** API Call method: POST url: https://domain/testrail/index.php?/api/v2/delete_section/290 response status code: 400 response body: {'error': 'Field :section_id is not a valid section.'}


Deleted created run Unable to delete created section: Field :section_id is not a valid section. I checked the sections and also test cases, all exist and correct, and after checking I saw that in requestindex.php?/api/v2/add_results_for_casesI got response coderesponse status code: 400 response body: {'error': 'Field :results contains one or more invalid results (case C815 unknown or not part of the test run)'}` but the test case is known and a part of the test run, but because it's the first test case of the payload,

at the end I saw that in TEST-junit-platform-suite.xml we have for one test case the following: `

name: tc-checkbox] (tried for 120 second(s) with 500 milliseconds interval) Build info: version: '4.16.1', revision: '9b4c83354e' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.3.9-arch1-1', java.version: '17.0.11' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 124.0.6367.91, chrome: {chromedriverVersion: 124.0.6367.91 (51df0e5e17a8..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:35667}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:cdp: ws://localhost:35667/devtoo..., se:cdpVersion: 124.0.6367.91, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true} Session ID: ad6926b5c1ebdc504961d5ddbedce22a at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:84) at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:229) at objects.pages.BasePage.waitForVisibility(BasePage.java:136) at objects.pages.marketplace.PaymentScreenPage.ThenIAcceptTheTermsAndConditions(PaymentScreenPage.java:284) at test.marketplace.OrderAppraisalTest.testOrderAppraisalWithCreditCardStatusError(OrderAppraisalTest.java:207) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ]]>

` it looks like same issue with ticket https://github.com/gurock/trcli/issues/212

Desired behavior

No response

More Details

No response

bitcoder commented 1 month ago

@mhajhassan

1) to be able to reproduce the issue, can you please share the report file you used and the exact trcli command line? 2) how did you generate the JUnit XML report? Did you use Junit5 together with the testrail-junit-extensions library?

mhajhassan commented 1 month ago

@bitcoder unfortunately I can't share the file, but yes used Junit5 together with the testrail-junit-extensions and the command was used it : trcli -y --insecure -c "trcli-config.yml" parse_junit \ -f "./target/TEST-junit-jupiter.xml" \ --run-description "description" \ --case-matcher "property" \ --title "title"

it was working all the time, but we saw that after some failing test cases, saw that it's related to some chars

mhajhassan commented 1 month ago

the TEST-junit-jupiter.xml is always generated, I can see it in target folder

bitcoder commented 1 month ago

@bitcoder unfortunately I can't share the file, but yes used Junit5 together with the testrail-junit-extensions and the command was used it : trcli -y --insecure -c "trcli-config.yml" parse_junit \ -f "./target/TEST-junit-jupiter.xml" \ --run-description "description" \ --case-matcher "property" \ --title "title"

it was working all the time, but we saw that after some failing test cases, saw that it's related to some chars

Without a concrete example to replicate it there isn't much "we" can do