Installation and Setup
System requirements
To start working with Testplane, install Node.js version 18.0 or higher.
Installation
To run the Testplane installer using npm, execute the following command:
npm init testplane@latest YOUR_PROJECT_PATH
To configure the project instead of using defaults during initialization, specify the -v option.
After running the installation command, the following set of files and folders will appear in the project directory:
node_modules
testplane-tests
example.testplane.ts
ts.config.json
package-lock.json
package.json
testplane.config.ts
Setup
The testplane.config.ts file contains a basic set of settings for running tests:
export default {
gridUrl: "local",
baseUrl: "http://localhost",
pageLoadTimeout: 0,
httpTimeout: 60000,
testTimeout: 90000,
resetCursor: false,
// The `sets` parameter contains information about the directory where the tests are located
// and a list of browsers in which they will be run:
sets: {
desktop: {
files: ["testplane-tests/**/*.testplane.(t|j)s"],
browsers: ["chrome", "firefox"],
},
},
// The `browsers` field describes the configuration of the browsers used:
browsers: {
chrome: {
headless: true,
desiredCapabilities: {
browserName: "chrome",
},
},
firefox: {
headless: true,
desiredCapabilities: {
browserName: "firefox",
},
},
},
plugins: {
"html-reporter/testplane": {
enabled: true,
path: "testplane-report",
defaultView: "all",
diffMode: "3-up-scaled",
},
},
};
To download the browsers described in the config separately from running Testplane itself, execute the command:
npx testplane install-deps
Without running this command beforehand, missing browsers will be automatically downloaded the first time Testplane is launched.