{"id":13725879,"url":"https://github.com/catdad/grandma","last_synced_at":"2025-07-20T11:32:57.575Z","repository":{"id":54809381,"uuid":"54239132","full_name":"catdad/grandma","owner":"catdad","description":"👵 fully programmable stress testing framework","archived":false,"fork":false,"pushed_at":"2021-01-28T02:02:34.000Z","size":756,"stargazers_count":20,"open_issues_count":42,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-08T15:57:50.489Z","etag":null,"topics":["benchmarking","cli","grandma","load-test","load-testing","npm","performance"],"latest_commit_sha":null,"homepage":"","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/catdad.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}},"created_at":"2016-03-19T00:24:09.000Z","updated_at":"2022-05-03T18:57:53.000Z","dependencies_parsed_at":"2022-08-14T03:31:06.502Z","dependency_job_id":null,"html_url":"https://github.com/catdad/grandma","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/catdad/grandma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad%2Fgrandma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad%2Fgrandma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad%2Fgrandma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad%2Fgrandma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catdad","download_url":"https://codeload.github.com/catdad/grandma/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad%2Fgrandma/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266117675,"owners_count":23879102,"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":["benchmarking","cli","grandma","load-test","load-testing","npm","performance"],"created_at":"2024-08-03T01:02:38.657Z","updated_at":"2025-07-20T11:32:52.562Z","avatar_url":"https://github.com/catdad.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# [\u003cimg title=\"grandma\" src=\"assets/banner.svg\" width=\"100%\" alt=\"grandma\" /\u003e](https://github.com/catdad/grandma)\n\n[![Linux Build][travis.svg]][travis]\n[![Windows Build][appveyor.svg]][appveyor]\n[![Test Coverage][codeclimate-cov.svg]][codeclimate-cov]\n[![Code Climate][codeclimate-gpa.svg]][codeclimate-gpa]\n[![Downloads][npm-download.svg]][npm]\n[![Version][npm-version.svg]][npm]\n[![Dependency Status][daviddm.svg]][daviddm]\n\n[travis.svg]: https://travis-ci.org/catdad/grandma.svg?branch=master\n[travis]: https://travis-ci.org/catdad/grandma\n\n[codeclimate-cov.svg]: https://codeclimate.com/github/catdad/grandma/badges/coverage.svg\n[codeclimate-cov]: https://codeclimate.com/github/catdad/grandma/coverage\n\n[codeclimate-gpa.svg]: https://api.codeclimate.com/v1/badges/f4da9ebe407884c70af6/maintainability\n[codeclimate-gpa]: https://codeclimate.com/github/catdad/grandma\n\n[npm-download.svg]: https://img.shields.io/npm/dm/grandma.svg\n[npm]: https://www.npmjs.com/package/grandma\n[npm-version.svg]: https://img.shields.io/npm/v/grandma.svg\n\n[daviddm.svg]: https://david-dm.org/catdad/grandma.svg\n[daviddm]: https://david-dm.org/catdad/grandma\n\n[appveyor.svg]: https://ci.appveyor.com/api/projects/status/github/catdad/grandma?branch=master\u0026svg=true\n[appveyor]: https://ci.appveyor.com/project/catdad/grandma\n\nThis is a load testing library and CLI tool. It is inspired by the good parts of [Vegeta](https://github.com/tsenart/vegeta) and [JMeter](http://jmeter.apache.org/), but hopefully leaves out the bad parts of both.\n\n* [Test Files](#test-files)\n* [Configuration](#grandmarc-file)\n* [CLI](#cli)\n* [API](#api)\n\n## Install\n\nYou can install `grandma` as a global CLI tool:\n\n```bash\nnpm install grandma\n```\n\n## [Test files][tests]\n\nHere is a quick example of a test file:\n\n```javascript\nmodule.exports = {\n    beforeAll: function(done) {\n        process.nextTick(done);\n    },\n    beforeEach: function(done) {\n        process.nextTick(done);\n    },\n    test: function(done) {\n        process.nextTick(done);\n    },\n    afterEach: function(done) {\n        process.nextTick(done);\n    },\n    afterAll: function(done) {\n        process.nextTick(done);\n    }\n};\n```\n\nAll functions other than `test` are optional, and you can exclude them if you do not need them. All functions are asynchronous, and you must call the `done` callback to continue. For more information about writing tests, see the [test files help topic][tests].\n\n## CLI\n\nTo see the most up-to-date CLI, type:\n\n```bash\ngrandma help\n```\n\nThe following commands are available.\n\n```bash\ngrandma run \u003ctestname\u003e --duration=\u003cduration\u003e --rate=\u003crate\u003e [options]\ngrandma report [glob=stdin] [options]\ngrandma list [options]\n```\n\nTo see help on these commands, you can type one of:\n\n```bash\ngrandma run --help\ngrandma report --help\n```\n\nThe following options are available as flags (some are only relevant for the `run` command):\n\n#### [`grandma list`][cli-list]\n\nLists all the tests in your test suite. You can use these names in `grandma run` to run the test. See more information about it in the [`grandma list` CLI page][cli-list].\n\n#### [`grandma run`][cli-run]\n\nRun a test named \"pineapples\" for 10 minutes at a rate of 500 tests per second:\n\n```bash\ngrandma run pineapples --duration 10m --rate 500 --out pineapples.log\n```\n\nRun a test named \"peaches\" for one and a half hours, running 100 concurrent tests:\n\n```bash\ngrandma run peaches --duration 1h30m --concurrent 100 --out peaches.log\n```\n\nTo find out more about the CLI, please see the [`grandma run` CLI page][cli-run].\n\n_Note: I will assume that you have configured the test directory in the [`.grandmarc`][rc] file, so it was not included it in these examples._\n\n#### [`grandma report`][cli-report]\n\nPrint a plain text report of the previously-described test run:\n\n```bash\ngrandma report pineapples.log\n```\n\nYou can also create an HTML page containing an interactive graph of the results:\n\n```bash\ngrandma report pineapples.log --type html --out pineapples.html\n```\n\nBy default, all reports will print to standard output, unless you specify a file in the `--out` flag.\n\nYou can find more information about the available reports and the data they provide in the [`grandma report` CLI page][cli-report].\n\n#### [`grandma diff`][cli-diff]\n\nCompares two or more test runs, calculating the difference in timing among them.\n\n```bash\ngrandma diff --logs one.log two.log three.log\n```\n\n## [`.grandmarc` file][rc]\n\nYou can set up an RC file to help with managing some of the setting, such as the directory of test files. Here is the content a sample file.\n\nTo find out more, see the [`.grandmarc` doc page][rc].\n\n## API\n\nGrandma exposes the `run` and `report` commands as an API.\n\n```javascript\nvar grandma = require('grandma');\n```\n\n#### [`grandma.run`][api-run]\n\nSee more information about using run in the [`grandma.run` API page][api-run].\n\n#### [`grandma.report`][api-report]\n\nSee more information about using report in the [`grandma.report` API page][api-report].\n\n[tests]: docs/test-files.md\n[rc]: docs/cli-grandmarc.md\n[cli-list]: docs/cli-grandma-list.md\n[cli-run]: docs/cli-grandma-run.md\n[cli-report]: docs/cli-grandma-report.md\n[cli-diff]: docs/cli-grandma-diff.md\n[api-run]: docs/api-grandma-run.md\n[api-report]: docs/api-grandma-report.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatdad%2Fgrandma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatdad%2Fgrandma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatdad%2Fgrandma/lists"}