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

dcc-server-tester

v1.0.3

Published

A server to process media submitted to lightover

Downloads

12

Readme

DCC-Server-Tester

The DCC-Server-Tester is a test script that you can easily run against your server deployment. Tests can either be run locally, or for more production-scale tests, they can be run using AWS lambda.

Preparing to test

1. Install Node.js

The dcc-server-tester runs using Node.js. Follow the instructions to install Node.js to get started.

2. Setup a test Email via the DCC Dashboard

First, navigate to the server dashboard you wish to test (for example https://dashboard.dcconsortium.org). Click "Upload and Prepare Batch"

The DCC Dashboard

Create a name for your test batch (for example, "Test 7"), and select any available template you wish to test. On the "Upload & Manage Earner Information" page, upload a CSV with one line that contains your email. For example, you could copy the CSV below and replace [email protected] with your personal email.

earnerName,degreeType,subject,credentialName,emailAddress
John Doe,Bachelor of Science,Computer Science,Bachelors,[email protected]

Select an email template. On the final "Confirmation" page, press "Send." This should send an email with a link to your personal email (like the one below.) Copy the emailed link and save it for later.

Email link from the dashboard

Running Tests

Running tests locally requires minimal setup. You can use the dcc-server-tester library by simply running the command below, replacing {EMAILED_URL} and {DASHBOARD_URL} with your personal information.

npx dcc-server-tester test -e "{EMAILED_URL}" -d "{DASHBOARD_URL}" -s "1" -r "1"

The dcc-server-tester CLI has one command, "test," and it has the following parameters:

| Param | Description | Example | Default | |-----------------------|---------------------------------------------------|-------------------------------------------------------|---------| | -e or --emailed_url | The URL emailed to you in the step above. | https://load-test.dcconsortium.org/claim/?token=ey... | none | | -d or --dashboard_url | The URL of the dashboard you wish to test | https://load-test.dcconsortium.org | none | | -s or --seconds | The number of seconds you want your test to run | 200 | 1 | | -r or --rate | The number of simulated users per second you want | 100 | 1 | | -a or --aws | Add this flag to run your tests on AWS Lambda | | |

Running tests with AWS Lambda

Get Access Keys for AWS

AWS Lambda uses Amazon servers to run your tests. This lets us use a beefy data-center network to send thousands of requests. But, before we run the tests, we need to set up your Amazon account.

First go to https://aws.amazon.com/ and create an account if you have not already.

In the search bar on the AWS console, search "IAM" and choose "IAM"

Select IAM in the AWS search console

Once you've activated IAM, select the "user" link in the side menu and click "Create User."

On the next screen, you can name the user anything (for example cli-user).

Create a new user

On the "Set Permissions" screen, select the "Attach policies directly" option, search "administratorAccess" in the search box, and select the "AdministratorAccess" policy.

Add admin permissions to the user

Review the options and click "Create User."

Back on the "User" pane, click on the user you just created.

Click on the user you just created

Now, we need to generate keys that we will use to let the dcc-server-tester access this user. To do this, click the "Create Access Key" link.

Select Create Access Key

Select "Command Line Interface (CLI)" from the options.

Select "Command Line Interface (CLI)"

Once you've created the key, copy the "Access Key" and "Secret access key" and save it for later. You will not be able to retrieve these keys once you naviage away from this screen.

Select Create Access Key

Configure the AWS CLI

Now we want to set up the AWS CLI on your local machine. When you run the dcc-server-tester it will look for the AWS CLI and use it to deploy your tests to AWS Lambda.

To install the AWS CLI, follow the installation instructions for your platform.

Now, run the aws configure command. You will be prompted to provide a AWS Access Key and AWS Access Secret Key. Use the ones we generated in the previous section.

Run the Tests

Now, we can run the tests using AWS Lambda. To do so, we can run the same command, but provide the "-a" flag to indicate we want the tests to run on AWS. For example:

npx dcc-server-tester test -e "{EMAILED_URL}" -d "{DASHBOARD_URL}" -s "1" -r "1" -a