Skip to content

Commit

Permalink
testing: prune smokehouse configs to improve testing perf (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet authored and brendankenny committed Aug 14, 2017
1 parent 1c11021 commit e72483b
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 4 deletions.
21 changes: 21 additions & 0 deletions lighthouse-cli/test/smokehouse/byte-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @license Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
'use strict';

/**
* Config file for running PWA smokehouse audits.
*/
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyAudits: [
'offscreen-images',
'uses-webp-images',
'uses-optimized-images',
'uses-responsive-images',
]
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/default.js"
config="lighthouse-cli/test/smokehouse/byte-config.js"
expectations="lighthouse-cli/test/smokehouse/byte-efficiency/expectations.js"

yarn smokehouse -- --config-path=$config --expectations-path=$expectations
Expand Down
23 changes: 23 additions & 0 deletions lighthouse-cli/test/smokehouse/dbw-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @license Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
'use strict';

/**
* Config file for running PWA smokehouse audits.
*/
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyCategories: [
'best-practices'
],
onlyAudits: [
'dom-size',
'link-blocking-first-paint',
'script-blocking-first-paint',
]
}
};
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/dobetterweb/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/default.js"
config="lighthouse-cli/test/smokehouse/dbw-config.js"
expectations="lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js"

# run smoketest on DBW test page.
Expand Down
35 changes: 35 additions & 0 deletions lighthouse-cli/test/smokehouse/offline-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @license Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
'use strict';

/**
* Config file for running PWA smokehouse audits.
*/
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyAudits: [
'is-on-https',
'redirects-http',
'service-worker',
'works-offline',
'viewport',
'without-javascript',
'user-timings',
'critical-request-chains',
'webapp-install-banner',
'splash-screen',
'themed-omnibox',
'aria-valid-attr',
'aria-allowed-attr',
'color-contrast',
'image-alt',
'label',
'tabindex',
'content-width',
]
}
};
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/offline-local/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/default.js"
config="lighthouse-cli/test/smokehouse/offline-config.js"
expectations="lighthouse-cli/test/smokehouse/offline-local/offline-expectations.js"

# run smoketest, expecting results found in offline-expectations
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/tricky-ttci/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/perf.json"
config="lighthouse-core/config/default.js"
expectations="lighthouse-cli/test/smokehouse/tricky-ttci/expectations.js"

yarn smokehouse -- --config-path=$config --expectations-path=$expectations
Expand Down

0 comments on commit e72483b

Please sign in to comment.