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

nemo-saucelabs

v5.0.1

Published

updates Sauce Labs jobs with test information and test results

Downloads

23

Readme

nemo saucelabs

nemo.js integration with Saucelabs.com

npm Dependency Status Code Climate License

This plugin exposes methods to update the metadata of running Sauce Labs job, e.g. Test Name, Test tags, Build Id and Test result (Pass/Fail) on Sauce Labs dashboard. It also exposes a method to get Job URL to print on your test reports. Once nemo-saucelabs plugin is registered, you will have nemo.saucelabs object available.

This is v3 of this plugin, which requires as a peer dependency nemo@^3.0.0-alpha.6, which in turn required node v6 or later

Installation and usage

Use npm to install nemo-saucelabs into your project:

npm install --save-dev nemo-saucelabs@^3.0.0

for Cucumber 2, install >v5.0.0. Mocha is supported as is.

npm install --save-dev nemo-saucelabs@^5.0.1

Then, define the nemo-saucelabs plugin in your config/config.json under plugins section and specify Sauce Labs username and accessKey under serverCaps section:

  "plugins": {
    "saucelabs": {
      "module": "nemo-saucelabs"
    }
  },
  "driver": {
    "browser": "chrome",
    "server": "http://sauce-username:[email protected]:80/wd/hub",
    "serverCaps": {
      "username": "sauce-username",
      "accessKey": "sauce-access-key", // not a real access key
      "platform": "MAC",
      "version": "27.0"
    }
  }

Methods

1. Update Sauce Labs Job: updateJob(data)

request fields:

name:           [string] update the job name,
cucumber_tags:  [scenario.getTags()] nemo-saucelabs will traverse cucumber tags and get tag names to update the job tags
tags:           [list of strings] array of tags to update the job tags,
build:          [int] The build number being tested,
custom-data:    [JSON] a set of key-value pairs with any extra info that a user would like to add to the job. Max 64KB.

example:

var options = {
  name: scenario.getName(),
  cucumber_tags: scenario.getTags(),
  build: build_id,
  custom-data: {
    testInfo: 'information about test or cause of test failure...'
  }
};

nemo.saucelabs.updateJob(options)
  .then(function() { /* process success results */ })
  .catch(function(err) { /* process error */ });
2. Update Sauce Labs Job Result: isJobPassed(isPassed)

request fields:

passed: [boolean]

example:

var isPassed = test.isPassed();
nemo.saucelabs.isJobPassed(isPassed)
  .then(function() { /* process success results */ })
  .catch(function(err) { /* process error */ });
3. Get Sauce Labs Job URL: getJobUrl()

example:

nemo.saucelabs.getJobUrl()
  .then(function(url) { /* do something with url e.g. `console.log` */ })
  .catch(function(err) { /* process error */ });
// example saucelabs url: https://saucelabs.com/tests/153a38fac7ab48869e7b3b9c3c567665