Automatically generating LivingDoc.html, renaming LivingDoc.html file and relative file paths in specflow.json file
Hello.
I have recently upgraded to SpecFlow.MSTest and SpecFlow.Plus.LivingDocPlugin given your decision to deprecate SpecFlow+Runner (https://specflow.org/using-specflow/the-retirement-of-specflow-runner/).
Anyway, a couple of questions if I may.
Rather than having to manually generate the LivingDoc.html report using the SpecFlow.Plus.LivingDoc.CLI and executing the command 'livingdoc test-assembly ACME.FunctionalTestProject.dll -t TestExecution.json', is there an easy way to just run the SpecFlow tests and automatically produce the LivingDoc.html report file as well as the TestExecution.json file via Visual Studio? Whilst LivingDoc is fairly new to me, it does look good although it does seem a step backwards to have to manually generate the html report for an automated test?
Also, I am able to add a timestamp to the TestExecution.json file using the following configuration within my specflow.json file:
"livingDocGenerator": {
"enabled": true,
"filePath": "{CurrentDirectory}\\TestExecution_{Now:yyyy.MM.dd.HHmmss}.json"
}
This is good however, I'd like to be able to add the timestamp to the LivingDoc.html file so it is generated with a timestamp and not overwritten every time e.g.
Proposed command (ideally html report will be auto produced so no command needed):
livingdoc test-assembly ACME.FunctionalTestProject.dll -t TestExecution*.json -o C:\data\reports\LivingDoc_{Now:yyyy.MM.dd.HHmmss}.html
Report output:
LivingDoc_2022-03-22-162956.html
One last question, what is the syntax for specifying a relative file path in the specflow.json file please? There is placeholder support in filePath e.g. {CurrentDirectory} can be used but this just goes to the bin directory. I'd like to be able to output the TestExecution.json file (and the LivingDoc.html file) to another directory within the solution folder without having to include the absolute path in the specflow.json file?
Many thanks,
Karl.
Please sign in to leave a comment.
Comments
0 comments