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

Failed to update test run results: Request failed with status code 400 #309

Open
Znamm9 opened this issue Mar 27, 2024 · 2 comments
Open
Labels
help wanted Extra attention is needed

Comments

@Znamm9
Copy link

Znamm9 commented Mar 27, 2024

Hi! While updating test run I got this error

2024-03-27T13:23:37.146Z ERROR TestrailReporter: Failed to update test run results: Request failed with status code 400

Test run was created, and all test cases added as expected. But they still in default state while tests are passing.

Spec Files: 1 passed, 1 total (100% completed) in 00:00:41

I'm running tests on browserstack, here is my reporter config:

reporters:
    [
        ['testrail', {
            projectId: 54,
            suiteId: 441,
            domain: 'xxxxx.testrail.io',
            username: process.env.TESTRAIL_USERNAME,
            apiToken: process.env.TESTRAIL_API_TOKEN,
            runName: 'ts testrun',
            oneReport: true,
            includeAll: false
        }
    ]
],

Also if you can add details on what is wrong with request it would be very helpful. Not always clear what is wrong with request. I'm using custom solution with testrail API and int works, so I guess something is broken with parameters while test case update.

dependencies from package.json:

"devDependencies": {
"@wdio/appium-service": "^8.35.1",
"@wdio/browserstack-service": "^8.35.1",
"@wdio/cli": "^8.35.1",
"@wdio/local-runner": "^8.35.1",
"@wdio/mocha-framework": "^8.35.0",
"@wdio/spec-reporter": "^8.32.4",
"@wdio/reporter": "^8.32.4",
"@wdio/testrail-reporter": "^0.3.0",
"appium-xcuitest-driver": "^7.3.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.3",
"wdio-wait-for": "^3.0.11",
"wdio-testrail-reporter": "^1.1.5"
}

thx in advance

@seanpoulter
Copy link
Contributor

Thanks for reporting the issue and sorry to hear it isn't working. This sounds similar to #264. Would you be able to troubleshoot @Znamm9? I'd suggest logging or using the debugger to check the response body to see if the
https://github.com/webdriverio-community/wdio-testrail-reporter/blob/main/src/api.ts#L38. Perhaps the server is explaining what's wrong.

If you can help identify the issue I'd be happy to review a PR or collaborate on adding a failing test and a fix. 😀

@Znamm9
Copy link
Author

Znamm9 commented Mar 28, 2024

#264 looks the same, but another endpoint used there, so I think we need to consider it separately. I'm looking how to fix it

@christian-bromann christian-bromann added the help wanted Extra attention is needed label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants