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

bdd-for-all

v1.0.3

Published

Node Wrapper for BDD For All - https://github.com/Accenture/bdd-for-all

Downloads

6

Readme

NPM

BDD For All NPM Wrapper

This is a simple NPM wrapper for the BDD For All library, while we work on a NodeJS port.

Installing

Please note, since this is a simple wrapper for the JAVA application, you will need JAVA 8 (minimum) in your path.

Windows

$ npm install bdd-for-all -g 

Mac/Linux

$ npm install bdd-for-all -g

Usage

This program requires a base configuration file and feature file(s) at a minimum to execute. There is a sample in the samples/ of each. For simple run...

Let's start by creating a configuration file...

  • Create a file called Sample.conf and paste the following. This provides the URL you'll be hitting for your tests...
    bddcore {
      
      request {
      
        server {
          host = "http://www.example.com"
        }
      
      }
      
    }

    Learn more about the configuration options at https://github.com/Accenture/bdd-for-all/blob/develop/docs/CONFIGURATION.md

  • Next, we let's create a sample feature file called Sample.feature
    Feature: Testing out the basic step definitions for JSON
      
      Scenario: Domain override (BS1)
        Given I am a JSON API consumer
          And I am executing test "BS1"
         When I request GET "/"
         Then I should get a status code of 200
  • Now we can run the command...
    $ bdd-for-all -Dconfig.file=Sample.conf -p html:reports/html/ -p json:reports/cucumber.json Sample.feature

As we look at the options above we have...

  • Path to the configuration file we just created
  • Next we use the -p options (for plugin) to produce two reports to disk html and json (can be used in your DevOps pipelines)
  • Finally we have the path to the feature file, this could even be a directory with multiple files

Command Line Options

There are more options available, you can always get this by running...

$ bdd-for-all -h

We use the cucumber runner command line tool.

Options:

  --threads COUNT                        Number of threads to run tests under.
                                         Defaults to 1.
  -g, --glue PATH                        Where glue code (step definitions, hooks
                                         and plugins) are loaded from.
  -p, --[add-]plugin PLUGIN[:PATH_OR_URL]
                                         Register a plugin.
                                         Built-in formatter PLUGIN types: junit,
                                         html, pretty, progress, json, usage, rerun,
                                         testng. Built-in summary PLUGIN types:
                                         default_summary, null_summary. PLUGIN can
                                         also be a fully qualified class name, allowing
                                         registration of 3rd party plugins.
                                         --add-plugin does not clobber plugins of that
                                         type defined from a different source.
  -t, --tags TAG_EXPRESSION              Only run scenarios tagged with tags matching
                                         TAG_EXPRESSION.
  -n, --name REGEXP                      Only run scenarios whose names match REGEXP.
  -d, --[no-]dry-run                    Skip execution of glue code.
  -m, --[no-]monochrome                 Don't colour terminal output.
  -s, --[no-]strict                     Treat undefined and pending steps as errors.
      --snippets [underscore|camelcase]  Naming convention for generated snippets.
                                         Defaults to underscore.
  -v, --version                          Print version.
  -h, --help                             You're looking at it.
  --i18n LANG                            List keywords for in a particular language
                                         Run with "--i18n help" to see all languages
  --junit,OPTION[,OPTION]*               Pass the OPTION(s) to the JUnit module.
                                         Use --junit,-h or --junit,--help to print the
                                         options of the JUnit module.
  -w, --wip                              Fail if there are any passing scenarios.

Feature path examples:
  <path>                                 Load the files with the extension ".feature"
                                         for the directory <path>
                                         and its sub directories.
  <path>/<name>.feature                  Load the feature file <path>/<name>.feature
                                         from the file system.
  classpath:<path>/<name>.feature        Load the feature file <path>/<name>.feature
                                         from the classpath.
  <path>/<name>.feature:3:9              Load the scenarios on line 3 and line 9 in
                                         the file <path>/<name>.feature.
  @<path>/<file>                         Parse <path>/<file> for feature paths generated
                                         by the rerun formatter.

Remember to check out the docs at https://github.com/Accenture/bdd-for-all