I run all of our Apidog tests using the following command line:
apidog run --access-token [REDACTED] -f [folderId] -r html --out-json-failures-separated out.json
(Trying to run the tests using the UI results in an out of heap space error.)
The output is this:
(node:24380) [DEP0044] DeprecationWarning: The util.isArray API is deprecated. Please use Array.isArray() instead.
(Use node --trace-deprecation ... to show where the warning was created)
error: Error: Invalid test data.
We have nearly 6K assertions spread across around 1K tests. Is there an easy way to identify the test(s) that have Invalid test data?
It still happens. I am using node v22.15.0 and apidog 1.5.15.
I can update apidog–I see that it’s slightly different–but do note that I have been able to successfully run all tests as recently as a week ago without that error.
I believe that we’ve made a change to a test–tests are constantly being created and updated–that has somehow caused the error, but I don’t know which one it is–that’s precisely the issue.
This same kind of error happens if you inadvertently don’t set an environment for a test–the whole test run grinds to a halt and tells you that something failed, but not the crucial information of what failed.
Hi Joe, Thanks for the feedback. The issue with --out-json-failures-separated not working has been fixed in version 1.5.18. Please update to the latest version.
The error message you shared is from CLI execution (“apidog run” command). The UI heap space error is a separate issue.
“The output is this:
(node:24380) [DEP0044] DeprecationWarning: The util.isArray API is deprecated. Please use Array.isArray() instead.
(Use node --trace-deprecation ... to show where the warning was created)
error: Error: Invalid test data.”
The error message you shared is from CLI execution (“apidog run” command). The UI heap space error is a separate issue.
Absolutely true. I mentioned it only to prevent someone from suggesting that I use the UI to run all the tests because that fails because of the heap space error.
The issue with --out-json-failures-separated not working has been fixed in version 1.5.18. Please update to the latest version.
This is greatly appreciated, but unfortunately if the test run terminates abnormally the output isn’t available.
Current status:
I updated Apidog to 2.7.17 and apidog-cli to 1.5.18 and re-ran.
I still get the “error: Error: Invalid test data.” (I believe that the previous lines, from node, are related only to deprecated packages referenced by the apidog-cli application and can safely be ignored.)
Additional diagnostic/error messages would help me to fix whatever underlying issue exists–or to better describe it for a defect report.
The CLI command is the same as in the original post (I have redacted our API key):
apidog run --access-token [REDACTED] -f 911642 -r html --out-json-failures-separated out.json
The output is also relatively identical to my original post (I think the number after “node:” will be dynamic, and as I mentioned previously, I think the only line of importance is the “error: Error: Invalid test data.” line). See the attached screenshot.
One thing that’s very important–and that I mentioned but should have really stressed–is that the test run actually runs for a bit and then fails with the error. I know that at least some tests run and run to completion–the error happens minutes into the test run (I’m guessing 10 or so minutes into a 33 minute overall approximate run time).
@Joe The test data for your scenario “It should return an error if AmbassadorId is not sent in the request” has been deleted. You’ll need to save it again.
We’ll also improve this to skip such errors and continue running other valid scenarios in future updates.