Skip to content

Commit

Permalink
Add TestingBot example (#160)
Browse files Browse the repository at this point in the history
* add TestingBot example

* update testingbot config

* use spaces

* Update config/testingbot/wdio.android.tb.app.conf.ts

Co-authored-by: Christian Bromann <[email protected]>

---------

Co-authored-by: Christian Bromann <[email protected]>
  • Loading branch information
jochen-testingbot and christian-bromann authored Dec 15, 2023
1 parent 3a32030 commit c788332
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,23 @@ $ npm run ios.browserstack.app
$ npm run android.browserstack.app
```

### TestingBot

This boilerplate provides a setup for testing with TestingBot. Please check the [TestingBot](./config/testingbot)-folder to see the
setup for Android.

Make sure you install the latest version of the `@wdio/testingbot-service` with

```shell
npm install --save-dev @wdio/testingbot-service
```

You can use the script from [`package.json`](./package.json), to execute the tests in the TestingBot cloud:

```sh
$ npm run android.testingbot.app
```

## FAQ

See [FAQ](./docs/FAQ.md)
Expand Down
41 changes: 41 additions & 0 deletions config/testingbot/wdio.android.tb.app.conf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { config as baseConfig } from '../wdio.shared.conf';

export const config: WebdriverIO.Config = {
...baseConfig,

// ============
// Specs
// ============
specs: [
'./tests/specs/**/app*.spec.ts',
],
exclude: [
// Exclude this one because the test can only be executed on emulators/simulators
'./tests/specs/**/app.biometric.login.spec.ts',
],

// =============================
// TestingBot specific config
// =============================
// User configuration
user: process.env.TESTINGBOT_KEY || 'TESTINGBOT_KEY',
key: process.env.TESTINGBOT_SECRET || 'TESTINGBOT_SECRET',
// Use testingbot service
services: ['testingbot'],

// ============
// Capabilities
// ============
// For all capabilities please check
// http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities
capabilities: [
{
// Set URL of the application under test
app: 'https://testingbot.com/appium/sample.apk',

deviceName: 'Pixel 6',
platformName: 'Android',
version: '12.0',
},
],
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"android.sauce.emulators.app.us": "wdio run config/saucelabs/wdio.android.emulators.app.conf.ts",
"android.sauce.rdc.app.eu": "REGION=eu wdio config/saucelabs/wdio.android.rdc.app.conf.ts",
"android.sauce.rdc.app.us": "wdio run config/saucelabs/wdio.android.rdc.app.conf.ts",
"android.testingbot.app": "wdio ./config/testingbot/wdio.android.tb.app.conf.ts",
"android.app": "wdio run config/wdio.android.app.conf.ts",
"android.browser": "wdio run config/wdio.android.browser.conf.ts",
"browser": "wdio run config/wdio.browser.conf.ts",
Expand All @@ -51,6 +52,7 @@
"@wdio/mocha-framework": "^8.24.12",
"@wdio/sauce-service": "^8.26.1",
"@wdio/spec-reporter": "^8.24.12",
"@wdio/testingbot-service": "^8.26.1",
"appium": "^2.2.3",
"appium-uiautomator2-driver": "^2.34.2",
"appium-xcuitest-driver": "^5.12.2",
Expand Down

0 comments on commit c788332

Please sign in to comment.