Files
gerrit/polygerrit-ui/app/test/suite_conf.js
Dmitrii Filippov 49d3980e9d Improve polygerrit test performance
This change improves frontend tests performace in 2 ways:
* Replaces 'fixture' and 'stub' method from the web-component-tester
  (WCT) with a correct implementation in the common-test-setup.js file.
  For test files with 50+ tests this reduces overall execution time
  significantly. For example, time for the gr-file-list_test.html tests
  drops from 35+ seconds to 10 seconds
* Split all WCT tests to 4 independent split. Bazel can run these
  splits in parallel, and it gives additional improves (approx 25%)
  Number of splits can be changed in the wct_suite rule.

Change-Id: I8edcf3bc29f3f34092cc782a043bd7ad19fad599
2020-04-19 15:34:23 +00:00

41 lines
1.6 KiB
JavaScript

/**
* @license
* Copyright (C) 2017 The Android Open Source Project
*
* 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.
*/
/**
* This file is an example of the content.
* The real file is generated by the wct_test.sh script.
* Content of this file doesn't affect wct tests.
* Generated files contains all information to split test files between different tests
*/
export const config = {
splitIndex: 0, // Index for split (wct_suite creates several sh_test, each split has its own index)
splitCount: 1, // Defines the number of splits
};
/**
* testsPerFileString contains information about number of tests in each file
* This information is not precise. It is used to split test files between WCT suites more evenly.
*/
export const testsPerFileString = `
./elements/change-list/gr-repo-header/gr-repo-header_test.html:1
./elements/change-list/gr-dashboard-view/gr-dashboard-view_test.html:25
./elements/gr-app_test.html:4
./behaviors/gr-admin-nav-behavior/gr-admin-nav-behavior_test.html:13
./behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.html:19
`;