{"_id":"@andrius-vet/wdio-timeline-reporter","name":"@andrius-vet/wdio-timeline-reporter","dist-tags":{"latest":"5.1.5"},"versions":{"5.1.5":{"name":"@andrius-vet/wdio-timeline-reporter","version":"5.1.5","description":"A WebdriverIO reporter. Creates a simple HTML report after test runs","main":"build/timeline-reporter.js","scripts":{"clean":"rimraf ./build","build":"npm run clean && tsc","release":"np patch","release:patch":"npm run build && np patch","release:minor":"npm run build && np minor","release:major":"npm run build && np major","test":"mocha -r ts-node/register ./tests/*.ts","prepublish":"npm prune"},"directories":{"lib":"./build"},"repository":{"type":"git","url":"git+https://github.com/QualityOps/wdio-timeline-reporter.git"},"keywords":["timeline","reporter","webdriverio","wdio","wdio-plugin","wdio-reporter"],"author":{"name":"dev@qops.io"},"license":"MIT","bugs":{"url":"https://github.com/QualityOps/wdio-timeline-reporter/issues"},"dependencies":{"@wdio/logger":"^5.8.0","@wdio/reporter":"^5.7.8","date-fns":"^2.2.1","humanize-duration":"^3.18.0","jimp":"^0.14.0","react":"^16.6.3","react-dom":"^16.6.3"},"devDependencies":{"@types/chai":"^4.1.7","@types/humanize-duration":"^3.18.0","@types/mocha":"^5.2.6","@types/node":"^12.0.2","@types/react":"^16.7.6","@types/react-dom":"^16.0.9","chai":"^4.2.0","circular-json":"^0.5.7","mocha":"^6.1.4","np":"^3.0.4","rimraf":"^2.6.2","ts-node":"^8.1.0","typescript":"^3.4.5"},"gitHead":"9a82659396594c0c6360d7e657744873910e040e","homepage":"https://github.com/QualityOps/wdio-timeline-reporter#readme","_id":"@andrius-vet/wdio-timeline-reporter@5.1.5","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-fZknEJDlZI/rwlugEk8eKEIhycf1HjQVyuTMQBoT0ZEKea/opELJ6ohtSAF7i7m10NNn2xvUN/q+AtT2RhTKbA==","shasum":"641f92b88f1224cf539e821214537203344e5a4c","tarball":"https://registry.npmjs.org/@andrius-vet/wdio-timeline-reporter/-/wdio-timeline-reporter-5.1.5.tgz","fileCount":46,"unpackedSize":15150369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHyuKfo2MTHbJ/TIU0siKkV3S19TrtGMhudGR1h8CZ22AiEA2bCYSnRj6kz/GKrpCqECccFuW76VsirAYlyoKX6/6EQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtUfLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8phAAiGkAqOAjRu0PIeo84RQbVY/5pkMk811vxmJriqwhRq6r8Kg2\r\nBHlB82COxx4aEJVSDsL4j/mUbOab2bkCQZdhlLH+m/pDpD5vJdpHE1F8JJvv\r\nsquoh7Xe5m1UkYdaA7w5f/75PNTlHMwhu99DuekKKADLLU0iGHSz89t+U/OJ\r\nrdyEEvDENCgcdfNXjqw5m8JcIjdPphLxGg0C4z9US0fc4hZQxgtUKyMYaewW\r\nz14ZoElKdghF8NwiKdwXL7b2YxRJoGWYPQqtkj67l7w6ywA/BhtOKM781lEr\r\ngiQuE4PHOQXx6U6mA4hsqYFYZuHY7tVW9tJamXAYZeeckwveO7FXE+/6Q7mB\r\nkbL4Tj8lO9VwjgCLzmL3Xk9gUhGY3jfsdLAgG0dJpQ0FD+ktUWGQamlT5vRS\r\n96kMx14p94gPB/OAeP/kVyD9Rvz0I/IunzsOQKpGn5pDqJy0Z6svPtZ+LiJ7\r\n86fb1izxBJH6PusyCjgPGBnJ7efpysIqDdDA31J09gniwoAQwuEE1/3OcOXh\r\nTwCK9TVZyfsq6KiNfEn8MyS4SCJLW7wVHbrLYzD9Dv9zyNVLJwx4nwswF5ax\r\nInb8szXnToqpw50PcDrHt0t9PL7dMl47/hqPdp2Q8GeacM8AUzqhsiipdiDX\r\nQFigUJAbCMzhX4foTCmq3HGrvMV3+jWaSqU=\r\n=VsBC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"andrius-vet","email":"vet.andrius@gmail.com"},"maintainers":[{"name":"andrius-vet","email":"vet.andrius@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wdio-timeline-reporter_5.1.5_1672824779615_0.10269687027816854"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-04T09:32:59.536Z","5.1.5":"2023-01-04T09:32:59.933Z","modified":"2023-01-04T09:33:00.188Z"},"maintainers":[{"name":"andrius-vet","email":"vet.andrius@gmail.com"}],"description":"A WebdriverIO reporter. Creates a simple HTML report after test runs","homepage":"https://github.com/QualityOps/wdio-timeline-reporter#readme","keywords":["timeline","reporter","webdriverio","wdio","wdio-plugin","wdio-reporter"],"repository":{"type":"git","url":"git+https://github.com/QualityOps/wdio-timeline-reporter.git"},"author":{"name":"dev@qops.io"},"bugs":{"url":"https://github.com/QualityOps/wdio-timeline-reporter/issues"},"license":"MIT","readme":"# Wdio Timeline Reporter\n\n[![Build Status](https://travis-ci.org/QualityOps/wdio-timeline-reporter.svg?branch=master)]()[![NPM version](https://badge.fury.io/js/wdio-timeline-reporter.svg)]()[![npm](https://img.shields.io/npm/dm/wdio-timeline-reporter.svg?maxAge=2592000)]()\n\n> A one stop shop WebdriverIO reporter for an aggregated visualisation of your test results because \"Seeing is believing\"\n\n![example.png](./images/example.png)\n\n## Why\n\nBecause we spend a lot of time debugging failing tests switching from terminal output to viewing error screenshots etc. This reporter aggregates all the typical information you will need into one report. Run tests and have a nice timeline of events you can look back at to further verify everything looks ok.\n\n#### Features include:\n\n- Works great with Mocha and Jasmine frameworks. Also works with Cucumber but every step will be reported as a test\n- Loud Summary of the Test Results.\n- Detail of each test run including all screenshots captured during test execution.\n- Test Results filtering. Great for focusing on failed tests\n- Error stack trace attached to test.\n- Ability to add additional information to test at runtime.\n- No post processing required. On completion of wdio test process, a static html report file will get generated.\n- Timeline service to manage the taking of screenshots including resizing of the images.\n\nAn example html report can be found [here](http://htmlpreview.github.io/?https://github.com/QualityOps/wdio-timeline-reporter/blob/master/images/example-timeline-report.html)\n\nInstructions on how to install `WebdriverIO` can be found [here](http://webdriver.io/guide/getstarted/install.html).\n\n## Installation\n\n**FOR VERSION COMPATIBLE WITH WEBDRIVERIO V4 SEE [HERE](https://github.com/QualityOps/wdio-timeline-reporter/tree/v4)**\n\n```shell\nnpm install --save wdio-timeline-reporter\n```\n\nA dependency will be added to your `package.json`\n\n```json\n{\n  \"dependencies\": {\n    \"wdio-timeline-reporter\": \"^5.1.0\"\n  }\n}\n```\n\n### Usage\n\nAdd `timeline` to the reporters array in your wdio config file.\n\nAlso import and add `TimelineService` from wdio-timeline-reporter.\n\nService is mandatory to combine reports and create html as reporters are now initialised per runner instance in webdriverio 5. [See open discussion on webdriverio](https://github.com/webdriverio/webdriverio/issues/3780)\n\nThe TimelineService can also manage taking of screenshots during tests execution. You have the option to reduce the size and quality of the images and to embed the images into the report as base64. These are configurable using the [reporter options.](#reporter-options)\n\n```js\n// wdio.conf.js\nconst { TimelineService } = require('wdio-timeline-reporter/timeline-service');\nexports.config = {\n  // ...\n  reporters: [['timeline', { outputDir: './desired_location' }]],\n  // ...\n  services: [[TimelineService]]\n};\n```\n\n### Reporter Options\n\nIf you wish to override the default reporter configuration add a reporterOptions object literal to timeline array under reporters as shown below.\n\n![reporter-options.png](./images/reporter-options.png)\n\n| index | description                                                                                                                                                                                            |\n| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 1.    | Directory where html file and screenshots will be created in. Mandatory option                                                                                                                         |\n| 2.    | Name of report html file. Default value is `timeline-report.html`                                                                                                                                      |\n| 3.    | Embed images as base64 in html file. Default value is `false`                                                                                                                                          |\n| 4.    | Object options for image manipulation                                                                                                                                                                  |\n| 5.    | Set JPEG quality. Only relevant if `resize` option is `true`. The smaller the value, the smaller image size and quality would be. Default value is `70`. Max value allowed is `100`                    |\n| 6.    | Resize image. Default value is `false`                                                                                                                                                                 |\n| 7.    | value to decrease the total number of pixels by. Only relevant if `resize` option is true. Defaults to `1` Valid values `1 - 5`                                                                        |\n| 8.    | how often to take screenshots. Supported values are `on:error`, `before:click`, `none`. Defaults to `none`. `before:click` is a great option for creating a timeline of screenshots of app under test. |\n\n### Add Additional information to test context\n\nIt is possible to add additional information to a test using the `addContext` static method. This can be useful for adding important information that could help in debugging failed tests for example a user created during the test run with a dynamic username\n\n#### Basic usage\n\nThe `TimelineReporter.addContext` static method accepts either a string parameter or an object literal with two properties `title` and `value` e.g\n\n```js\n{ title: 'sessionId', value: 'b59bb9ec-ab15-475e-9ce6-de8a14ca0cd3' }\n```\n\nvalue could be also be a link\n\n##### Mocha example\n\n```js\nconst TimelineReporter = require('wdio-timeline-reporter').default;\n\ndescribe('Suite', function() {\n  it('Test', function() {\n    // object literal parameter\n    TimelineReporter.addContext({\n      title: 'Test User',\n      value: 'user id created during the test'\n    });\n\n    // value as anchor tag\n    TimelineReporter.addContext({\n      title: 'Dynamic link',\n      value: '<a href=\"\">Some important link related to test</a>'\n    });\n\n    // string parameter\n    TimelineReporter.addContext('This test might be flaky');\n  });\n});\n```\n\n## Acknowledgement\n\nWould love to give a shout out to the authors and maintainers of [wdio-json-reporter](https://github.com/fijijavis/wdio-json-reporter) Going through their v5 solution helped speed up my work\n","readmeFilename":"README.md"}