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

testosteron

v0.0.61

Published

simple crosslanguage testing-utility using bash, crosslanguage bootstrapper for unittests

Downloads

4

Readme

testosteron

deadsimple unit/box/regression-testing-tool using bash & shebang files with any programminglanguage.

Installation

using git

$ git clone https://github.com/coderofsalvation/testosteron 
$ cd testosteron 
$ ./testosteron rundir tests/white

or using npm:

$ npm install testosteron
$ node_modules/.bin/testosteron rundir node_modules/testosteron/tests/white

Why

PHPUnit or whatever-cool-programminglanguage-Unit is great..but sometimes limiting. For those who need to test on many levels quickly: testosteron is here, which bootstraps any testscript- or testframework. Most of the time developers know multiple programming languages, so testosteron allows testing in any programming language. Testscripts are very easy, they just pass or fail using exitcode 0 or more.

How

Supersimple, just shebang files and symbolic links. Lets look at the tests:

Now, since we want to be flexible, we can define presets using symlinks

After that, just run 1 test:

./testosteron run tests/white/10001-test.js 

Or for a whole dir with tests:

./testosteron rundir tests/white 

Or a certain preset:

./testosteron rundir presets/offline

Or if you want your tests to fail after a certain executiontime:

PREFIX="timeout 1.3s" ./testosteron rundir presets/stress

Installation

Just drop this repository in your webapplication rootdir, and you are ready to go write some testscripts:

git clone https://github.com/coderofsalvation/testosteron.git
cd testosteron && rm -rf doc

What are these colornames?

Gray are graybox test, white are more detailed whitebox tests Optionally, make sure you have some cli-entrypoints in your webapplication, so you can easily access website/app configvariables within bash.

Notable features

Just using a teaspoon of bash you can:

  • measure cpu,memory and i/o usage per test
  • compare with expected output (if a test like '10-foo.js' is accompanied with '10-foo.js.out')
  • be flexible when what to tests (presets)
  • its superportable: no frameworks/libs, just 1 file with 100% bash

Advanced Usage

Testosteron was made with autodeployment in mind, therefore it works great with GIThooks and/or nodejs-deploy-githook.bash or project-deploy-githook.bash If one pushes a new website to the server, testosteron runs all the tests, if something fails, deployment will halt. Example .ndg/hooks/test :

./testosteron rundir presets/deployment || {
  echo "removing last commit since you did not pass testosteron..sorry"
  git reset --hard HEAD~1
}