GithubHelp home page GithubHelp logo

nangs / ghpr.core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ghpreporter/ghpr.core

0.0 0.0 0.0 6.52 MB

Easy-to-use .NET Html QA Reporting framework (Core repository)

Home Page: http://ghpreporter.github.io/

License: MIT License

C# 61.37% CSS 1.90% HTML 8.84% TypeScript 27.16% Batchfile 0.03% PowerShell 0.70%

ghpr.core's Introduction

Project icon

Some links:
Core | MSTest | MSTestV2 | NUnit | SpecFlow | Console | Site Repo

Build status Build status NuGet Version Coverage Status codecov Codacy Badge CodeFactor FOSSA Status

Ghpr.Core

Easy-to-use .NET test reporting tool for several testing frameworks

Usage

Testing framework Repository Nuget version Examples Repository CI
Core Ghpr.Core NuGet Version - Build status
NUnit 3 Ghpr.NUnit NuGet Version View examples Build status
MSTest Ghpr.MSTestV2 NuGet Version View examples Build status
SpecFlow Ghpr.SpecFlow NuGet Version View examples Build status
Console App Ghpr.Console NuGet Version - Build status

Demo Report

You can view Demo report on our site

Release notes

You can find it here for all packages.

About Settings file

Standard settings file is .json file with the following structure:

{
  "default": {
    "outputPath": "C:\\_GHPReporter_Core_Report",
    "dataServiceFile": "Ghpr.LocalFileSystem.dll",
    "loggerFile": "",
    "sprint": "",
    "reportName": "GHP Report",
    "projectName": "Awesome project",
    "runName": "",
    "runGuid": "",
    "realTimeGeneration": "True",
    "runsToDisplay": "5",
    "testsToDisplay": "5",
    "escapeTestOutput":  false,
    "retention": {
      "amount": 1000,
      "till": "2017-01-25 10:00:00"
    }
  },
  "projects": [
    {
      "pattern": "*CoolTests.dll",
      "settings": {
        "outputPath": "C:\\_GHPReporter_Core_Report\\CoolTests"
      }
    },
    {
      "pattern": "*AwesomeTests.dll",
      "settings": {
        "outputPath": "C:\\_GHPReporter_Core_Report\\AwesomeTests"
      }
    }
  ]
}

For Ghpr.Core it is called Ghpr.Core.Settings.json. This file is included in NuGet package. For different testing frameworks (MSTest, NUnit, SpecFlow) there are separate settings files. Separate files are needed to let Ghpr.Core use different settings for different testing frameworks.

The default section stands for defalut configuration, which includes the following information:

  • runsToDisplay: if > 0 the reporter will load only this specified number of the latest runs on test run page.

  • testsToDisplay: if > 0 the reporter will load only this specified number of the latest test runs on test history page.

  • dataServiceFile: the name of the library which contains implementation of IDataService, will be distributed as a separate NuGet package will you should include as a dependency in your solution with tests. Can't be empty.

  • loggerFile: the name the library that will be used for internal logging of Ghpr itself.

  • escapeTestOutput: boolean value to tell Ghpr to escape some characters like < and > inside test output tabs.

  • retention - settings for running clean up job:

    • amount - total runs that will be left, all other will be deleted.

    • till - all runs with finish date older than this value will be deleted. Date format is yyyy-MM-dd hh:mm:ss

projects section is the array of pairs pattern and settings.

  • pattern - is a wildcard for you project name.

  • settings - has the same structure as default sections. If your project name matches the pattern then settings section will be applied (instead of default section) as GHPReporter settings for your test run.

View report locally

Firefox

  • Go to about:config
  • Find security.fileuri.strict_origin_policy parameter
  • Set it to false
  • Please make sure to restart the browser

Chrome

  • Close your all instances of your Chrome
  • Launch the new instance with --allow-file-access-from-files option:
    • eg C:\PATH_TO\chrome.exe --allow-file-access-from-files

How to publish the report in Jenkins

  • In the configuration of your job, in the "Post-build actions", you just have to add a "Publish HTML reports" with the correct informations.

Known Issues :

  • Due to the CSP (Content Security Policy), the report used for the functionals tests is not viewable on Jenkins with the default value defined for the CSP. So, for solving this issue, the CSP is automatically forced after each restart with a specific value. For that, a line is added in the C:\Program Files (x86)\Jenkins\jenkins.xml file, like this : ... -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle "-Dhudson.model.DirectoryBrowserSupport.CSP=" -jar -Dmail.smtp.starttls.enable=true "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war" ...

  • The screenshots generated with Selenium work only when there were made with browsers like Firefox or Chrome (Doesn't work with IE)

Contributing

Anyone contributing is welcome. Write issues, create pull requests.

License

FOSSA Status

ghpr.core's People

Contributors

elv1s42 avatar dependabot-preview[bot] avatar dependabot-support avatar betrisey avatar jmemmons avatar nunomdc avatar code-factor avatar

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.