Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp reports #76

Open
osmolyar opened this issue Sep 30, 2021 · 3 comments
Open

Timestamp reports #76

osmolyar opened this issue Sep 30, 2021 · 3 comments
Labels
enhancement New feature or request good first PR pick

Comments

@osmolyar
Copy link

osmolyar commented Sep 30, 2021

Is your feature request related to a problem? Please describe.
Currently reports are named according to the Feature file, and overwritten each time the Feature file is run.

Describe the solution you'd like
It would be nice to have a timestamp added to the file name to keep a record of prior reports.

Describe alternatives you've considered
Something like the following

 onRunnerEnd() {
        const jsonFolder = (0, path_1.resolve)(process.cwd(), this.options.jsonFolder);
        const date = new Date().getTime()
        const jsonFile = (0, path_1.resolve)(jsonFolder, `${this.report.feature.id}_${date}.json`);
        const json = [this.report.feature];
        const output = (0, fs_extra_1.existsSync)(jsonFile) ? json.concat((0, fs_extra_1.readJsonSync)(jsonFile)) : json;
        (0, fs_extra_1.outputJsonSync)(jsonFile, output);
    }

Additional context

@osmolyar osmolyar changed the title Timestamp reports Timestamp reports; (onRunnerEnd triggered twice for each feature file) Sep 30, 2021
@osmolyar osmolyar changed the title Timestamp reports; (onRunnerEnd triggered twice for each feature file) Timestamp reports Sep 30, 2021
@osmolyar
Copy link
Author

If acceptable, will submit a PR for this.

@wswebcreation
Copy link
Collaborator

Thanks for the Feature Request, if you want to can start with a PR

@osmolyar
Copy link
Author

Submitted pull request #80

@bhaslamb bhaslamb mentioned this issue Feb 1, 2022
bhaslamb pushed a commit to bhaslamb/wdio-cucumberjs-json-reporter that referenced this issue Feb 1, 2022
  * Appended current timestamp on generation of feature file
  * fixed failed test
bhaslamb pushed a commit to bhaslamb/wdio-cucumberjs-json-reporter that referenced this issue Feb 1, 2022
  * Appended current timestamp on generation of feature file
  * fixed failed test
wswebcreation added a commit that referenced this issue Feb 6, 2022
* Addressed #79
  * Updated wdio/ cucumber-framework peer dependency to resolve conflicts.

* Addressed #76
  * Appended current timestamp on generation of feature file
  * fixed failed test

* Addressed #76
  * Appended current timestamp on generation of feature file
  * fixed failed test

* Update package.json

update to proper peerDependencies version

Co-authored-by: Bhaslamb <baskercarrer@gmail.com>
Co-authored-by: Wim Selles <wim@wswebcreation.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first PR pick
Projects
None yet
Development

No branches or pull requests

2 participants