🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@rainforestqa/farmer

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rainforestqa/farmer

AWS Device Farm Websocket client. Connects to real mobile devices, renders their UI and enables interacting with them.

1.2.1
latest
Source
npm
Version published
Maintainers
4
Created
Source

Farmer

A web client built to interact with AWS Device Farm's remote access API.

The client was designed to be imported as a dependency in beak to interact directly with our devices on Device Farm.

Local development

  • Clone this repo locally
  • Run npm install
  • Run npm run start to start a webpack dev server build, this should automatically open a browser tab at http://localhost:8080/ with example/index.html as content
  • In Rainforest repo run bundle exec rails console to open rails console
  • first create a device farm client:
device_farm = Aws::DeviceFarm::Client.new(region: 'us-west-2', credentials: Aws::Credentials.new(GetEnv['DEVICE_FARM_PUBLIC_KEY'], GetEnv['DEVICE_FARM_SECRET_KEY']))
remote = device_farm.create_remote_access_session({
  project_arn: PROJECT_ARN,
  device_arn: DEVICE_ARN,
  name: "Remote Session Test",
  configuration: {
    billing_method: "METERED",
  },
})
  • to get our websocket session endpoint keep on running the following until endpoint is not nil (status should be RUNNING). It will take ± 2min for the remote session to provision and this to return an endpoint.
access = device_farm.get_remote_access_session({arn: remote.remote_access_session.arn})
  • Get the endpoint value
access["remote_access_session"]["endpoint"]
  • Open the tab with http://localhost:8080/

  • Paste the endpoint value into the input form at the top

  • Set the right device dimensions into the form fields, this is important for click events to end up on the right places, the dimensions are stored in the remote_access_session attributes

  • Click 'Launch Farmer' button

  • Profit!

  • Remember to close the remote session after you're done testing

device_farm.stop_remote_access_session({arn: remote.remote_access_session.arn})

Deployment

A new version of the package has to be published to NPM. Depending projects have to update their package.json to use the latest version.

Publishing a new version to NPM is automated via CircleCI workflows that kick off when changes with a new package.json version are merged to the master branch.

Keywords

aws

FAQs

Package last updated on 21 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts