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

qa_automation_api

v1.0.0

Published

HBS --host api Test Suite. Used to test endpoint across the enterprise.

Downloads

1

Readme

Usage

Test Suites

Windows

run_tests.bat

Mac/Linux

./run_tests.sh

Individual App

node run_tests <app_name> <environment_file> <user_type>:<email>

node run_tests HBSAlumniGivingService secure_stage_hbsstg student:[email protected]

Individual Script

This will traverse subdirectories looking for the specified script. To configure environment, edit package.json "testWin" or "testMac" script.

npm run (testWin or testMac) <script_name>

npm run testWin hacs_getSubmissions_external.spec.js

Setup

Node.js

Node.js is a prerequisite to using this framework. We recommend the latest LTS version (18.12.1 as of this writing) There are several ways to install node.

Official Installer

https://nodejs.org/en/

Alternatives

https://www.nodejsdesignpatterns.com/blog/5-ways-to-install-node-js/

Clone Git Repo

git clone https://code.harvard.edu/HBS/qa_automation_api.git

Install and Update modules

These commands install the node modules specified in the package.json file. From the project's root directory, run the following:

npm install
npm update

Authentication

Authentication information is stored in ./credentials.json and ./secrets.json. Placeholder versions are included in github.

After initial configuration (below), authentication is handled by the framework. Users added in tests and in package.json will use provided credentials or CEE pwds from secrets.json.

Configure initial credentials and secrets

The framework doesn't update passwords, so they must be initially set manually. We don't store secrets in git, so you need to add/create them in these files

