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

@testsudo/testsudo

v1.0.12

Published

Comprehensive development optimization tool for front-end, back-end and security

Downloads

10

Readme

Testsudo v1.0

Product Description

Welcome to Testsudo, a one-stop testing suite enabling you to test your project's frontend, backend, and security performance!

With a simple CLI command, Testsudo will perform some testing magic and give you a range of metrics for your project on a compatible web application. Rather than searching for 3 separate performance optimization tools, Testsudo abstracts that away into a single command.

Testsudo allows you to:

  • Track multiple projects on the web application, each with its own unique Dashboard
  • Test each page of your project and drills down into the metrics by path

Instructions on using the Testsudo Module

  1. Sign up and login to Testsudo http://testsudo.com.

  2. Create a new project and copy the Project ID.

  3. On your terminal, run npm i @testsudo/testsudo.

  4. Create a testsudoConfig.js in the root directory of your consuming app.

module.exports = {
    frontEndUrl: 'http://localhost:3000', // insert url of what project you want to test
    projectID: '123456', // insert project id from the web app in quotes
    enableSecurityScan: true, // set to false to turn security tests off
    enableFrontEndScan: true, // set to false to turn front end tests off
    enableBackEndScan: true // set to false to turn back end tests off
};
  1. In the consuming app’s server.js file, add the following code immediately after app is initialized (const app = express()):

If using CommonJS:

const testsudo = require(‘@testsudo/testsudo’);
const testsudoConfig = require(‘../testsudoConfig.js’); // make sure this is the actual location of testsudoConfig.js
testsudo.initializeTestsudo(app, testsudoConfig);

If using ES6+:

import testsudo from 'testsudo';
import testsudoConfig from '../testsudoConfig.js'; // make sure this is the actual location of testsudoConfig.js
testsudo.initializeTestsudo(app, testsudoConfig);
  1. Run your development environment as you would normally would (e.g., npm run dev).

  2. Review your project dashboard on Testsudo http://testsudo.com

Frontend Testing

Lighthouse metrics

Of 05/13/2024 the latest version of Lighthouse is 12.

Core Web Vitals:

Performance

Lighthouse 10 Audit Scoring System

Understanding LHR (Lighthouse Result Object)

| acronym | audit categories | Weight | Brief Description | | ------- | ----------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ | | FCP | First Contenful Paint | 10% | Marks the time at which the first text or image is painted | | SI | Speed Index | 10% | Shows how quickly the contents of a page are visibly populated | | TBT | Total Blocking Time | 25% | Sum of all time periods between FCP and Time to Interactive (i.e., the amount of time it takes for the page to be fully interactive) | | LCP | Largest Contenful Paint | 30% | Marks the time at which the largest text or image is painted | | CLS | Cumulative Layout Shift | 25% | Measures the movement of visible elements within the viewport |

|

[Accessibility] (https://developer.chrome.com/docs/lighthouse/accessibility/scoring)

Each metrics are pass/fail, weighted score of importance from 1-10.

Some examples of Accessiblity Metrics:

| description | weight | | ------------------------------------------------------------------------------------------------------ | ------ | | Button has accessible names | (10) | | No Forms have multiple lablels | (3) | | Links must have descernible text | (7) | | Image buttons must have alternate text | (10) |

Best Practices

Each set of metrics are just general guidelines of how to use good practices to make your code run smoothly

Backend Testing

Backend testing is an essential practice in software development that tests the server-side components of applications. This process ensures that the backend functions effectively under various conditions, supporting stability, performance, and security. It verifies server-side logic, database operations, API interactions, and other backend services. Implementing comprehensive backend testing with Testsudo, which utilizes the Measured module, allows developers to detect and address potential issues related to performance bottlenecks, errors, and inefficiencies.

Testsudo leverages the Measured module to provide detailed insights into backend operations through real-time metrics collection. Here are the key metrics tracked by the module:

Security Testing

Security Metrics Warning Categories:

  • Warning
  • Low
  • Medium
  • High
  • Critical

You can click a warning category of the pie chart to isolate only warnings of that kind in the other sections.

The Security Vulnerabilities section will display a breakdown of the quantity of each vulnerability your project has by title.

The Location of Vulnerabilities section will show the type of vulnerability along with the file location of the vulnerability inside of your project.

Contributors

  • 🖇️ = LinkedIn
  • 🐙 = Github