Giter Site home page Giter Site logo

bibekad123 / automation-report Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 32 KB

Python package to generate HTML report of your automation cases and its steps with its valid status.

License: MIT License

HTML 28.81% Python 47.72% CSS 23.46%
html-report python automation-test automation-reports automation-reporting automation-report

automation-report's Introduction

automation-report

Downloads

Python package to generate HTML report of your automation or test cases with:

  • Supports multiple test cases and its steps with valid status
  • Well displayed chart according to the test results
  • Dynamic HTML Report contents, user allowed to modify accordingly

Installation

$ pip install automation-report

Code Example

Importing package :
from automation_report.report import AutomationReport
Passing optional 'options' dictionary as parament with following keys
  • LogoImage : Provide URL of the image
  • MainHeader: When header text is to be used instead of logo
  • FooterContent: Provide HTML content to add on the footer section
options = {}
#options["LogoImage"] = "logo.png"
options["MainHeader"] = "Automation Report"
options["FooterContent"] = "<a href='#'> Footer link </a>" 
Create new object for your first test with Report name and optional options dictionary
new_report = AutomationReport("Login Test", options)
Use starttest() method to start a new case with its name given as parameter
new_report.starttest("CASE 0001: Login to the system")
Populate the various steps status with info(), success(), fail() methods for particular case
new_report.info("Entered email in email field")
new_report.success("Login Successfully:")
End above started case
new_report.endtest()
Create yet another case as following
new_report.starttest("CASE 0002: Logout User")
new_report.info("User is logged in")
new_report.success("Logout link is present")
new_report.fail("User not logged out")
new_report.endtest()
Use close method to finally complete whole report generation
new_report.close()

Screenshots of report of above code:

Automation Report

Automation report

automation-report's People

Contributors

bibekad123 avatar

Stargazers

 avatar  avatar  avatar Ronie Martinez avatar Nabin Shrestha avatar

Watchers

 avatar

Forkers

quaresmeira

automation-report's Issues

Possible modifications

I was looking for a way to create a report and tried this project. This is a great tool!

I just have a few comments:

  1. Make the title customizable. Probably changing Automation Report to a name of the tool that generated it and add a few things like logo. We can move the project links or credits to the footer of the page.
  2. Support test suites. Test suites are common to group tests together.
  3. Long texts does not wrap on small screens. Just noticed when I add a long non-breaking string like a URL, the tables extend outside of the screen.
  4. Smaller font. When there are lots of tests being performed, it seems that only a few is visible on the screen. This can be customizable.

Cheers!

Additonal logs/data logging

  1. Support to add any additional data/tables to testcase result

Can you add support to add other data captured as part of testcase like db query data or any tabuler data under testcase. It whould be flawless for any usecase if support to add dynamic tab to testcase and log data to that tab. and utils to log dict as table as well.

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.