https://github.com/devexpress/gulp-testcafe
Run TestCafe tests using Gulp.
https://github.com/devexpress/gulp-testcafe
Last synced: 9 days ago
JSON representation
Run TestCafe tests using Gulp.
- Host: GitHub
- URL: https://github.com/devexpress/gulp-testcafe
- Owner: DevExpress
- License: mit
- Archived: true
- Created: 2016-09-16T10:21:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-02T09:40:07.000Z (about 2 years ago)
- Last Synced: 2025-12-06T14:49:21.510Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://testcafe.io
- Size: 39.1 KB
- Stars: 10
- Watchers: 23
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DEPREDCATED
The TestCafe team no longer maintains the `gulp-testcafe` repository. If you want to take over the project, we'll be happy to hand it over. To contact the team, create a new GitHub issue.
## gulp-testcafe
[](https://ci.appveyor.com/project/DevExpress/gulp-testcafe)
*Run TestCafe tests using Gulp.*
### Install
```sh
npm install --save-dev gulp-testcafe
```
### Usage
```js
const gulp = require('gulp');
const testcafe = require('gulp-testcafe');
gulp.task('default', () => {
return gulp.src('test.js')
.pipe(testcafe({ browsers: ['chrome', 'firefox'] }));
});
```
### API
```js
testcafe(options)
```
#### Options
##### browsers
*Type*: `Array`
*Default*: `[]`
*Details*: [Specifying Browsers for Test Task](https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/browser-support.html#specifying-browsers-for-test-task)
*Required*
Configures the test runner to run tests in the specified browsers.
##### reporter
*Type*: `String` || `Array`
*Default*: `spec`
*Details*: [Reporters](https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/reporters.html)
Specifies the reporter or an array of reporters.
Reporter can be specified by reporter name, or an object with following properties:
* `name` - name of the reporter,
* `output` - the file path where the report is written or the output stream.
Examples:
```js
"reporter": "minimal"
```
```js
"reporter": { "name": "json", "output": "report.json" }
```
```js
"reporter": { "name": "xunit", "output": fs.createWriteStream("report.xml") }
```
```js
"reporter": ["spec", { "name": "xunit", "output": fs.createWriteStream("report.xml") }]
```
##### filter
*Type*: `function(testName, fixtureName, fixturePath)`
*Default*: `null`
*Details*: [runner.filter](https://devexpress.github.io/testcafe/documentation/using-testcafe/programming-interface/runner.html#filter)
Allows you to manually select which tests should be run.
##### screenshotsPath
*Type*: `String`
*Default*: `null`
*Details*: [Screenshots path](http://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#-s-path---screenshots-path)
The path to which the screenshots will be saved. Enables the test runner to take screenshots of the tested webpages.
##### takeScreenshotsOnFail
*Type*: `Boolean`
*Default*: `false`
*Details*: [Take screenshots on fail](http://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#-s---screenshots-on-fails)
Specifies if screenshots should be taken automatically whenever a test fails. Requires that the [screenshotsPath](#screenshotsPath) is set.
##### skipJsErrors
*Type*: `Boolean`
*Default*: `false`
*Details*: [Skip JS errors](http://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#-e---skip-js-errors)
Defines whether to continue running a test after a JavaScript error occurs on a page (`true`), or consider such a test failed (`false`).
##### quarantineMode
*Type*: `Boolean`
*Default*: `false`
Defines whether to enable the [quarantine mode](https://devexpress.github.io/testcafe/documentation/using-testcafe/programming-interface/runner.html#quarantine-mode).
##### selectorTimeout
*Type*: `Number`
*Default*: `10000`
*Details*: [Selector timeout](http://devexpress.github.io/testcafe/documentation/test-api/selecting-page-elements/selectors.html#selector-timeout)
Specifies the amount of time, in milliseconds, within which [selectors](https://devexpress.github.io/testcafe/documentation/test-api/selecting-page-elements/selectors.html) make attempts to obtain a node to be returned.
### Author
Developer Express Inc. ([https://devexpress.com](https://devexpress.com))