Reputation: 1
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!
Upvotes: 0
Views: 333
Reputation: 302
The short fix
Install Java Development Kit - JDK
The Fast Way:
On Windows with Chocolatey
choco install jdk8
On Unix or Max
apt install jdk8
The Easy Way:
Read and follow the Serenity BDD Install Guide. https://serenity-bdd.github.io/theserenitybook/latest/first-steps.html
I tried to install a newer openjdk
e.g. 11 or 16 but that gave me issues on Windows.
The reason:
serenity-js cannot start the serenity-bdd java module, since it can't find Java.
Upvotes: 1
Reputation: 1
If anyone comes across this later, I found the solution: the base image I was using didn't have a Java runtime, which serenity-bdd
uses under the hood. Switching to an openjdk
base image and manually installing my Node dependencies got around this issue.
Upvotes: 0