Open nvsoares opened 8 years ago
+1
I think this is something easily included. How would you like to generate those folders? I mean the naming.
Something like: YYYY-MM-DD_HH:MM:SS ? Random ID? Just one per day?
There should be some kind of rotation management?
How about by spec name?
On Feb 29, 2016, at 9:25 PM, Kenzitron notifications@github.com wrote:
I think this is something easily included. How would you like to generate those folders? I mean the naming.
Something like: YYYY-MM-DD_HH:MM:SS ? Random ID? Just one per day?
There should be some kind of rotation management?
— Reply to this email directly or view it on GitHub https://github.com/Kenzitron/protractor-jasmine2-html-reporter/issues/23#issuecomment-190403598.
Ideally then once we have multiple folders per spec a way to view the entire report of all the tests would rock!
On Feb 29, 2016, at 9:25 PM, Kenzitron notifications@github.com wrote:
I think this is something easily included. How would you like to generate those folders? I mean the naming.
Something like: YYYY-MM-DD_HH:MM:SS ? Random ID? Just one per day?
There should be some kind of rotation management?
— Reply to this email directly or view it on GitHub https://github.com/Kenzitron/protractor-jasmine2-html-reporter/issues/23#issuecomment-190403598.
as I said, the scope of this question is to just have no way to delete the folder of reports. By default folder would remain as well as files in it, and replaced if existed by the same name. This would be the first step. Each can create a role for the report name is dynamic.
Another issue is to have different folders for each test. It makes sense, but I think it should be another option to explore especially when working with multiCapabilities. But this already goes beyond the scope of this issue, and so I will register another where we can continue this discussion.
Please see if you can, by default, do not delete the folder of reports. When creating new report if already a file with the same name, delete and create new.
Below code should solve your purpose.
var today = new Date();
var timeStamp = today.getMonth() + 1 + '-' + today.getDate() + '-' + today.getFullYear() + '-' +
today.getHours() + 'h-' + today.getMinutes() + 'm-' +today.getSeconds()+'s';
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: './Reports/testResultsReport '+timeStamp,
screenshotsFolder: 'screenPrints',
takeScreenshots: true,
takeScreenshotsOnlyOnFailures: true,
})
);
Hello, it was not what I wanted but I changed the approach and achieves something. Thank you.
Hi. In each run is generated a unique identifier for reports and i intend to keep previous reports. How to make the reports directory not eliminated on each run?