{"id":15552179,"url":"https://github.com/bahmutov/cypress-timestamps","last_synced_at":"2025-09-28T22:30:28.033Z","repository":{"id":66012328,"uuid":"436766774","full_name":"bahmutov/cypress-timestamps","owner":"bahmutov","description":"Add timestamps to Cypress tests, error screenshots, and Command Log","archived":false,"fork":false,"pushed_at":"2023-01-04T23:27:39.000Z","size":578,"stargazers_count":6,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T20:50:39.931Z","etag":null,"topics":["cypress-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bahmutov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support.js","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-09T21:30:28.000Z","updated_at":"2023-10-06T08:17:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"aca9a870-1f25-4109-a192-e8f28939c855","html_url":"https://github.com/bahmutov/cypress-timestamps","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-timestamps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-timestamps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-timestamps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-timestamps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/cypress-timestamps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234565111,"owners_count":18853251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress-plugin"],"created_at":"2024-10-02T14:11:11.828Z","updated_at":"2025-09-28T22:30:27.707Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cypress-timestamps ![cypress version](https://img.shields.io/badge/cypress-9.7.0-brightgreen)\n\n\u003e Add timestamps to Cypress tests, error screenshots, and Command Log\n\nRead the blog post [Add Timestamps To Cypress](https://glebbahmutov.com/blog/cypress-timestamps/)\n\n## Install\n\n```shell\n$ npm i -D cypress-timestamps\n# or if using Yarn\n$ yarn add -D cypress-timestamps\n```\n\n## Use\n\nInclude the plugin from your support file\n\n```js\n// cypress/support/index.js\n\n// https://github.com/bahmutov/cypress-timestamps\nrequire('cypress-timestamps/support')()\n```\n\nInclude this plugin from your project's plugin file. This is optional and is needed only if you enable the option `terminal: true` (see below)\n\n```js\n// cypress/plugin/index.js\n\nmodule.exports = (on, config) =\u003e {\n  // https://github.com/bahmutov/cypress-timestamps\n  require('cypress-timestamps/plugin')(on)\n}\n```\n\n## Options\n\nBy default, this plugin adds the timestamps to the error message if a test fails, and to the parent commands in the Command Log. You can also enable printing the test start and end timestamps in the terminal by registering the plugin (see above) and enabling the option when registering the support file.\n\n```js\n// cypress/support/index.js\n\n// https://github.com/bahmutov/cypress-timestamps\nrequire('cypress-timestamps/support')({\n  terminal: true,\n  error: true,\n  commandLog: true,\n})\n```\n\n### terminal\n\nPrints timestamps around each test, prints a timestamp of the screenshot taken on test failure\n\n![Terminal timestamps](./images/screenshot-timestamp.png)\n\n### error\n\nAdds the timestamp to any error thrown by the test\n\n![Error timestamp](./images/timestamp-error.png)\n\n### commandLog\n\nAdds timestamps before each parent command that starts a new chain of commands\n\n![Command Log timestamps](./images/parent-timestamps.png)\n\n### elapsed\n\nWhen printing the timestamps to the command log, you can print either the absolute timestamp (by default), or the time since the test has started.\n\n```js\n// https://github.com/bahmutov/cypress-timestamps\nrequire('cypress-timestamps/support')({\n  commandLog: true,\n  elapsed: true,\n})\n```\n\n![Time since the test started for each command](./images/elapsed.png)\n\n### Stamp all commands\n\nBy default, only the parent and dual commands get a timestamp in the Command Log to avoid verbose clutter. You can enable stamping every command using the `commandLog: \"all\"` option.\n\n```js\n// https://github.com/bahmutov/cypress-timestamps\nrequire('cypress-timestamps/support')({\n  commandLog: 'all',\n  elapsed: true,\n})\n```\n\n![Elapsed time for every command](./images/all.png)\n\n**Tip:** looking to slow down your Cypress tests? Use my [cypress-slow-down](https://github.com/bahmutov/cypress-slow-down) plugin.\n\n## Small print\n\nAuthor: Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt; \u0026copy; 2021\n\n- [@bahmutov](https://twitter.com/bahmutov)\n- [glebbahmutov.com](https://glebbahmutov.com)\n- [blog](https://glebbahmutov.com/blog)\n- [videos](https://www.youtube.com/glebbahmutov)\n- [presentations](https://slides.com/bahmutov)\n- [cypress.tips](https://cypress.tips)\n\nLicense: MIT - do anything with the code, but don't blame me if it does not work.\n\nSupport: if you find any problems with this module, email / tweet /\n[open issue](https://github.com/bahmutov/cypress-timestamps/issues) on Github\n\n## MIT License\n\nCopyright (c) 2021 Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n```\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-timestamps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Fcypress-timestamps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-timestamps/lists"}