Closed BugsLightYear closed 3 years ago
“Field :results cannot be empty but no valid tests or cases found“ means the test cases you’re listing aren’t found in the suite you specified.
Two common issues that may have happened are
If those don’t solve your problem, try seeing if calling this failing endpoint in postman works, or if it returns an error for you. https://mytestraildomain.net/index.php?/api/v2/add_results_for_cases/297109 Params for the call can be found on the testrail API documentation.
Hi there!
I love using newman-reporter-testrail but I'm getting these errors. Do someone know how to solve it? I have properly defined TESTRAIL_DOMAIN, TESTRAIL_USERNAME, TESTRAIL_APIKEY, TESTRAIL_PROJECTID, TESTRAIL_TITLE , TESTRAIL_SUITEID. Moreover, it creates the test run in testrail and it adds the proper cases, but I can not mark them. I'm getting this:
Error: Server responded to https://mytestraildomain.net/index.php?/api/v2/add_results_for_cases/297109 with status code 400: {"error":"Field :results cannot be empty but no valid tests or cases found"} at Response.getBody (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman-reporter-testrail\node_modules\http-response-object\lib\index.js:41:23) at TestRailReporter.pushToTestrail (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman-reporter-testrail\lib\TestrailReporter.js:286:62) at TestRailReporter.onComplete (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman-reporter-testrail\lib\TestrailReporter.js:40:12) at EventEmitter. (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman-reporter-testrail\lib\TestrailReporter.js:8:12)
at EventEmitter.emit (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman\node_modules\eventemitter3\index.js:203:33)
at done (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman\lib\run\index.js:297:29)
at C:\Users\myUser\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\backpack\index.js:58:34
at PostmanCollectionRun._process (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\run.js:163:13)
at PostmanCollectionRun. (C:\Users\myUser\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\run.js:169:76)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7) {
statusCode: 400,
headers: {
date: 'Tue, 16 Mar 2021 08:08:05 GMT',
server: 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.27',
'x-powered-by': 'PHP/7.2.27',
'set-cookie': [ 'tr_session=e65959ef-a2ed-4765-afe4-ac375c7811d8; HttpOnly' ],
'content-length': '76',
connection: 'close',
'content-type': 'application/json; charset=utf-8'
},
body: Buffer(76) [Uint8Array] [
123, 34, 101, 114, 114, 111, 114, 34, 58, 34, 70, 105,
101, 108, 100, 32, 58, 114, 101, 115, 117, 108, 116, 115,
32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 101,
109, 112, 116, 121, 32, 98, 117, 116, 32, 110, 111, 32,
118, 97, 108, 105, 100, 32, 116, 101, 115, 116, 115, 32,
111, 114, 32, 99, 97, 115, 101, 115, 32, 102, 111, 117,
110, 100, 34, 125
],
url: 'https://mytestraildomain.net/index.php?/api/v2/add_results_for_cases/297109'
}
Thank you in advance!