Skip to main content

Integrate Teaspoon with BrowserStack

Run your tests using Teaspoon on BrowserStack

Introduction

Teaspoon is a Javascript test runner built for Rails. The goal of Teaspoon is to be simple to use while also providing the most complete Javascript testing solution for Rails. Teaspoon takes advantage of the Rails asset pipeline, and ships with support for Jasmine, Mocha, and QUnit.

Configure Teaspoon with BrowserStack

Find ./spec/teaspoon_env.rb in your rails project and change the following options.

teaspoon_env.rb
# Change the following in your .teaspoon_env.rb
config.driver = :browserstack

config.driver_options = {
    capabilities: [
    {
        os: "OS X",
        os_version: "Yosemite",
        browser: "chrome",
        browser_version: "75"
    },
    ],
    username:"YOUR_USERNAME",
    access_key:"YOUR_ACCESS_KEY",
    build: "Example test",
    max_parallel: 5 # no of parallel sessions
}

Setup BrowserStack Local

Use the steps below to setup a Local Testing connection.

  1. Download the appropriate binary:

  2. Navigate to the folder containing the binary, and run it from the command-line interface.

     path/to/BrowserStackLocal --key YOUR_ACCESS_KEY
    

    To know more in detail about BrowserStack Local refer this link

Run tests on BrowserStack

Open another terminal window. Navigate to the rails project directory and run teaspoon tests using the following command

bundle exec rake teaspoon

It will run the test on BrowserStack Automate, and you can monitor the test in real-time on the Automate dashboard.

Run and monitor the test in real-time on the Automate Dashboard For further reference, you can also look at this example project.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy