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

robrowser

v0.2.0

Published

BrowserStack automate.

Downloads

14

Readme

Robrowser | GitHub license Travis CI Status

Automate your browser testing now! 🤖

Robrowser is a bot to help you test your project in many different browsers and operating systems.

Support

The currently supported tests are:

The next hubs we intend to support are:

If you want some other hub just create an issue!

Usage

Local usage

Using yarn or npm

yarn add robrowser --dev

Add in your package.json

Run it

"scripts": {
  "robrowser": "robrowser start"
}

Now just run the command

yarn robrowser

Remember, to run you need to configure the robrowser.config.js or .robrowser file at the root of the project.

Global installation

npm i -g robrowser
# or
yarn global add robrowser

One-time usage with npx

If you have npm@>5.2.0 installed you can use npx to execute commands without needing to install a global package if you don't want to.

To do so just run

npx robrowser

Configuration

Robrowser will look for a robrowser.config.js or .robrowser config file in the folder you're executing it to check for your credentials (currently we just support Browser Stack).

Some of robrowser.config.js or .robrowser configuration parameters.

| Attribute | Type | Description | | ---- | ---- | ---- | | remote | object | Configure the connection and access credentials. | screenshot | object | Configuration related to screenshot. | browsers | array | List counting the tests that will be performed, let's call it browser. | concurrency | number | Number of tests running in parallel.

the currency parameter is very important, the hubs have a limited number of parallel tests, if you work as a team this will help you to run your tests without problems.

The remote attribute.

| Attribute | Type | Description | | ---- | ---- | ---- | | host | string | Host dos testes, ex: hub.browserstack.com. | port | number | Port you want to use for tests, defaut is 80. | user | string | See credentials | pwd | string | If you are using a hub, here is your password.

The screenshot attribute.

| Attribute | Type | Description | | ---- | ---- | ---- | | folder | string | Define the directory where the screenshots will be saved. Default is ./screenshots

The browser parameter

Each browser represents a test, for each test you can set capabilities of each respective browser you want to test.

| Attribute | Type | Description | | ---- | ---- | ---- | | os | string | OS you want to test. | os_version | string | OS version you want to test. | browserName | string | Browser you want to test. | browser_version | string | Browser version you want to test. | resolution | string | Set the resolution of VM before beginning of your test. | url | string | Url of the page you want to test. | test | string | Path of test. | local | boolean | Access a url from your local network.

Check our robrowser.config.js or .robrowser to see all available keys.

What is a test?

Test are nothing more than functions that will receive a browser to run and a callback for the next test, example test file.

For more commands just look at this documentation.

With the config file having tests to be executed, Robrowser will run them for you and create a ./screenshot folder with the results, this way you will be able to see if your frontend projects are rendering as expected.

Credentials

Here is how you get your credentials to use in our config file.

Don't forget not to commit them!

BrowserStack

To get your BrowserStack credentials:

  • Log in
  • Go to https://www.browserstack.com/automate
  • On the left side of the screen click Username and Access Keys
  • Paste your Username in the remote.user key
  • Paste your Access Key in the remote.pwd key

Testing and linting

We use ava to run tests under the ./tests/ folder, you can execute it with:

yarn test
# or
npm test

Our lint file extends Pagar.me's JavaScript Style Guide and you can execute it with:

yarn lint
# or
npm run lint

Contributing

Check our Contributing and Code of conduct files so you can join us in this awesome project!

Spoiler alert: We LOVE contributions, open Pull Requests and Issues and we will be eternally grateful for you!

License

This project is licensed under MIT License