Giter Site home page Giter Site logo

anooprav7 / playwright-merge-html-reports Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 5.0 8.58 MB

Merge multiple playwright HTML Reports into a single one

Home Page: https://www.npmjs.com/package/playwright-merge-html-reports

License: Apache License 2.0

HTML 99.20% TypeScript 0.75% JavaScript 0.05%
playwright html-report

playwright-merge-html-reports's Introduction

This repository has moved. Please use the new location

Merge Playwright HTML reports

  • Merge Playwright HTML reports to a single HTML report

  • The index.html file is generated and other artifacts (screenshot, trace file etc) are copied from the source folders to the merged Report folder

  • Built on node 14.18.1.

  • Note: @playwright/test is a peer dependency, not a dev dependency.

  • Inspiration microsoft/playwright#10437

โš ๏ธ Tested on some use cases: Use at your own risk. Still at early stages of development

Usage

npm install playwright-merge-html-reports --dev
  • You will need to install @playwright/test package first (if not already done).
  • In your Node.js script
const { mergeHTMLReports } = require("playwright-merge-html-reports");

Arguments

  1. inputReportPaths - Array of path to html report folders
mergeHTMLReports([
  process.cwd() + "/html_report-1",
  process.cwd() + "/html_report-2"
])
  1. config - Optional
const inputReportPaths = [
  process.cwd() + "/html_report-1",
  process.cwd() + "/html_report-2"
];

const config = {
  outputFolderName: "merged-html-report", // default value
  outputBasePath: process.cwd() // default value
}

mergeHTMLReports(inputReportPaths, config)

Spec

  • TS support
  • Uses jszip and yazl for encoding and decoding zipped content from the index.html file.

Upcoming features

  • Usage directly on Command line

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.