<aside> πŸ“Œ Available from CLI v1.17

</aside>

The goal is to run different user flows or steps in the app while measuring mobile performance KPIs. We can run these tests on real devices using Appium + NodeJS tests while Apptim monitors the app.

How to run a NodeJS test with Apptim?

Edit your test.yml to specify the test-file and the test-runner properties using the nodejs runner name. You will need to set the run command for your tests under the test-run-command property. Optionally you can set appium and node version using the appium-version property and nodejs-version as follows:

test-file: ./node-test-with-modules.zip
test-runner:
	name: nodejs
  appium-version: '1.22.3'    
  node-version: '14.19.3'
  test-run-command: 'npm test'

<aside> πŸ“Œ It is required to specify which command will be used to run the tests, for example npm test. In case you need more than one command to make your tests run, edit the./templates/nodejs/{platform}/user-run-test-steps.yml and add all the commands that you need as explained in Customizing steps in AWS Device Farm

</aside>

You are ready to launch the test from apptim-cli using the command apptim run --config test.yml

How to configure NodeJS artifacts to work in AWS Device Farm?

A zip file containing your tests needs to be in a specific way in order to work out-of-the-box in AWS Device Farm. Read carefully this documentation to create your tests and zip file.

npm install -g npm-bundle
npm install && npm-bundle
zip -r MyTests.zip *.tgz

Important considerations: