New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

com.github.adiralashiva8:testng-metrics

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.github.adiralashiva8:testng-metrics

A HTML Report of test executions via TestNG

  • 1.6
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

TestNg Metrics Report

TestNg Metrics is a custom report generated using TestNG Listener. Which generate awesome html report without making any changes in your existing automation code

Maven Central PRs Welcome Maintenance Open Source Love png1


  • Sample Report link

Best viewed in desktop!


Key Features

  • Dashboard View of execution results
  • Top 10 Test Performances
  • Sort and Search Results
  • Export Results (pdf, excel, csv, print)
  • No Code changes required
  • Metrics of After* and Before*
  • Display dataprovider info for tests

Pre-requisite

  • JDK 8+
  • TestNG 6+

How to use in Project:

Maven:

  1. Add testng-metrics dependency in pom.xml

    <dependency>
      <groupId>com.github.adiralashiva8</groupId>
      <artifactId>testng-metrics</artifactId>
      <version>1.6</version>
    </dependency>
    
  2. Perform maven install

  3. Execute test cases

  4. TestNg Metrics report file will be created

    By default report will be generated at TestNG's output directory. i.e., test-output/metric.html


Not a Maven Project?

  1. Download testng-metrics.jar from here

  2. Add testng-metrics.jar in your project

    • Open Eclipse → Right click on the project
    • Go to Property → Build Path → Configure Build Path
    • Add the testng-metrics.jar in the libraries using Add External Jar button
  3. Execute test cases

  4. TestNg Metrics report will be generated


Customize Report:

  • Custom Logo: Logo can be modified by modifying:

    testng.metrics.report.logo parameter value in testng.xml

    Example:

      <suite name="Suite">
      <parameter name="testng.metrics.report.logo" value = "https://i.ibb.co/FqtQyC5/rfh.png"/>
        <test name="Test">
          <classes>
            <class name="com.github.functional.FunctionalSample"/>
          </classes>
        </test>
      </suite>
    
  • Custom Report Name: Similar to Custom Logo user can be modify report name by modifying:

    testng.metrics.report.name parameter value in testng.xml

    Example:

    <parameter name="testng.metrics.report.name" value = "regression.html"/>
    

    This helps in create different reports for different cases

  • Report With Timestamp: Helps to create new file by appending timestamp to report every time

    testng.metrics.report.appendTimestamp parameter value in testng.xml

    Example:

    <parameter name="testng.metrics.report.appendTimestamp" value = "True"/>
    

Thanks for using testng-metrics!

  • What is your opinion of this report?
  • What’s the feature I should add?

If you have any questions / suggestions / comments on the report, please feel free to reach me at


Special Thanks To:

Contributors:

  1. Krishnan Mahadevan

    • Mavenised the project ( To consume it from Maven library )
    • Converted the utility into a TestNg listener
    • Guided to publish the library into Maven Central
  2. Saurabh Gupta

    • Contributed source to display data-provider info in Test Metrics
    • Added brand LOGO for TestNG Metrics
  3. Nainappa Illi

    • Contributed source to archive test-output folder and display execution time

Feedback:

  1. Venkateswara Reddy G

  2. Testng Users Community


:star: repo if you like it


Inspired from robotframework-metrics


FAQs

Package last updated on 08 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc