I have a Serenity-JS project that runs normally on the command line. I am trying to package it into a Docker container for use in an Azure pipeline, which is a model we've used with other projects.
However, when I run the project via Docker, the tests execute correctly but the step to generate report documentation fails with a rather terse error:
[test:report] > serenity-bdd run
[test:report]
[test:report] I'm terribly sorry, but something didn't go according to plan:
[test:report] The "path" argument must be of type string. Received null
Nothing else shows up in the output, so the source of the issue isn't clear. I'm not even sure which path argument this is referring to. I've dug into the Serenity-JS Node module but I don't see a clear culprit here, nor do I understand why it would work via command line but not in Docker. Any insight would be greatly appreciated. Thanks!
If anyone comes across this later, I found the solution: the base image I was using didn't have a Java runtime, which
serenity-bdduses under the hood. Switching to anopenjdkbase image and manually installing my Node dependencies got around this issue.