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

redline13-webdriver

v0.8.119

Published

RedLine13 harness for running webdriver test on RedLine13 platform and capturing api metrics through the browser for chrome, chrome-headless, firefox, firefox-headless, phantomjs

Downloads

1,011

Readme

RedLine13 Peformance Testing with WebDriver

Runs WebDriver test to collect performance data and exports Apache JMeter data (as a .jtl)

  • PhantomJS - supports exporting performance data in realtime
  • Chrome - supports exporting performance data at end of test, realtime metrics available using Performance APIs
  • Chrome Headless - supports exporting performance data at end of test, realtime metrics available using Performance APIs
  • Firefox - performance data is extraced realtime using Performance APIs
  • Firefox Headless - performance data is extraced realtime using Performance APIs
  • IE - not supported
  • Safari - not supported

installing

npm install redline13-webdriver

integrating with your tests

In your webdriver test file

  // include redline
  var redline = require( 'redline13-webdriver' );

  // load your driver via redline13
  // redline13 library uses standard mechanism but presets some capabilities
  var browser = redline.loadBrowser('chrome');

  // You can require webdriver yourself or use redline13.webdriver
  var By = redline.webdriver.By;
  var until = redline.webdriver.until;

  browser.get( "http://example.com" );

Tracking your API Performance in browser for Firefox

While PhantomJS emits realtime performance events, and Chrome provides logging for performance data, Firefox does not. However by using Web Performance APIs we can now track and report back some performance information.

For firefox and firefox-headless this module will override get to automatically capture performance data in realtime.

To add for chrome, chrome-Headless, and collect more data in firefox you can add the following to your code

  browser.get( "http://example.com" );
  browser.recordrecordMetrics( "example" );

Running at Scale on RedLine13

Checkout out redline13.com and you can easily run this as 5 users or 5000 users. We have example of running a 5000 user selenium-webdriver performance test for $10.

redline13 methods

redline.loadBrowser( string browser, string domains, boolean hardFilter )

loads selenium driver class while wrapping to capture performance data

  @param browser phantomjs | chrome | firefox
  @param domains string space separated list of domains(regex) filters for inclusion in performance data
  @param hardFilter boolean true will cause anything not filtered to be ignored, false anything not filtered will be recorded only by domain name.

  @return Driver instance

redline.snap ( string filename )

Captures a screenshot and tracks completion. During a test on redline13.com if you capture a screenshot and store it to output/filename.png it will make that screenshot available after test completion. This functions calls the normal takeScreenshot but forces storing filename in output/filename.

redline13 properties

api provides access to the redline13 api for recording extra performance or error data.

Locally it provides two methods

  • api.recordError( string|object error )
  • api.record(string label, date timestamp, int elapsed time, boolean err, int kb)

driver the driver loaded for the selected browser type webdriver - the original resource from require ('selenium-webdriver')

user name or id of user running test, will default to 0. During redline13.com load tests this will be unique for each user simulated.

config empty by default. During a redline13.com load test will provide data used to configure test definition.