Repository - API - Source
ip route
instead of route
(one less dependency) #1767.wait.byCondition
command. Thank you Icecold777 for PR #1803.--maxLoadTime
). That makes more sense than just throwing errors #1810.--debug
mode. Debug mode will run your tests and open devtools in Chrome/Edge/Firefox on desktop and will stop after each iteration so you can inspect the page. You can add your own breakpoint in your script with the breakpoint(name)
command. To continue after your breakpoint, add the following code in the developer console in your browser: window.browsertime.pause=false;
#1798.--videoParams.thumbsize
#1787.--visualElements
and the browser supports the Largest Contentful API, we also record
the LCP from the video. This will help the Chrome team and other browser teams to get it right (see https://bugs.chromium.org/p/chromium/issues/detail?id=1291502) #1782.--disableDNSFlush
you now enables it with --flushDNS
#1752.--visualMetricsPortable
.--chrome.cleanUserDataDir
#1739--chrome.visualMetricsUsingTrace
#1727.New Select command #1696:
select.selectByIdValue(selectId, value)
select.selectByNameAndValue(selectName, value)
select.selectByIdAndIndex(selectId, index)
select.selectByNameAndIndex(selectName, index)
select.deselectById(selectId)
select.getValuesById(selectId)
select.getSelectedValueById(selectId)
New click by name command click.byName(name)
#1697.
--appendToUserAgent
that works in Chrome/Edge and Firefox.--connectivity.engine humble
and set the URL to your instance --connectivity.humble.url http://raspberrypi.local:3000
. Added in #1691.--chrome.appendToUserAgent
in the CLI help.--firefox.noDefaultPrefs
, thank you Gregory Mierzwinski for PR #1650.--chrome.noDefaultOptions
, fixed in #1651.--connectivity.throttle.localhost
to your test and it will work as before.Include the HTML element when you get timings for visual elements with --visualElements
#1580. This makes it easier to debug.
Updated to Chrome and Chromedriver 91 #1583.
Updated to Edge 90 in the Docker container
Fixed the broken CPU throttling in Chrome (when you do not run headless). See #1380 and #1582.
Fix broken getViewPort for Pixel 2 in mobile emulation, thank you Radu Micu for PR #1581.
Hi and welcome to the 12.0.0 release of Browsertime! Here's a list of what changed, what has been added and what has fixed. You can safely upgrade and please be aware that some metrics can change when you upgrade: We changed startup flags for Chrome and we made the "new" connectivity settings default (meaning 3g is faster than before and more realistic). Read more in each individual change.
A special thanks to Inderpartap Singh Cheema, Denis Palmeiro and Olaf Meeuwissen for their contributions to this release!
--legacyConnectivityProfiles
. See #1160 for the original change.--chrome.blockDomainsExcept
when you are using WebPageReplay #1532. Thank you Inderpartap Singh Cheema for the original fix!const timer = commands.stopWatch.get('my_timer');
timer.start();
// Do something
// Stop the timer and add the result to the last tested URL
timer.stopAndAdd();
--preWarmServer
. Do that to make sure your server has cached everything that is needed before your test #1515 and #1516.--videoParams.threads
. Thank you Leo Blöcher for PR #1493.--firefox.perfStats
. Thank you dpalmeiro for PR #1495.--gnirehtet
(gnirehtet needs to be in your PATH). Fixed in #1489 and #1490.markAsFailure(message)
where you can mark a test as a failure. If one run fails, all tests are marked as failed. The JSON from Browsertime (that is used in sitespeed.io) gets a failure status and an array of failure messages (potentially you can mark a run as failed multiple times). If we get an uncaught error from running the browser we also mark the test as failed #1482.scommands.cdp.on
. Here's an example to pickup all responses for a page : const responses = [];
await commands.cdp.on('Network.responseReceived', params => {
responses.push(params);
});
await commands.measure.start('https://www.sitespeed.io/search/');
// Here you can check the array with all responses received
Make it configurable to press the power button when you start the tests with --androidPretestPowerPress
#1462. Thank you Gregory Mierzwinski for the PR.
Catch if a URL change between runs. If you use a script, set an alias to a URL and then the next run the URL changed, that caused an error and Browsertime failed #1467. The alias for a URL wasn't propagated the right way, fixed in #1468.
This patch is for storing the gecko profile paths in the browsertime results. This makes it easier to figure out which gecko profiles go with which tests. #1466. Thank you Gregory Mierzwinski for the PR!
--edge.binaryPath
to point out the path to your Edge binary #1461.--storeURLsAsFlatPageOnDisk
#1450--firefox.nightly
/ --firefox.beta
#1432.--firefox.geckodriverArgs
#1433.--androidBatteryTemperatureReboot
#1409.-vvv
enables trace log level for Marionette when you use Firefox #1405.--webdriverPageload
. Thank you Andrew Creskey for the PR #1396.--androidVerifyNetwork
) #1386.The new 10.0 release mostly include technical changes that will make it easier for us in the future to make changes and keep Browsertime the number one performance engine :) However if yoy use Contentful and Perceptual Speed Index there are one breaking change.
--visualMetricsPerceptual
and --visualMetricsContentful
. This will make your testing faster by default #1358.Get CPU long tasks by default using Chrome: A couple of releases ago, Chrome started to support buffered long tasks, that means we don't need to inject any JS to make sure we catch all long tasks. The code is simpler and since (hopefully) the new buffered version doesn't give any performance penelty, we can start getting longtasks by default. #1341.
Stop recording the video direct after the PageCompleteCheck fired. This make the original video smaller, saves time converting the video to a vieable format and makes Visual Metrics a little faster #1357.
Use fast preset (instead of medium) when converting the video to a format that works in all video players #1359.
If you use scripting and use the ...AndWait methods, we now increased the extra wait time before we run the page complete check from 1000ms to 2000ms. With the other changes we done, this was needed for Firefox since it sometimes didn't have time to navigate before the complete check run #1375.
Make sure the screen is turned on independently of electric source (before it was only USB) on Android #1378
This makes it easier to make sure when to collect metrics, stop trace logs and do whatever you need. Implemented in #1348 and #1367.
#1383* Moved page complete scripts to a new folder to make it clean #1361.
By default the video is converted to a format that works in most video players. You can skip that convertion (to save time) by using --videoParams.convert false
. Visual Metrics will still work, but the video may not work in your player #1360.
Make sure the video file is removed from the Android phone when its been copied to desktop #1377.
Making it easy to run Firefox on Android #1379.
Fix how MOZ_LOG collection works and allow custom MOZ_LOG settings #1382. Thank you Gregory Mierzwinski.
--browserRestartTries
.--safari.useTechnologyPreview
#1280.--firefox.disableSafeBrowsing false --firefox.disableTrackingProtection false
and let the browser settle for 30 seconds to download the lists and they are enabled. In the future we want it to be enabled by default #1272.Extra love running on rooted Android devices: I've moved over Mozillas best practices getting stable metrics on Android. There are some extra love there for Moto G5 and Pixel 2. Turn on with --androidRooted
, see #1255. Be careful though: We will setup everything for performance and the phone will keep that state even after the tests.
Always keep Android phones awake when running on USB #1257.
--firefox.appconstants
.wait.bySelector(selector, maxTime)
implemented in #1247.--androidBatteryTemperatureLimit
to set a minimum battery temperature limit before you start your test on your Android phone. Temperature is in Celsius. #1253.--firefox.profileTemplate
, thank you Gregory Mierzwinski - #1185.--tcpdumpPacketBuffered
together with --tcpdump
#1198.Woho Browsertime 8.0.0 is here!
There's a lot of new things in 8.0.0. First: A big THANK YOU to all the people at Mozilla that have contributed with all the new stuff:
Major new things:
--firefox.geckoProfiler
and view them at https://profiler.firefox.com !--firefox.windowRecorder
and -video
to your run.--tcpdump
to get a tcpdump on desktop.Lets go through all the new things. There's a couple things that changes:
--mozillaProPreferences
since those configurations are used by default #1045.{timestamp:x, percent:y}
.--newConnectivityProfiles
(following the exact config as Throttle and WebPageTest) #1160--firefox.geckoProfiler
. You can also use: --firefox.geckoProfilerParams.features
, --firefox.geckoProfilerParams.threads
, --firefox.geckoProfilerParams.interval
and --firefox.geckoProfilerParams.bufferSize
to finetune what to get.-b firefox --android
and tune using: --firefox.android.package
, --firefox.android.activity
, --firefox.android.deviceSerial
and --firefox.android.intentArgument
.--firefox.profileTemplate
.--firefox.windowRecorder
works better (use it to record a video of the screen).--chrome.android.activity
. You can also name the process of the Activity hosting the WebView using --chrome.android.process
. -b safari --ios
#1141--chrome.enableVerboseChromeDriverLog
#1152--chrome.enableChromeDriverLog
and gzip the log per iteration #1133.-b edge
and --edge.edgedriverPath
with the path to the matching MSEdgeDriver. Edge use the same setup as Chrome, so you --chrome.*
to configure Edge :) #1140.--firefox.args
and --firefox.env
1110, thank you Nick Alexander!--chrome.traceCategory
to add an category. Use it multiple times to add multiple categories #1090.SSLKEYLOGFILE=/path/to/file browsertime --tcpdump https://www.sitespeed.io
or in Docker docker run --rm -v "$(pwd)":/browsertime -e SSLKEYLOGFILE=/browsertime/keylog.txt sitespeedio/browsertime https://www.sitespeed.io/ -n 1 --tcpdump
. Implemented in #1159.await commands.wait.byPageToComplete()
that waits for the configured page complete check to run. This is useful if you are running your own Selenium scripts and navigate through JavaScript and wants to wait for the page to finish loading #1024.await commands.screenshot.take('name')
. The screenshot is stored on disk for that page and in later releases it will be included in the result JSON file #1032.--firefox.mozillaProPreferences
#1016.measure.add
live in the same namespace (extras) both per run and in the statistics #1015.--timeToSettle
in ms #1003.commands.android.shell('')
.commands.measure.add(name, value)
or commands.measure.addObject(object)
if you want to add multiple metrics. Documentation coming soon #1011--pageCompleteCheckStartWait
- The time in ms to wait for running the page complete check for the first time. Use this when you have a pageLoadStrategy set to none. #1008--pageCompleteCheckPollTimeout
(value in ms) #998.--firefox.disableBrowsertimeExtension
.--cpu
.--video --firefox.windowRecorder
--connectivity.variance 2
- that means the latency will have a variance of 2% between runs. Let us try this out and get back about later on #973. Original idea from Emery Berger.--connectivity.engine tsproxy
. We used to have support years ago but it never worked good on Mac/Linux so we dropped it. But it works better now so we added it back #891.--cpu --chrome.visualMetricsUsingTrace --chrome.enableTraceScreenshots
--visualMetrics false
didn't work. Fixed in #881.Added metric LastMeaningfulPaint that will be there when you collect --visualElements
848.
You can get screenshots in your Chrome trace log using --chrome.enableTraceScreenshots
#851
Chrome 75 in the Docker container (and Chromedriver 75). Also updated Firefox to 67.0.1 #852.
--chrome.timeline
. It also means two changes:Collect CPU long tasks in Chrome using --chrome.collectLongTasks
using the Long Task API. For the long tasks to work, we inject JS using the Page.addScriptToEvaluateOnNewDocument devtools command. We collect all long tasks and related data (not so much at the moment but will get better/more useful information when browsers supports it) and count the total number of long tasks, long tasks that happens before first paint and first contentful paint. Implemented in #821 and #825.
By default a long task is >50ms. Wanna change that? Use --minLongTaskLength
to set that yourselves (it needs to be larger than 50 ms though) #838.
Throttle the CPU using Chrome with --chrome.CPUThrottlingRate
. Enables CPU throttling to emulate slow CPUs. Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). Implemented in #819.
You can now use a .browsertime.json file as a default config json file that will be picked up automatically #824.
Include the actual HTML in the HAR file for Chrome using --chrome.includeResponseBodies html
#826
Use --blockDomainsExcept
to block all domains except. Use it muliple times to have multiple domains. You can also use wildcard like *.sitespeed.io #840
Shortcut --cpu
to enable --chrome.timeline
and --chrome.collectLongTasks
for Chrome #839.
Enable use of Chrome DevTools Protocol. We now uses a modified version of Selenium that can use CDP. We also automatically collect the CDP performance metrics Performance.getMetrics (you can turn that off with --chrome.cdp.performance false
). We also enabled raw use of the CDP in scripting: cdp.sendAndGet(command, args)
and cdp.send(command, args)
#807
Report loadEventEnd as a separate metric (you don't need to get it from the Navigation Timings section) #808.
js.run()
returns whatever it gets back so you can script and get whatever you need from your page #749.js.runAndWait('')
that makes it possible to run your own JavaScript, click a link and wait on page navigation #747.Bugfix: Calculating Visual Complete 85/95/99 was broken IF the complete process went backward (first hitting 85% and then going down to < than 85%). We used to always take the first metric over 85% and then stick to it. Now we choose the last time it breaks the 85/95/99% metric #732.
We updated the Visual Metrics lib to use the latest upstream version. We haven't updated for a while and we had issues where the progress was calculated wrong #730.
--spa
configuration that will: Automatically use hash/params in file names and wait X seconds for no request in resource timing api as pageCompleteCheck #700 #698.--useSameDir
.Read about what has changed in 4.0.
New default trace categories for chrome.timeline: -*,devtools.timeline -> -, devtools.timeline, disabled-by-default-devtools.timeline, disabled-by-default-devtools.timeline.stack
#677 and #679.
With the support of testing multiple pages, the structure of the result has changed (sorry there was no way avoiding that). The old structure of the result looked like:
{
"info": {
"browsertime": {
"version": "3.0.0"
}, ...
And the new one returns a array, where each tested page is an result in that array.
[{
"info": {
"browsertime": {
"version": "3.0.0"
}, ...
}]
That means JSON consumers needs to change the code, even if you only test one page.
The naming of videos, screenshots and trace logs has changed to include page number.
We removed pre/post scripts becasue now you can just run them without any extra parameters. You can now run your script like this:browsertime preScript.js https://www.sitespeed.io postScript.js
. At the same time we added support for testing multiple pages after each other: browsertime https://www.sitespeed.io https://www.sitespeed.io/documentation/
where the browser will stay open between the two different pages #690.
Changing default screen size from 1200x960 to 1366x768 #691.
Add --verbose
and Visual Metrics will log to a log file in the video dir (that makes it easier for people that report bugs) #662.
Disable GPU for Chrome when running with xvfb #659.
Get Server Timings #657. This works fine in Chrome and should(?) work in Firefox but I cannot get it to work. I'll create an upstream issue when I get the time.#
Support Firefox timeToFirstInteractive #656. This is Firefox Nightly at the moment, try it on an Mac with: browsertime --firefox.nightly https://www.wikipedia.org -n 1
. At the moment it looks like the metric takes some time for Firefox to calculate so we end the test before it is finished. You can try it out with changing --pageCompleteCheck
.
Chrome on Android has a different CLI args setup #668.
We changed how we remove the orange frames from the video when you collect visual metrics. In the old version we used ffprobe to find the start point. That sometimes made us inlcude the orange frame in the videos (it was broken when running on Android). We now get the value from VisualMetrics directly and tune the video in two steps: First remove the orange frames and then add the text #665.
Running in Docker we always tried to do a hard kill on FFMPEG, but we onlyu need that on Docker desktop #670.
Fixed how we go from orange to white on an Android phone, by always making the screen orange and then unload it to white. This makes the visual metrics match the video #672.
If you run on ARM we just skip installing the Chromedriver instead of just hanging ...
--pageCompleteCheck
now accepts an inline JavaScript (for backward compatibility) or a path to a javascript file (enhancement request). Thank you Don Walling for the PR.We support timings for visual elements (by adding --visuaElements
). Browsertime picks up the largest image and the largest H1. You can also configure your own elements --scriptInput.visualElements
. First let give creds to the ones that deserves it: As far as we know Sergey Chernyshev was the first one that introduced the idea of measuring individual elements in his talk Using Heat Maps to improve Web Performance Metrics. A couple of years later this was implemented by the people behind SpeedCurve, that later on contributed back the implementation to WebPageTest (calling it "hero"-elements). Patrick Meenan (the creator of WebPageTest) moved on the implementation to Visual Metrics that Browsertime uses to pickup visual metrics from the video. We tuned the implementation a little and now it is ready to release.
We also added a new feature: If you run your own custom script you can now feed it with different input by using --scriptInput.*
. Say you have a script named myScript you can pass on data to it with --scriptInput.myScript 'super-secret-string'
. More about this in the documentation the coming weeks.
Upgraded to Chromedriver 2.42.0
--cookie name=value
--pageLoadStrategy none
to your run (that is useful if you want to end your tests earlier).We have worked a lot to make Browsertime 3.0 the best version so far. Read the blog post about the 3.0 release. And please read the breaking changes before you update!
--firefox.collectMozLog
#451 see https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging--videoParams.nice
. With this you can finetune the prio for the FFMPEG process.--gzipHar
to your run.--pageCompleteCheckInactivity
.--visualMetrics
instead of --speedIndex. When we first introduced Visual Metrics Speed Index was more known, but it has always been a thorn in the side to call the option that. In Docker we collect Visual Metrics by default.--screenshotParams
configurations.--videoParams.addTimer
(boolean) if you want to toggle timer/metrics in the video--firefox.includeResponseBodies
to include all bodies you can now use --firefox.includeResponseBodies
[none,all,html]#518.--chrome.timeline
. If you want to configure trace categories yourself, use --chrome.traceCategories
We rollbacked the HAR exporter to the one that works in FF 54 and will wait on FF 61 until we update. That means that the 2.x branch and releases will stay locked to FF54 in the Docker file while we are working in Browsertime 3.0. The current way of using the new HAR exporter adds about 1 second overhead on our test pages on dasgboard.sitespeed.io.
Upgraded Chrome-HAR with fixes for Chrome 66 and when network error happans.
You can now get more meaningful CPU metrics out of Chrome (both by category and per event type). Use it by adding --chrome.traceCategories devtools.timeline --chrome.collectTracingEvents --chrome.collectCPUMetrics. #434. We use https://github.com/WPO-Foundation/trace-parser to parse the Chrome trace log.
You can now get the Chrome console log by --chrome.collectConsoleLog. It will be written to disk (one file per run) #345.
We increased the probesize again for FFMPEG #441, maybe it can help people running without setting connectivity and have video problems.
Another go at fixing so that Chromedriver doesn't hang (sometimes) following https://github.com/SeleniumHQ/docker-selenium/issues/87 #442 in the Docker container.
The start script in the Docker file handled parameters wrong. #430.
Updated to Chrome 64 in the WebPageReplay Docker container.
You can now run WebPageReplay in the Docker container together with your Android phone.
The WPR Docker is updated with Firefox 58.
Updated to Chromedriver 2.35.0
--videoParams.framerate 60
--videoParams.createFilmstrip
), set the quality (--videoParams.filmstripQuality
), and choose if you want them in full video size (--videoParams.filmstripFullSize
) #385.--firefox.nightly
, --firefox.beta
or --firefox.developer
to the cli (for Linux you need point out the location with --firefox.binaryPath
#384--videoParams.androidVideoWaitTime
default is 5000 ms) for pulling the video from mobile to the server #393.--firefox.acceptInsecureCerts
#399--videoParams.combine
We removed TSProxy and tc (sltc) as connectivity engines since none of them worked 100%. Instead user Docker networks or the new Throttle engine #379. The default engine when you run in Docker is now external, before it was tc.
The default framerate for video is now 30 (before 60). See --videoParams.framerate
. We have done a lot of testing on C4.large on AWS and 60 fps adds too much overhead that makes metrics unstable.
We upgraded to use NodeJS 8 and you should do that too.
Changed Docker workdir so it is possible to use pre/post script in Docker. This means you need to map your volume as "$(pwd)":/browsertime #363
Changed the bottom margin for videos (made it a little larger) to fix lastVisualChange when emulating mobile sitespeed.io #1690
URLs with a comma-sign (",") broke Browsertime if you also collected VisualMetrics #333.
New version of VisaulMetrics (thanks Pat) that makes possible to remove those grey background that started to appear in Chrome 58 if you run it in emulated mode. The original bug created to early first visual render in emulated mode #323.
Setting 'network.dns.disableIPv6': true for Firefox makes Firefox in Docker 5s faster :/
Added trap in Docker image to be able to break your runs.
This is the first beta of 1.0. 1.0 is a TOTAL rewrite from 0.12.3. We don't use BrowserMobProxy anymore (so you don't need Java). To get the HAR from Firefox we use the HAR Export Trigger and Chrome we parse the timeline log and generates the HAR file.
The beta-1 has no way of blocking requests, if you need that functionality you should wait with upgrading.
--userTimingWhitelist
to pass a whitelist regex for filtering userTimings from resultsYou can now choose to supply a Javascript that will decide when a run is finished. The default script is 'return window.performance.timing.loadEventEnd>0'. Use the parameter --waitScript
The browsermob prixy will now test a port and use it if it's free. Before the port was hardcoded.
Add --raw flag to control if data for individual runs is included in output. The default is to not include run data. NOTE - this is a change in the default output from 0.1.
Add optional --compact flag to disable pretty printing of xml and json.
Update format of xml/json (NOTE - incompatible changes from 0.1)
all metrics and statistics are now floating point numbers
numbers in json output are now represented as strings (surrounded by quotes). This is an unfortunate side-effect of avoiding printing numbers in scientific notation.
time property of marks and measurements have been renamed startTime
measurements and statistics are now sorted according to start time.
Changed max wait time for the Selenium driver from 30 s to 60 s
Updated org.seleniumhq.selenium:selenium-java from 2.35.0 to 2.37.1
Fix for Firefox 25 that added toJson in window.performance.timings