https://github.com/codeceptjs/aerokube-plugin
Aerokube Browsers support for CodeceptJS
https://github.com/codeceptjs/aerokube-plugin
Last synced: 3 months ago
JSON representation
Aerokube Browsers support for CodeceptJS
- Host: GitHub
- URL: https://github.com/codeceptjs/aerokube-plugin
- Owner: codeceptjs
- License: mit
- Created: 2019-09-07T07:06:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T09:20:18.000Z (over 2 years ago)
- Last Synced: 2024-10-29T10:02:56.593Z (8 months ago)
- Language: JavaScript
- Homepage: https://browsers.aerokube.com
- Size: 674 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aerokube Plugin
Cloud browser testing with [Aerokube Browsers](https://browsers.aerokube.com) in CodeceptJS.

## API
#### Table of Contents
- [index](#index)
- [Setup](#setup)
- [Usage](#usage)
- [WebDriver](#webdriver)
- [Puppeteer](#puppeteer)
- [Parameters](#parameters)### index
Run WebDriver and Puppeteer tests in [cloud browsers provided by Aerokube](https://browsers.aerokube.com).
**Aerokube provides lightning fast and comparable cheap browsers** without pain of maintaining own infrastructure.
This plugin works with WebDriver and Puppeteer helpers of CodeceptJS.> If you need to host cloud browsers on your own infrastructure consider browsers in Kubernetes with [Aerokube Moon](https://aerokube.com/moon/)
### Setup
Install this plugin in CodeceptJS project.
npm i @codeceptjs/aerokube-plugin --save-dev
Enable the plugin in `codecept.conf.js`
```js
// codecept.conf.js config
exports.config = {
helpers: {
// regular Puppeteer config
// or regular WebDriver config
},
// ....
plugins: {
aerokube: {
require: '@codeceptjs/aerokube-plugin',
user: '',
password: '',
}
}
}
```> It is recommended to use `dotenv` package to store `username` and `password` from Aerokube Browsers. See the config in `example` dir.
To run tests in cloud, enable this plugin:
npx codeceptjs run --steps -p aerokube
> To enable aerokube plugin permanently use `enabled: true`.
### Usage
#### WebDriver
- Desired capabilities are ignored
#### Puppeteer
We use `webdriverio` library to initialize a browser session and obtain DevTool Protocol API credentials.
- `windowSize` option is used to set initial window size. Not viewport size.
- Chrome starting options are ignored.#### Parameters
- `conf`
## Example Project
To try aerokube plugin without a project, use the one provided in this repo inside `example` directory.
1. Register at [Browsers Aerokube](https://browsers.aerokube.com).
2. Run `npm install` to install all depdndencies.
3. Create `.env` file with the following contents. Username and password should be obtained from Aerokube Browsers.
- `ACCOUNT=`
- `PASSWORD=`
4. Execute tests :- To launch tests in WebDriver
npx codeceptjs run -c example --steps
- To launch tests in PuppeteerPUPPETEER=true npx codeceptjs run -c example --steps