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

@jeecg/karma-webdriver-launcher

v1.2.0

Published

A Karma plugin. Launcher for Remote WebDriver instances.

Downloads

10

Readme

karma-webdriver-launcher

A plugin for Karma 0.12 to launch WebDriver instances

A plugin for Karma to launch Remote WebDriver instances. also, you can use remote WebDriver instance by setting true the "remoteHost" options.

see below.

Usage

$ npm install karma-webdriver-launcher

In your karma.conf.js file (e.g. using SauceLabs Connect - you need to have a scout tunnel open for this to work!):

SauceLabs Example

module.exports = function(karma) {

  var webdriverConfig = {
    hostname: 'ondemand.saucelabs.com',
    port: 80,
    user: 'USERNAME',
    pwd: 'APIKEY'
  }


  ...

    config.set({

      ...

      customLaunchers: {
        'IE7': {
          base: 'WebDriver',
          config: webdriverConfig,
          browserName: 'internet explorer',
          platform: 'XP',
          version: '10',
          'x-ua-compatible': 'IE=EmulateIE7',
          name: 'Karma',
          pseudoActivityInterval: 30000
        }
      },

      browsers: ['IE7'],

      ...

    });

pseudoActivityInterval

Interval in ms to do some activity to avoid killing session by timeout.

If not set or set to 0 - no activity will be performed.

Creating private remote test automation system

You can create your private remote test automation system.

2015-06-16 11 02 07

see https://github.com/SeleniumHQ/selenium/wiki/Grid2

Tested Environments

  • VirtualBox WinXP, Win7 (IE6 ~ IE11, Chrome, FireFox)
  • XCode iPhone Simulator (using appium)
  • Android Virtual Device Emulator (using appium)

1. download Selenium Standalone Server and make it work grid mode.

java jar selenium-standalone-server.jar -role hub &

2. setting VM machine that want to use test environments. (e.g. IE7-VM, IE10-VM)

3. start Selenium Standalone Server(hub mode) in VM and make it connect to grid server.

Desktop

java jar selenium-standalone-server.jar -role node -nodeConfig DefaultConfig.json

DefaultConfig.json (VM Machine. installed IE11, Chrome)

{
    "capabilities": [
        {
            "browserName": "chrome",
            "maxInstances": 10,
            "seleniumProtocol": "WebDriver"
        }, {
            "browserName": "IE11",
            "maxInstances": 10,
            "seleniumProtocol": "WebDriver"
        }
    ],
    "configuration": {
        "maxSession": 5,
        "port": 5555,
        "host": "2.2.2.2"    // VM ip address
        "register": true,
        "hubPort": 4444,
        "hubHost": "1.1.1.1"    // hub server ip address
    }
}

Mobile

install nodejs upper v0.12, install appium

npm install -g appium

install XCode iPheon Simulator, Android Virtual Device Emulator and prepare testing environments. see appium

run appium server

my startup script.

#!/bin/bash

cd ~
./Android/tools/emulator -avd Nexus_4_5.1.1 &

sleep 30

appium --port 5555 &

sleep 20

appium --nodeconfig /Users/mypc/WebDriver/nodeconfig.json

nodeconfig.json

{
    "capabilities": [
        {
            "browserName": "Safari",
                "version": "8.3",
                "maxInstances": 1,
                "platform":"MAC"
        }, {
            "browserName": "Browser",
            "version": "5.1.1",
            "maxInstances": 1,
            "platform": "MAC"
        }
    ],
    "configuration":
    {
        "cleanUpCycle":2000,
        "timeout":30000,
        "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
        "url": "http://2.2.2.2:4723/wd/hub",    // VM ip address
        "host": "2.2.2.2",    // VM ip address
        "port": 4723,
        "maxSession": 1,
        "register": true,
        "registerCycle": 5000,
        "hubPort": 4444,
        "hubHost": "1.1.1.1"    // hub server ip address
    }
}

4. insert grid server's info to karma-webdriver configs.

karma.conf.js

var webdriverConfig = {
    remoteHost: true,
    host: "1.1.1.1",
    port: 4444
};

...

config.set({
    browsers: [
        'Android',
        'iOS'
    ],

    ...

    customLaunchers: {
        'Android': {
            base: 'WebDriver',
            config: webdriverConfig,
            browserName: 'Browser',
            platformName: 'Android',
            platformVersion: '5.1.1',    // avd device version
            deviceName: 'emulator-5554'    // avd device id
        },
        'iOS': {
            base: 'WebDriver',
            config: webdriverConfig,
            browserName: 'Safari',
            platformName: 'iOS',
            platformVersion: '8.3',
            deviceName: 'iPhone 4s'
        }
    }
});

you can apply this javascript project CI server.