You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generating test results in CI, the pattern I'm used to is a cross-tool test_results/ folder, in which we get a junit/ subfolder for junit-ish XML, a coverage/ folder for all coverage-related matters, and now a hurl/ subfolder for all hurl's output, mostly HTML. This looks like this:
Note that the test_results/ folder doesn't exist in repo, it's generated by the first command that runs.
In CI during integration tests, that's hurl during the HTML report, but instead I get:
error: HTML dir test_results/hurl can not be created
Because I'm missing test_results/ root.
Note of course I could just create a .gitkeep empty file in that folder to keep it created, but I feel it's common to expect testing tools to be able to create result folders?
Proposal
Suggest enabling report-path creation like mkdir -p would, when given a report path that has missing parents, instead of crashing.
I'd personally expect this behaviour to be the default, but it's possibly surprising people, so maybe expose it as --mkdir-report flag if it's deemed unsafe by default.
Additional context and resources
Change in code might be as simple as changing this:
Thank you for you detailed issue. It seems reasonable to me to create any intermediate subdirectory, it should be the default. I don't see any problem to implement it (I will check with the others maintainers),
Problem to solve
Generating test results in CI, the pattern I'm used to is a cross-tool
test_results/
folder, in which we get ajunit/
subfolder for junit-ish XML, acoverage/
folder for all coverage-related matters, and now ahurl/
subfolder for all hurl's output, mostly HTML. This looks like this:Note that the
test_results/
folder doesn't exist in repo, it's generated by the first command that runs.In CI during integration tests, that's
hurl
during the HTML report, but instead I get:Because I'm missing
test_results/
root.Note of course I could just create a
.gitkeep
empty file in that folder to keep it created, but I feel it's common to expect testing tools to be able to create result folders?Proposal
Suggest enabling report-path creation like
mkdir -p
would, when given a report path that has missing parents, instead of crashing.I'd personally expect this behaviour to be the default, but it's possibly surprising people, so maybe expose it as
--mkdir-report
flag if it's deemed unsafe by default.Additional context and resources
Change in code might be as simple as changing this:
hurl/packages/hurl/src/cli/options/matches.rs
Line 157 in 2cac549
Tasks to complete
The text was updated successfully, but these errors were encountered: