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

webdriverio-server

v3.0.3

Published

Server for running webdriverio tests

Downloads

72

Readme

webdriverio-server

npm version build status

If you want a remote server to do selenium testing, this is a better way

Terminology

Canonical screen-shot: Producing screen-shots that can be compared between different computers can be quite difficult. Often subtle differences in systems, such as what fonts are installed can result in widely varying screen-shots. Therefore the right thing to do when using webdrivercss is to have a known-good system to produce all screen-shots. One approach to this is to set up webdriverio-server on a dedicated server somewhere and have webdriverio-client send all requests for selenium tests to that machine. Another approach is to use a system that can consistently produce the same machine each time (e.g. using Docker). This way developers can each have their own independent systems for running tests which are identical to each other and to the CI system.

Test server: There will be a dedicated server process that can either run locally or on another machine for the purposes of getting testing requests, processing them, and sending back results.

Setup

There are two use-cases for implementing webdriverio-server:

  1. Running tests on a laptop (Mac OS/X) in order to watch the progress and to visually inspect how a test is executing. Note that this will not produce canonical screenshots that can be used across a team.

  2. Running tests for the purpose of creating canonical screen-shots that can be checked in as part of a pull-request.

Installing on OS/X

Install the following dependencies:

Next install webdriverio-server and run the init script:

npm install -g webdriverio-server
webdriverio-server-init local

Now you're ready to run the web service which will respond to test-upload requests:

DEBUG=server PORT=3000 webdriverio-server

In this case, you'll be sending test requests to localhost on port 3000.

Installing on Docker

If you want to share screenshots between developers, you'll need to set up a testing system that produces 100% consistent images. This can be done by doing the above steps on a dedicated server or by setting up a Docker system on developer systems and the CI system. The canonical setup requires that you have Docker installed with appropriate permissions for running user.

npm install -g webdriverio-server
webdriverio-server-init docker

To start the testing server, use the run command:

$ docker run -Pd webdriverio-server
34a841cb50a0555e40060367c862d50f823c0edcd0a2fe6537b5666f7588e73d

To stop the test container, run docker stop with the image id that docker provided, e.g.

$ docker stop 34a841cb50a0555e40060367c862d50f823c0edcd0a2fe6537b5666f7588e73d
34a841cb50a0555e40060367c862d50f823c0edcd0a2fe6537b5666f7588e73d

In this case, you'll be sending test requests to the docker server. Note that docker maps ports on the container to random ports on the host machine. To find out what ports

Using the server

Now that you have a running webdriverio-server, you need to be able to submit tests to it. This is not a trivial procedure. You will need to set up your testing directory properly and to submit a tarball to the server with your entire site in it, packaged up properly with the existing screenshots, if applicable.

To make this easier, utilize the webdriverio-client to make test requests.