- 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
installingnpm install redline13-webdriver
integrating with your testsIn 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 FirefoxWhile 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 RedLine13Checkout 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 methodsredline.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 propertiesapi 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.