Single Page Tests are Calibre tests for a single page, from a single device. The aim is to provide fast feedback directly in your command line terminal or as part of a Continuous integration or deployment pipeline.
Each Single Page Tests is a totally independent report for a single page. There is no connection to single page tests and sites within your account. You can use either independently.
Every Single Page Test has a secure URL which can be publicly-accessible (no login required) or restricted to logged-in members of your team.
1# This command will block until the test has been completed2calibre test create https://calibreapp.com/ --location=Sydney --device=MotorolaMotoG4 --connection=emergingMarkets --private
1#!/usr/bin/env node23const { Test } = require('calibre')45const createTest = async () => {6 // Required7 const url = 'https://calibreapp.com/features/cli'8 const location = 'Sydney'910 // Optional11 const device = 'iPhone8'12 const connection = 'good3G'13 const cookies = [14 {15 name: 'app.uid',16 value: 'my-secret-tokens',17 domain: 'calibreapp.com',18 path: '/',19 secure: true,20 httpOnly: true21 }22 ]23 const headers = [24 {25 name: 'User-Agent',26 value: 'My Custom User Agent'27 }28 ]29 const isPrivate = true3031 // Create the test32 const { uuid } = await Test.create({33 url,34 location,35 device,36 connection,37 cookies,38 headers,39 isPrivate40 })4142 console.log(`Test created, ID: ${uuid}`)4344 // Wait for the test to be run45 const results = await Test.waitForTest(uuid)4647 // Output the formatted JSON response48 console.log(JSON.stringify(results, null, 2))49}5051createTest()
1πΊπΈ North Virginia, USA234:11pm 25-Jul-201945Overall scores67CATEGORY | SCORE8Performance | 759Best Practices | 9310Accessibility | 7611SEO | 9112Progressive Web App | 421314Timing1516Time to First Byte17β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 402 ms1819Response time20β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 445 ms2122First Contentful Paint23β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 1.50 sec2425Time to Interactive26β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 7.41 sec2728Number of requests: 452930Total Page transferred: 730.99 KB3132View the full report https://calibreapp.com/tests/dfa1a00/9f0cb96
1{2 "uuid": "dfa1a00",3 "url": "https://calibreapp.com",4 "formattedTestUrl": "https://calibreapp.com/tests/dfa1a00/9f0cb96",5 "status": "completed",6 "updatedAt": "2019-07-25T06:11:09Z",7 "adBlockerIsEnabled": false,8 "runtimeError": {},9 "metrics": [10 {11 "name": "json_body_size_in_bytes",12 "label": "Total JSON size in bytes",13 "value": 1538314 },15 {16 "name": "json_size_in_bytes",17 "label": "Total JSON transferred",18 "value": 1148319 },20 {21 "name": "image_body_size_in_bytes",22 "label": "Total Image size in bytes",23 "value": 23812024 },25 {26 "name": "image_size_in_bytes",27 "label": "Total Image transferred",28 "value": 7707729 },30 {31 "name": "font_body_size_in_bytes",32 "label": "Total Webfont size in bytes",33 "value": 11012534 },35 {36 "name": "font_size_in_bytes",37 "label": "Total Webfont transferred",38 "value": 11154839 },40 {41 "name": "js_body_size_in_bytes",42 "label": "Total JavaScript size in bytes",43 "value": 215335444 },45 {46 "name": "js_size_in_bytes",47 "label": "Total JavaScript Transferred",48 "value": 51616449 },50 {51 "name": "css_body_size_in_bytes",52 "label": "Total CSS size in bytes",53 "value": 8045154 },55 {56 "name": "css_size_in_bytes",57 "label": "Total CSS transferred",58 "value": 1746059 },60 {61 "name": "html_body_size_in_bytes",62 "label": "Total HTML size in bytes",63 "value": 2498764 },65 {66 "name": "html_size_in_bytes",67 "label": "Total HTML transferred",68 "value": 1068069 },70 {71 "name": "page_wait_timing",72 "label": "Response time",73 "value": 44574 },75 {76 "name": "page_size_in_bytes",77 "label": "Total Page transferred",78 "value": 74853779 },80 {81 "name": "page_body_size_in_bytes",82 "label": "Total Page size in bytes",83 "value": 262412084 },85 {86 "name": "asset_count",87 "label": "Number of requests",88 "value": 4589 },90 {91 "name": "onload",92 "label": "onLoad",93 "value": 257294 },95 {96 "name": "oncontentload",97 "label": "onContentLoad",98 "value": 167199 },100 {101 "name": "lighthouse-seo-score",102 "label": "Lighthouse SEO Score",103 "value": 91104 },105 {106 "name": "lighthouse-best-practices-score",107 "label": "Lighthouse Best Practices Score",108 "value": 93109 },110 {111 "name": "lighthouse-accessibility-score",112 "label": "Lighthouse Accessibility Score",113 "value": 76114 },115 {116 "name": "lighthouse-performance-score",117 "label": "Lighthouse Performance Score",118 "value": 75119 },120 {121 "name": "lighthouse-pwa-score",122 "label": "Lighthouse Progressive Web App Score",123 "value": 42124 },125 {126 "name": "visually_complete_85",127 "label": "85% Visually Complete",128 "value": 1872129 },130 {131 "name": "visually_complete",132 "label": "Visually Complete",133 "value": 9288134 },135 {136 "name": "consistently-interactive",137 "label": "Time to Interactive",138 "value": 7408139 },140 {141 "name": "first-interactive",142 "label": "First CPU Idle",143 "value": 7408144 },145 {146 "name": "time-to-first-byte",147 "label": "Time to First Byte",148 "value": 402149 },150 {151 "name": "speed_index",152 "label": "Speed Index",153 "value": 1822154 },155 {156 "name": "first-meaningful-paint",157 "label": "First Meaningful Paint",158 "value": 1504159 },160 {161 "name": "first-contentful-paint",162 "label": "First Contentful Paint",163 "value": 1504164 },165 {166 "name": "firstRender",167 "label": "First Paint",168 "value": 1504169 }170 ],171 "device": {172 "title": "Motorola Moto G4"173 },174 "connection": {175 "title": "Emerging Markets 3G"176 },177 "location": {178 "name": "North Virginia, USA",179 "emoji": "πΊπΈ"180 }181}
1# Pro tip: Add the --json flag for JSON output2calibre test show <uuid>
1#!/usr/bin/env node23const { Test } = require('calibre')45const getTestData = async () => {6 // Required7 const uuid = 'dfa1a00'89 // Fetch the test results10 const results = await Test.getTestByUuid(uuid)1112 // Output the formatted JSON response13 console.log(JSON.stringify(results, null, 2))14}1516getTestData()
1πΊπΈ North Virginia, USA234:11pm 25-Jul-201945Overall scores67CATEGORY | SCORE8Performance | 759Best Practices | 9310Accessibility | 7611SEO | 9112Progressive Web App | 421314Timing1516Time to First Byte17β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 402 ms1819Response time20β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 445 ms2122First Contentful Paint23β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 1.50 sec2425Time to Interactive26β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 7.41 sec2728Number of requests: 452930Total Page transferred: 730.99 KB3132View the full report https://calibreapp.com/tests/dfa1a00/9f0cb96
1{2 "uuid": "dfa1a00",3 "url": "https://calibreapp.com",4 "formattedTestUrl": "https://calibreapp.com/tests/dfa1a00/9f0cb96",5 "status": "completed",6 "updatedAt": "2019-07-25T06:11:09Z",7 "adBlockerIsEnabled": false,8 "runtimeError": {},9 "metrics": [10 {11 "name": "json_body_size_in_bytes",12 "label": "Total JSON size in bytes",13 "value": 1538314 },15 {16 "name": "json_size_in_bytes",17 "label": "Total JSON transferred",18 "value": 1148319 },20 {21 "name": "image_body_size_in_bytes",22 "label": "Total Image size in bytes",23 "value": 23812024 },25 {26 "name": "image_size_in_bytes",27 "label": "Total Image transferred",28 "value": 7707729 },30 {31 "name": "font_body_size_in_bytes",32 "label": "Total Webfont size in bytes",33 "value": 11012534 },35 {36 "name": "font_size_in_bytes",37 "label": "Total Webfont transferred",38 "value": 11154839 },40 {41 "name": "js_body_size_in_bytes",42 "label": "Total JavaScript size in bytes",43 "value": 215335444 },45 {46 "name": "js_size_in_bytes",47 "label": "Total JavaScript Transferred",48 "value": 51616449 },50 {51 "name": "css_body_size_in_bytes",52 "label": "Total CSS size in bytes",53 "value": 8045154 },55 {56 "name": "css_size_in_bytes",57 "label": "Total CSS transferred",58 "value": 1746059 },60 {61 "name": "html_body_size_in_bytes",62 "label": "Total HTML size in bytes",63 "value": 2498764 },65 {66 "name": "html_size_in_bytes",67 "label": "Total HTML transferred",68 "value": 1068069 },70 {71 "name": "page_wait_timing",72 "label": "Response time",73 "value": 44574 },75 {76 "name": "page_size_in_bytes",77 "label": "Total Page transferred",78 "value": 74853779 },80 {81 "name": "page_body_size_in_bytes",82 "label": "Total Page size in bytes",83 "value": 262412084 },85 {86 "name": "asset_count",87 "label": "Number of requests",88 "value": 4589 },90 {91 "name": "onload",92 "label": "onLoad",93 "value": 257294 },95 {96 "name": "oncontentload",97 "label": "onContentLoad",98 "value": 167199 },100 {101 "name": "lighthouse-seo-score",102 "label": "Lighthouse SEO Score",103 "value": 91104 },105 {106 "name": "lighthouse-best-practices-score",107 "label": "Lighthouse Best Practices Score",108 "value": 93109 },110 {111 "name": "lighthouse-accessibility-score",112 "label": "Lighthouse Accessibility Score",113 "value": 76114 },115 {116 "name": "lighthouse-performance-score",117 "label": "Lighthouse Performance Score",118 "value": 75119 },120 {121 "name": "lighthouse-pwa-score",122 "label": "Lighthouse Progressive Web App Score",123 "value": 42124 },125 {126 "name": "visually_complete_85",127 "label": "85% Visually Complete",128 "value": 1872129 },130 {131 "name": "visually_complete",132 "label": "Visually Complete",133 "value": 9288134 },135 {136 "name": "consistently-interactive",137 "label": "Time to Interactive",138 "value": 7408139 },140 {141 "name": "first-interactive",142 "label": "First CPU Idle",143 "value": 7408144 },145 {146 "name": "time-to-first-byte",147 "label": "Time to First Byte",148 "value": 402149 },150 {151 "name": "speed_index",152 "label": "Speed Index",153 "value": 1822154 },155 {156 "name": "first-meaningful-paint",157 "label": "First Meaningful Paint",158 "value": 1504159 },160 {161 "name": "first-contentful-paint",162 "label": "First Contentful Paint",163 "value": 1504164 },165 {166 "name": "firstRender",167 "label": "First Paint",168 "value": 1504169 }170 ],171 "device": {172 "title": "Motorola Moto G4"173 },174 "connection": {175 "title": "Emerging Markets 3G"176 },177 "location": {178 "name": "North Virginia, USA",179 "emoji": "πΊπΈ"180 }181}
For each Single Page Test, Calibre stores the following information:
You can obtain Single Page Test artifacts with the CLI and the Node.js API. When using the CLi, files will be saved to a test-artifacts directory. The Node.js API will return a list of URLs where the files can be downloaded.
1calibre test download-artifacts <uuid>
1#!/usr/bin/env node23const { Test } = require('calibre')45const getTestArtifactUrls = async () => {6 // Required7 const uuid = 'dfa1a00'89 // Fetch the test results10 const results = await Test.fetchArtifacts(uuid)1112 // Output the formatted JSON response13 console.log(JSON.stringify(results, null, 2))14}1516getTestArtifactUrls()
1β Fetching test artifact URLs2β Screenshot3β MP4 Video Render4β HAR5β Lighthouse Report67Saved artifacts to test-artifacts/dfa1a00
1{2 "uuid": "dfa1a00",3 "har": "https://calibre-screenshots-prod.s3.amazonaws.com/ef1ae88af9f4d643196a76cb62608449/b989bfe74fa26bed5063afb098e7ec4b.json.gz?X-Amz-Expires=3600&X-Amz-Date=20190725T061832Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAITFRYATLYAH7W3VQ/20190725/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=71cfa944d9c8243a55149091efb88913ef99b7d3373f44f7c4f28a69b0a1279d",4 "lighthouse": "https://calibre-screenshots-prod.s3.amazonaws.com/ef1ae88af9f4d643196a76cb62608449/f92ce9906f4a55728df1ff112246e079.json.gz?X-Amz-Expires=3600&X-Amz-Date=20190725T061832Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAITFRYATLYAH7W3VQ/20190725/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=3cdb6e1fea6e00aa8c3e69d42b68aef0f1236550b858a8cc34bd7073275dd562",5 "image": "https://calibre-screenshots-prod.s3.amazonaws.com/eb9dd012-7480-4368-b1f9-9e9f50e4f9f0/screenshot/screenshot.jpg",6 "video": "https://calibre-screenshots-prod.s3.amazonaws.com/eb9dd012-7480-4368-b1f9-9e9f50e4f9f0/video-timeline/screencast.mp4"7}
1calibre test list
1#!/usr/bin/env node23const { Test } = require('calibre')45const listAllTests = async () => {6 // Fetch the test list7 const tests = await Test.getList()89 // Output the formatted JSON response10 console.log(JSON.stringify(tests, null, 2))11}1213listAllTests()
1UUID | URL | DEVICE | CONNECTION | LOCATION | STATUS2dfa1a00 | calibreapp.com/ | Motorola Moto G4 | Not Throttled | πΊπΈ North Virginia | Completed 4:11pm 25-Jul-20193efa99de | calibreapp.com/ | Motorola Moto G4 | Not Throttled | πΊπΈ North Virginia | Completed 4:36pm 25-Jul-2019
1[2 {3 "uuid": "dfa1a00",4 "url": "https://calibreapp.com",5 "formattedTestUrl": "https://calibreapp.com/tests/dfa1a00/9f0cb96",6 "adBlockerIsEnabled": false,7 "device": {8 "title": "Motorola Moto G4"9 },10 "connection": {11 "title": "Emerging Markets 3G"12 },13 "location": {14 "emoji": "πΊπΈ",15 "shortName": "North Virginia"16 },17 "status": "completed",18 "updatedAt": "2019-07-25T06:11:09Z"19 },20 {21 "uuid": "efa99de",22 "url": "https://calibreapp.com",23 "formattedTestUrl": "https://calibreapp.com/tests/efa99de/39d030e",24 "adBlockerIsEnabled": false,25 "device": {26 "title": "Motorola Moto G4"27 },28 "connection": {29 "title": "Emerging Markets 3G"30 },31 "location": {32 "emoji": "πΊπΈ",33 "shortName": "North Virginia"34 },35 "status": "completed",36 "updatedAt": "2019-07-25T06:36:18Z"37 }38]