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

optimus-automation

v1.5.0

Published

Node JS module to optimize UI and API automation using BDD practices.

Downloads

47

Readme

Optimizing automation framework creation

About

Problem statement

There are multiple frameworks or boilerplate code available which can help you to kick start with your test automation project. But it's not about getting your job done!!!

We belong to the group of engineers who try to avoid boilerplate or abstract layer of code in our projects. It always pays-off when you understand the core concepts of a module before consuming it.

Couple of reasons to support:

  • Generalized code: One may or may not need all the functionality provided by the boilerplate code or module.

  • Customizing features: Every project changes over course of time. Most of the time, it's not worth spending time to understand the boilerplate code in order to develop custom features on top of that.

  • Control and Maintenance: Project inherited from a boilerplate are difficult to maintain in long run. Also developers lose control of the code and start treating that piece of code as black box.

In reality, we tend to download code from internet and try to achieve our goals. Mostly because of complexity or lack of understanding or time.

With help of this module we are trying to help and coach engineers who wants to create an test automation project from scratch. It's really simple! Once you understand every bit of it go ahead and use the module.

Scope

Engineers who want to perform browser based UI testing, API testing etc... can use this module to learn and save time.

Refer features section for list of features provided.

Before you start

Optimus automation is structured in multiple modules. We suggest you to understand the modules you are interested in and their core concepts. Each module comes with detail documentation which can be co-related with their official documentation.

Each module is independent of each other resulting in a loose-coupled system. Hence provides flexibility to learn and use one or few all modules as per requirement.

For any suggestion, doubts or contribution, please feel free to raise issues on GitHub. We will try to respond ASAP.

Installation

npm install optimus-automation --save

Features

  • BDD business driven development is the core of this module. Cucumber-js is used to support BDD.

    Cucumber starts as a nodejs child process using cross-spawn module to support windows environment.

    CLI options and configurations of cucumber is mentioned here. <<>>.

    Learn about cucumber-js implementation from /src/modules/cucumber.

    NOTE: cucumber-js is not an dependency for this framework. Instead cucumber-js required as a dependency on the framework/project consuming it.

  • Three layer configuration: This module processes three type of configurations namely CLI, .optimusrc.js and default configuration. These configurations are consumed directly by the core modules. Details about all the CLI options are mentioned <>.

    • CLI configurations can be passed from CLI. Providing flexibility for passing parameter to the modules using command prompt. CLI options are processed into command line arguments using command-line-args module.

      CLI has highest priority and will override the values passed from .optimusrc.js or default configuration.

    • .optimusrc.js is a configuration file kept at root of the project. This file exports an object containing configuration object specific to modules. Refer an example of full /.optimusrc.js config file.

      As there are many configurations to be passed for each module, it's important that you define .optimusrc.js file and override only required using CLI.

      NOTE: .optimusrc.js file has the second priority in the list.

    • default configuration is the hard-coded configuration file. These values are used in case they are not passed from CLI or .optimusrc.js. Structure of default-configuration file are same as .optimusrc.js.

      Refer default configuration file.

  • Selenium standalone in-built. selenium-standalone is one of the core module used for browser automation. Selenium standalone APIs are used to implement installation and starting of selenium server.

    Selenium-standalone helps you to install(download) selenium-standalone jar(java archive) file and other supporting browser drivers. It also help you to start the selenium-server.

    CLI options and configurations of selenium is mentioned here. <<>>

    Learn about selenium-standalone API implementation from /src/modules/selenium-standalone.

    NOTE: Don't get confuse with selenium-webdriver with selenium-standalone. Selenium-standalone is just a server used as an interface between webdriver-io and your browser. If you are using selenium-webdriver instead of webdriver-io, then use of selenium-standalone is optional. To know more about selenium-webdriver and selenium-standalone refer seleniumhq.org.

  • API methods in-built. Request module is used to make any HTTP calls (REST or SOAP). One can take advantage of this functions to make request and validate the response object.

Learn at the request simple implementation from /src/modules/request.

  • Logger methods in-built. Winston module is used for logging. Most project requires logging mechanism for debugging, analytics or ML. One may use the function to learn about basic of log implementation.

These module also be useful to learn how CLI logs are beatified without using any module. Color format and categorizing different type of logs.

Learn at the request simple implementation from /src/modules/request.

  • OWASP ZAP in-built. ZAPROXY to control ZAP using APIs. This module can be useful for the following - if you want to know how ZAP works along with API, how to automate ZAP and bring security testing in the CI pipeline. Also you can consume this optimus-automation from npm and start using it directly.

Learn about ZAP from our documentation - LEARN-ZAP