gmatt / devicefarm-web-nodejs-test

2 stars 0 forks source link

DeviceFarm Web Node.js Test

Steps to create

The environment is Node.js. For client, I chose WebdriverIO. It is one of the two clients Appium website recommends for Node.js, so it seems a safe choice.

The Appium Clients - Appium

I created this test package based on the WebdriverIO Getting Started tutorial’s sample test:

Getting Started · WebdriverIO

I diverged from the tutorial, for service, I chose appium instead of chromedriver.

Then I made the following changes:

These changes are visible in this commit:

minor modifications on wdio.config.js: · gmatt/devicefarm-web-nodejs-test@d135910 · GitHub

To run the package on DeviceFarm, I followed this tutorial:

Working with Appium Node.js for Web Applications and AWS Device Farm - AWS Device Farm

Ran these commands:

npm-bundle
zip -r /MyTests.zip/ *.tgz

Then on DeviceFarm web console:

AWS Device Farm

replace

node YOUR_TEST_FILENAME.js

with

./node_modules/.bin/wdio wdio.conf.js

I saved the yaml as wdio-testspec.yml.

Resources