npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

protractor-build-verification-testreport

v0.0.9

Published

A Node.js module used to generate readability HTML test report based on Protractor environment

Downloads

13

Readme

protractor-build-verification-testreport

Build verification test (Smoke testing ,Confidence testing, Sanity testing) is done by testers before accepting a new build. Build verification test is also one of the most cost-effective method for identifying and fixing defects in software.

protractor-build-verification-testreport provides a Node.js module used to generate readability HTML test report based on Protractor environment. If Protractor is an equipment in your build verification test process, protractor-build-verification-testreport could help you doing test report tasks effectively.

Logo

Install

npm install protractor-build-verification-testreport@latest -save-dev

Configure

Your Protractor config file:

var verTestReport = require('protractor-build-verification-testreport');
var config = {
  ...
  onPrepare: verTestReport.onPrepare,
};

exports.config = config;

The Protractor config file example provided in project

var verTestReport = require('protractor-build-verification-testreport);
var config = {
  seleniumAddress: process.env.SELENIUM_ADDRESS || 'http://localhost:4444/wd/hub',
  directConnect: true,
  capabilities: {
    'browserName': 'chrome'
  },
  framework: 'jasmine2',
  specs: ['spec.js'],
  onPrepare: verTestReport.onPrepare,
};

exports.config = config;

Learning by example

Spec example

Protractor config file and spec example are provided in example folder.

<YourNodeProject>
  ...
  /node_modules
      /protractor-build-verification-testreport
          /example/
            conf.js
            spec.js

Run test

$ cd <YourNodeProject>
$ cd node_modules/protractor-build-verification-testreport/example
$ protractor conf.js

You need Selenium and Protractor

wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar
java -jar selenium-server-standalone-2.53.1.jar
sudo npm install -g protractor

The generated test report

After you successfully run the spec example, you should get "3 specs, 1 failure" and a new folder named "screenshots" will be created after the Protractor job is done. The spec example intentially writes test cases for 2 passed and 1 failed.

The screenshots folder consists of a collection of generated HTML files. The number of the HTML files depends on the number of your specs. Each spec will generate one HTML test report. With this example, protractor-build-verification-testreport will generate 3 HTML files.

<YourNodeProject>
  ...
  /node_modules
      /protractor-build-verification-testreport
          /example/
             conf.js
             spec.js
             /screenshots
                  spec0_passed_Mac OS X_chrome_59.0.3071.115_Tue Aug 01 2017 09:02:39 GMT+0700 (+07).html
                  spec1_passed_Mac OS X_chrome_59.0.3071.115_Tue Aug 01 2017 09:02:42 GMT+0700 (+07).html
                  spec2_failed_Mac OS X_chrome_59.0.3071.115_Tue Aug 01 2017 09:02:44 GMT+0700 (+07).html

Information in the file

Filename pattern

{SpecID}_{TestStatus}_{OSPlatform}_{BrowserName}_{BrowserVersion}_{DateTime}.html

Filename examples

spec0_passed_Mac OS X_chrome_59.0.3071.115_Tue Aug 01 2017 09:02:39 GMT+0700 (+07).html
spec1_passed_Mac OS X_chrome_59.0.3071.115_Tue Aug 01 2017 09:02:42 GMT+0700 (+07).html
spec2_failed_Mac OS X_chrome_59.0.3071.115_Tue Aug 01 2017 09:02:44 GMT+0700 (+07).html

Example HTML content

The content consists of two parts

  1. Test information including TestDate, SpecStatus, SpecDescription, SpecFullName, Platform, and Browser.
  2. Screenshort using base64 image inline

Logo

Doing build verification test with protractor-build-verification-testreport

protractor-build-verification-testreport offers a very small node.js module to generate readability E2E test report. The generated HTML files will be saved in the screenshots folder and you can choose to share the screenshots folder as deployment acceptance criteria among the project team. The content of the report is adequate for precise communication with general web application testing. You can also choose to attach the test report into your software configuration management software.

License

The MIT License (MIT)

Copyright (c) 2016 Vorachet Jaroensawas

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project page is available at http://vorachet.github.io/protractor-build-verification-testreport