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

wd-ct

v5.0.0

Published

Run WebDriver for combinatorial testing

Downloads

35

Readme

WebDriver for combitorial testingBuild Status Coverage Status Code Climate

Sauce Test Status

Overview

testcase

overview-testcase

interaction script

overview-interaction

Getting Started

$ npm install -g wd-ct
$ wd-ct -s
Are you sure you want to generate testcase? (y / n)
> (n) y
Input testcase file name.( csv, xls, xlsx extension is permitted )
> (testcase.csv) 
Are you sure you want to generate interaction.js? (y / n)
> (n) y
Input interaction script name
> (interaction.js) 
Input source of testcase
> (testcase.csv) 

Usage

$ wd-ct --help

##############################################
#  ██╗    ██╗██████╗        ██████╗████████╗ #
#  ██║    ██║██╔══██╗      ██╔════╝╚══██╔══╝ #
#  ██║ █╗ ██║██║  ██║█████╗██║        ██║    #
#  ██║███╗██║██║  ██║╚════╝██║        ██║    #
#  ╚███╔███╔╝██████╔╝      ╚██████╗   ██║    #
#   ╚══╝╚══╝ ╚═════╝        ╚═════╝   ╚═╝    #
##############################################

Usage: node /Users/sideroad/workspace/wd-ct/bin/wd-ct [options]
Display usage
    -h, --help
Continue to execute test even though error occurred
    -f, --force
Capture page when error occurred. please set captured image directory path
    -es, --error-screenshot <value>
Use saucelabs ( Please set SAUCE_USERNAME, SAUCE_ACCESS_KEY environment before execute )
    -sl, --saucelabs
Execute only specified row number test
    -rn, --rownum <value>
Interation start column index number should be set
    -sc, --start-column <value>
Pause on error
    -pe, --pause-on-error
Stepwise execution
    -sw, --stepwise
Generate interaction script and testcase file from template
    --scaffold
Not apply color to console
    -nc, --no-color
Browser ( comma separatted )
    -b, --browsers <value>
Not output logging
    -nl, --no-logging
Prepare stored variable before execution (JSON format)
    --store <value>
Target interaction file
    -i, --interaction <value>
Target testcase file
    -t, --testcase <value>

Concreate interaction script and testcase file.

Referrence for interaction as wd and assertion as chai.

Advanced

Store value

When you want to use variable after the command. wd-ct prepare store object for keeping variable. Benefit to use store object is to be able to check variable when break command executed. break command will be explain in next section.

        return this.get('http://www.google.com/')
                   .url()
                   .then(function(url){
                        store.url = url;
                   })

Debugging

wd-ct provides bunch of approach for effective debug

Pause options

  • Stepwise execution Will be pause after each command execution wd-ct --stepwise ...

  • Break on error Will be pause when error occurred wd-ct --break-on-error ...

Pause command

If you want to pause manually, break method can be used for pause.

return this.get('http://www.google.com/')
           .break()  // will be pause on here
           .url()

During paused, we can check stored variable on store object.

// interaction.js
// ...
        return this.get('http://www.google.com/')
                   .url()
                   .then(function(url){
                        store.url = url;
                   })
                   .break();
// ...

Debugging console log is below.

Input command or press enter to continue.
> store
{ url: 'https://www.google.co.jp/?gfe_rd=cr&ei=zZX5U-iUJOiT8QequICIBA&gws_rd=ssl' }
Input command or press enter to continue.
> store.url
https://www.google.co.jp/?gfe_rd=cr&ei=zZX5U-iUJOiT8QequICIBA&gws_rd=ssl
Input command or press enter to continue.
> 

Other options for debug

  • Capture page when error occurred wd-ct --error-screenshot ...

  • Continue to execute test even though error occurred wd-ct --force ...

Additional methods

wd-ct provides additional wd methods.

fire

Fire event for specified DOM element

return this.elementByCss('#foo')
           .fire('change')

naturalType

This is a alias to emulate typing below

return this.elementByCss('input[type="text"]')
           .naturalType('foo')

is same as

return this.elementByCss('input[type="text"]')
           .fire('focus')
           .clear()
           .type('foo')
           .fire('change')
           .fire('blur')

select

select option of selectbox

return this.elementByCss('#selectbox')
           .select('banana')