Subscribe Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

NightWatch unable to update test case status in TestRail

Hi there,
We have a new project with NightWatch & Selenium. Trying to connect with TestRail and getting an error message:
{“error”:“Field :case_id is not a valid ID.”}

Passing below values:
new generated API key (saved and checked multiple times)
testRunId without letters (Without R letter 6 digits)
baseUrl
username
projectId
SuiteId

Hi @rkuden,
what did you try in detail?
Did you try to create a test run or add a result?
Which API did you access?

You didn’t pass a cade_id and the error is exactly saying this…
So, I haven’t used NightWatch before, but the API. :innocent:

Karsten

1 Like

Hi @kwirth,
I am using: “node-testrail”: “0.0.12”, typescript vs NightWatch.
I have created a testRun in TestRail and trying to add a result.
testRailUpdate: true,
testRailCreateRun: false,
testRailRunId:’’,
testRailProjectId: ‘’,
testRailSuiteId: ‘’,
testRailBaseUrl: ‘’,
testRailUsername: ‘’,
testRailApiKey: ‘’

So, I haven’t used node-testrail before, but I guess you either try to use add_result or add_result_for_case (which sounds to be the same like the TestRail endpoints).

  • add_result: You missed to provide the test_id (the instance of a case in the run)
  • add_result_for_case: You missed to pass the case_id

At least I miss the parameter in your list.
I guess you use the second way because of the former error code.
Do you really pass the case Id and is there an instance of the case part of the run?
Just a first idea…

Karsten

1 Like

I use the second way, thanks a lot @kwirth, I was not passing case id.