{"id":26267516,"url":"https://github.com/oslabs-beta/testsudo","last_synced_at":"2025-04-30T19:08:48.700Z","repository":{"id":224249828,"uuid":"762073655","full_name":"oslabs-beta/testsudo","owner":"oslabs-beta","description":"A one-stop testing suite offering a range of frontend, backend, and security metrics for your projects.","archived":false,"fork":false,"pushed_at":"2025-01-17T19:26:56.000Z","size":51407,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T19:08:12.962Z","etag":null,"topics":["backend","bearer","frontend","lighthouse","measured","optimization","performance-testing","security","testing-tools"],"latest_commit_sha":null,"homepage":"https://www.testsudo.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oslabs-beta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"open-source-labs","custom":["https://donorbox.org/donations-to-oslabs-inc"]}},"created_at":"2024-02-23T03:04:46.000Z","updated_at":"2025-01-02T00:52:49.000Z","dependencies_parsed_at":"2024-05-30T03:44:40.463Z","dependency_job_id":"8e592b67-9759-4bc4-aa72-46946f77fe2b","html_url":"https://github.com/oslabs-beta/testsudo","commit_stats":null,"previous_names":["oslabs-beta/testudo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2Ftestsudo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2Ftestsudo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2Ftestsudo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2Ftestsudo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oslabs-beta","download_url":"https://codeload.github.com/oslabs-beta/testsudo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251767186,"owners_count":21640469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","bearer","frontend","lighthouse","measured","optimization","performance-testing","security","testing-tools"],"created_at":"2025-03-14T04:17:08.465Z","updated_at":"2025-04-30T19:08:48.639Z","avatar_url":"https://github.com/oslabs-beta.png","language":"JavaScript","funding_links":["https://github.com/sponsors/open-source-labs","https://donorbox.org/donations-to-oslabs-inc"],"categories":[],"sub_categories":[],"readme":"# Testsudo v1.0.0\n\n## Product Description\n\n![logo](web-app/client/assets/logo.jpg)\n\nWelcome to Testsudo, a one-stop testing suite enabling you to test your project's frontend, backend, and security performance!\n\nWith 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.\n\nTestsudo allows you to:\n\n- Track multiple projects on the web application, each with its own unique Dashboard\n- Test each page of your project and drills down into the metrics by path\n\n## Instructions on using the Testsudo Module\n\n1. Sign up and login to Testsudo \u003chttp://testsudo.com\u003e.\n\n2. Create a new project and copy the Project ID.\n\n3. On your terminal, run `npm i @testsudo/testsudo`.\n\n4. Create a `testsudoConfig.js` in the root directory of your consuming app.\n\n```\nmodule.exports = {\n    lighthouseUrl: \u003cinsert url of what project you want to test\u003e,\n    projectID: \u003cinsert project id from the web app in quotes\u003e,\n};\n```\n\n4. In the consuming app’s server.js file, add the following code immediately after app is initialized (`const app = express()`):\n\nIf using CommonJS:\n\n```\nconst testsudo = require(‘testsudo’);\nconst testsudoConfig = require(‘../testsudoConfig.js’); // make sure this is the actual location of testsudoConfig.js\ntestsudo.initializeTestsudo(app, testsudoConfig);\n```\n\nIf using ES6+:\n\n```\nimport testsudo from 'testsudo';\nimport testsudoConfig from '../testsudoConfig.js'; // make sure this is the actual location of testsudoConfig.js\ntestsudo.initializeTestsudo(app, testsudoConfig);\n```\n\n5. Run your development environment as you would normally would (e.g., npm run dev).\n\n6. Review your project dashboard on Testsudo \u003chttp://testsudo.com\u003e\n\n## Frontend Testing\n\n### Lighthouse metrics\n\nOf 05/13/2024 the latest version of Lighthouse is 12.\n\n### Core Web Vitals:\n\n#### [Performance](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring)\n\nLighthouse 10 Audit Scoring System\n\n[Understanding LHR (Lighthouse Result Object)](https://github.com/GoogleChrome/lighthouse/blob/main/docs/understanding-results.md)\n\n| acronym | audit categories                                                                                                        | Weight | Brief Description                                                                                                                    |\n| ------- | ----------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| FCP     | [First Contenful Paint](https://developer.chrome.com/docs/lighthouse/performance/first-contentful-paint)                | 10%    | Marks the time at which the first text or image is painted                                                                           |\n| SI      | [Speed Index](https://developer.chrome.com/docs/lighthouse/performance/speed-index)                                     | 10%    | Shows how quickly the contents of a page are visibly populated                                                                       |\n| TBT     | [Total Blocking Time](https://developer.chrome.com/docs/lighthouse/performance/lighthouse-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) |\n| LCP     | [Largest Contenful Paint](https://developer.chrome.com/docs/lighthouse/performance/lighthouse-largest-contentful-paint) | 30%    | Marks the time at which the largest text or image is painted                                                                         |\n| CLS     | [Cumulative Layout Shift](https://web.dev/articles/cls)                                                                 | 25%    | Measures the movement of visible elements within the viewport                                                                        |\n\n|\n\n#### [Accessibility] (https://developer.chrome.com/docs/lighthouse/accessibility/scoring)\n\n###### Each metrics are pass/fail, weighted score of importance from 1-10.\n\nSome examples of Accessiblity Metrics:\n\n| description                                                                                            | weight |\n| ------------------------------------------------------------------------------------------------------ | ------ |\n| [Button has accessible names](https://dequeuniversity.com/rules/axe/4.7/button-name)                   | (10)   |\n| [No Forms have multiple lablels](https://dequeuniversity.com/rules/axe/4.7/form-field-multiple-labels) | (3)    |\n| [Links must have descernible text](https://dequeuniversity.com/rules/axe/4.7/link-name)                | (7)    |\n| [Image buttons must have alternate text](https://dequeuniversity.com/rules/axe/4.7/input-image-alt)    | (10)   |\n\n#### Best Practices\n\n[Each set of metrics are just general guidelines of how to use good practices to make your code run smoothly](https://developer.chrome.com/docs/lighthouse/best-practices/doctype)\n\n## Backend Testing\n\nDifferent types of backend testing:\nLoad\n\n- Benchmarking test\n- Should be the first test you run.\n- To assess current performance of concurrent users/request per second.\n  - Performance of system under typical and peak load\n  - To have a barometer to compare against for the future.\n  - Great for CI/CD.\n  - Use the load test to test against other test i.e. spike and stress.\n\nSpike (strength training)\n\n- sSmilar to stress test but instead of ramping the test in steady increament over relatively long time, but 'spikes' it over a very short amount of time\n\nStress (endurance training)\n\n- Limits of the system (verify reliablity and stability)\n- How far can we push it under extreme condition\n- What is the max capacity of users/throughput\n- What is the breaking point and its failure mode\n- Will the system need a manual intervention to recover after the stress test is complete\n\nSoak (endurance training or maybe long term review)\n\n- Reliablity over long term, usually the longest test, usually hours\n  - Testing for bugs and memory leaks -\\ can lead to crash/restarts\n  - Verify that expected application restarts don't lose requests\n  - Find bugs related to race-conditions that appear sporadically\n  - Makes sure the DB doesn't exhaust the alloted storage space and stops\n  - Makes sure your logs don't exhaust the alloted disk storage\n  - Makes sure the external services you depend on don't stop working after certain amount of request are executed.\n\n## Security Testing\n\nSecurity Metrics Warning Categories:\n\n- Warning\n- Low\n- Medium\n- High\n- Critical\n\nYou can click a warning category of the pie chart to isolate only warnings of that kind in the other sections.\n\nThe Security Vulnerabilities section will display a breakdown of the quantity of each vulnerability your project has by title.\n\nThe Location of Vulnerabilities section will show the type of vulnerability along with the file location of the vulnerability inside of your project.\n\n## Contributors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/99973059?v=4\" width=\"140px;\" alt=\"\"/\u003e\n      \u003cbr /\u003e\n      \u003csub\u003e\u003cb\u003eDaniel Sin\u003c/b\u003e\u003c/sub\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"#\"\u003e🖇️\u003c/a\u003e\n      \u003ca href=\"https://github.com/heymistersin\"\u003e🐙\u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/35116242?v=4\" width=\"140px;\" alt=\"\"/\u003e\n      \u003cbr /\u003e\n      \u003csub\u003e\u003cb\u003eTrang Do\u003c/b\u003e\u003c/sub\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"#\"\u003e🖇️\u003c/a\u003e\n      \u003ca href=\"https://github.com/trangyz\"\u003e🐙\u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/119250512?v=4\" width=\"140px;\" alt=\"\"/\u003e\n      \u003cbr /\u003e\n      \u003csub\u003e\u003cb\u003ePaul Krapivin\u003c/b\u003e\u003c/sub\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"#\"\u003e🖇️\u003c/a\u003e\n      \u003ca href=\"https://github.com/PavelKrapivin\"\u003e🐙\u003c/a\u003e\n    \u003c/td\u003e\n     \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/144400166?v=4\" width=\"140px;\" alt=\"\"/\u003e\n      \u003cbr /\u003e\n      \u003csub\u003e\u003cb\u003eWan Ting Lee\u003c/b\u003e\u003c/sub\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"#\"\u003e🖇️\u003c/a\u003e\n      \u003ca href=\"https://github.com/wantinglee90\"\u003e🐙\u003c/a\u003e\n    \u003c/td\u003e\n     \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/140926208?s=400\u0026u=1754b0edab1f319f20e1da263226b20fea9e3bd8\u0026v=4\" width=\"140px;\" alt=\"\"/\u003e\n      \u003cbr /\u003e\n      \u003csub\u003e\u003cb\u003eAaron Rivas\u003c/b\u003e\u003c/sub\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"https://www.linkedin.com/in/aaronrivas/\"\u003e🖇️\u003c/a\u003e\n      \u003ca href=\"https://github.com/arivreduce\"\u003e🐙\u003c/a\u003e\n    \u003c/td\u003e\n\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n- 🖇️ = LinkedIn\n- 🐙 = Github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslabs-beta%2Ftestsudo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foslabs-beta%2Ftestsudo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslabs-beta%2Ftestsudo/lists"}