Update utils/credentials.json (already has a skeleton in place, just add user's info)

  1. Open the file and update the passwords for each type of users.
  2. Save.

Create utils/secrets.json

  1. Create a file named secrets.json in the utils folder.
  2. Follow this simple JSON format:
{
  "staff": "super secret password",
  "mba": "super secret password",
  "exed": "super secret password",
  "alumni": "super secret password",
  "public": "super secret password",
  "crossreg": "super secret password"
}

How to configure/use authentication

During execution the framework uses credentials.json to set a CAS cookie for the specified users. The test cases then pull the cookie for a specifis user when configuring the request object.

Users are specified 2 ways:

  • Per app - specified in package.json scripts ; This method updates credentials.json
Configure ./package.json "scripts":
<script name>: "node <script runner> <app name> <env file> <optional username>",

"testAccountHealthCheck": "node run_tests AccountHealthCheck secure_stage_hbsstg [email protected]",

Reference cookie in test:
auth = require('../../../utils/credentials.json')

    it('TC-001 - hacs_changeCaption_external - This API call returns correct response with 200 status code', (done) => {
    
       request.post(data.TC001.endpoint)
              .set("Content-Type", "text/html")
              .set("Cookie",auth.cas_stu.cookie)
              .set("accept", "text/html")
              .end((err, res) => {
                if (err) done.fail(err);
                expect(res.status).toBe(200);
                done()
              });
    });
  • Per test - specified in test data json file: On the fly and not persisted
Gets MOD_AUTH_CAS cookie for specified user (in this case Exed alum)
data.TC001.username = "[email protected]"

authCookie = await login.getModAuthCASCookie(data.TC001.username, 'alu');
      await request.get(data.TC001.endpoint)
                   .set("Content-Type", "application/json")
                   .set("Cookie", authCookie)

For 'per app'... CAS.js and changeUser.js files are utilized (by the framework) to update credentials.json with the new user and cookie. The new user remains the active user (of that type e.g. Staff, Student, etc...) UNTIL:

  • changed in next app (package.json)
  • credentials.json is edited

Utilizing 'per test' method doesn't update credentials.json (so, you can use it for one test and then call credentials.json in the next)

Project Structure

Top Level

├── allure-report
├── allure-results
├── allure_features
├── config
├── history
├── logs
├── node_modules
├── projects
├── responses
└── utils

Reporting

Allure Report is our reporting tool. Allure reports are not static. To view them, you must run the allure server. Reports are created on a per app basis. Allure Commandline must be installed on the host. Allure Commandline Docs To view a report:

cd <app directory> e.g. /Users/cweinberg/git/qa_automation_api/history/2022-12-05_13-26/AccountHealthCheck
allure open

Usage and Information about some Important folders

./allure_feature : This Folder contain files which provides additional section information in allure report for ex Information about executor, environment properties etc. ./allure-report : This Folder contain data files which are used to create allure report by allure reporting tool files for ex history ,trends etc. ./allure-results : This Folder have xml files which contains test execution's result data for every single testcase ./config : This folder contain json files which have base URLs for multiple sevices inside it ./node_modules : This folder contain all the libraries which are installed and used within HBS automation framework ./projects : This folder contains multiple automated projects which are used in HBS automation framework ./utils : In this folder we have all files that contains global data and that data further used within automation scripts.

CEE Project Info


  1. AccountHealthCheck

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/accountHealthCheck/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  2. AccountManagementWS

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : http://intsvcs.hbsstg.org/accountManagementWS/swagger-ui.html
    • Server name : intsvcs.hbsstg.org
  3. AlumniElasticSearch

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/alumniElasticSearchService/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  4. CalendarEventWebServices

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : http://api.hbsstg.org/calendarEventsWS/swagger-ui.html
    • Server name : api.hbsstg.org
  5. CanvasCourseArchive

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/canvasCourseArchive/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  6. CheckList

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/checklist/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  7. Classcards

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/classcards/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  8. Cmat

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/calendar-mgmt/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  9. ConfigurationManagementService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/configurationManagementService/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  10. CPDAlumniProvisioningService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/cpdAlumniProvisioningService/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  11. EnterpriseWrapperService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/enterpriseWrapperService/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  12. HBSExEdAccountBuilder

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/eeaccounts/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  13. ExamV3

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/exam_v3/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  14. GroupWS

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/groups/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  15. HBSAlumniGivingService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/alumniGivingService/swagger-ui.html#/
    • Server name : secure-stage.hbsstg.org
  16. HBSAlumniMessagingServices

    • UserType : Staff/Faculty and Alumni Student
    • CEE Domain : hbsstg.org and alumstg.hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/ws/alumniMessaging/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  17. HBSAlumniClassNotesService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/alumniLifeClassNotesService/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  18. HBSCallTool

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/calltool/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  19. HBSCPDEventsService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : http://api.hbsstg.org/calendarCPDEvents/swagger-ui.html
    • Server name : api.hbsstg.org
  20. HBSEstimatorService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/estimator/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  21. HBSGeoServices

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/ws/hbsGeoService/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  22. HBSMessagingService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : http://api.hbsstg.org/ws/hbsMessagingService/swagger-ui.html
    • Server name : api.hbsstg.org
  23. HBSPlanningEventsService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://api.hbsstg.org/calendarPlanningEvents/swagger-ui.html#/
    • Server name : api.hbsstg.org
  24. HBSSecuredAccounts

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/securedAccounts/swagger-ui.html#/
    • Server name : secure-stage.hbsstg.org
  25. HBSSimAuth

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/simauth/swagger-ui.html#/
    • Server name : secure-stage.hbsstg.org
  26. IndependentProjects

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/ip/swagger-ui.html#/
    • Server name : secure-stage.hbsstg.org
  27. NameRecording

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL :https://secure-stage.hbsstg.org/nameRecordingService/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  28. PanoptoWrapperService

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL :https://api.hbsstg.org/panoptoWrapperService/swagger-ui.html#/
    • Server name : api.hbsstg.org
  29. PeerFeedbackTool

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL :https://secure-stage.hbsstg.org/peerFeedbackTool/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  30. Poll

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/hbsPoll/swagger-ui.html
    • Server name : secure-stage.hbsstg.org
  31. PubReg

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/pub_reg/swagger-ui.html#/
    • Server name : secure-stage.hbsstg.org
  32. TMT

    • UserType : Staff/Faculty
    • CEE Domain : hbsstg.org
    • Swagger Page URL : https://secure-stage.hbsstg.org/tmt/swagger-ui.html
    • Server name : secure-stage.hbsstg.org