npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@willowtreeapps/rokul-runnings

v0.4.0

Published

Library to send automated commands to a Roku

Downloads

69

Readme

Rokul Runnings

This library is used to automate a Roku device.

npm version node version CircleCI

Setup

  • In your project, install via npm install @willowtreeapps/rokul-runnings
  • Before using the RokulRunnings class, you will also need to instantiate the RokulRunnings class.

An example using Mocha and TypeScript:

import { RokulRunnings } from 'rokul-runnings';

describe('Tests for the X screen', function() {
    let rr: RokulRunnings;

    before(function() {
        // Start the class before the suite runs
        rr = new RokulRunnings(/*Roku IP Address =*/'0.0.0.0',
          /*username=*/'username',
          /*password=*/'password),
          {
            pressDelayInMillis: 1000,
            retryDelayInMillis: 1000,
            retries: 1
          }
    })

    it('Should Launch The Channel', async function() {
        await rr.launchTheChannel({channelCode: 'dev'});
    })

    it('Should Delete The Channel', async function() {
        await rr.deleteChannel();
    }
})

RokulRunnings Class

See RokulRunnings docs file for more information.

Development Application Installer functions

Sideloading (specifically installChannel() and replaceChannel()) and Screenshotting (getScreenshot()) are somewhat flaky. They will execute, however they have been known to have a stream that continues after all functions have completed. They currently do not throw errors (although debugging for all exceptions may yield some results), but do not be surprised if you use these functions if they cause your tests to continue to "run" for a minute or more after completion.

For more information, look at the RokulRunnings documentation.

FAQ

  • What is this?
    • This library is an alternative to the Roku-provided framework, which was written in python and robot framework found here
  • Why?
    • Most test engineers are more familiar with TypeScript than they are with robot framework (and maybe also python.) By having the same functionality in a different language, it will allow more people to automate their tests and interactions with Roku devices in a language they may be more familiar with for automated testing.
  • Does this have built in assertions?
    • Somewhat. A few of the functions in the RokulRunnings class return boolean values and can be used with your favorite assertion libraries to verify that certain actions have been achieved.
    • But by and large, this library does not have it's own assertion methods. We anticipate that you can use the responses from the various methods to inform your testing assertions. If you need ideas about how the data is returned or how assertions can work, the rokul-runnings-unit-tests.ts file might be a good place to start, or looking at the various responses in the RokulRunnings documentation
  • What if I have suggestions or find issues?
    • Write up any feature suggestions or issues on the Github.
  • Most of the functions provided are asynchronous. Why?
    • A majority of the functions are either HTTP requests or rely on responses from HTTP requests. In order to ensure that the requests have completed and the responses have returned, the functions were made asynchronous.
  • I need to test the requests or responses. Is there any easier way to do that than running writing automation?
  • Whoa that screenshot you use in the unit tests is super cool! How'd you generate it?
    • It is a screenshot from a Roku component library, created by WillowTree! Check out (Rocute)[https://github.com/willowtreeapps/rocute] for ideas on how to create some components.

Documentation

Most of the documentation provided in the inline comments was provided from the Roku documentation for the Roku Robot Framework Library and Roku WebDriver.