Chance.js vs Mockaroo
Chance.js
chancejs.comMockaroo
mockaroo.comSide by side
| Figure | Chance.js | Mockaroo |
|---|---|---|
| Price from | Free | $5/mo |
| Free plan | Yes | Yes |
| Free trial | — | Yes |
| Open source | — | — |
| Web | Yes | Yes |
| API | Yes | Yes |
| Self-hosted | — | Yes |
| Plans published | 1 | 4 |
| Spec score · Test Data Generation Tools | 8.3 (#2) | 7.9 (#7) |
| Data types | Its generators cover items including text, people, locations, dates, finance, and web-related values. | The Mock APIs page says users can choose from more than 100 built-in data types, upload reference data, or build data types with the formula API. |
| Integrations | The documentation includes installation and usage instructions for Bower and RequireJS, as well as npm for Node.js. | The API documentation identifies an officially supported Node.js client and lists C# client libraries mockaroo.api and NMockaroo. |
| Intended users | The site gives generating random names and addresses for automated tests as an intended practical use. | Mockaroo describes its use for developers and testers who need realistic test data, and for front-end developers working before a back end is ready. |
| Purpose | Chance generates pseudo-random strings, numbers, and other values for automated tests and other uses that need random data. | Mockaroo generates realistic test data and can create mock back-end APIs for UI development. |
Plans
In their own words
Chance.js
Chance.js is a free, MIT-licensed JavaScript library for generating pseudorandom data used in automated tests and other applications needing sample values. Generators cover basic values, text, people, mobile identifiers, web data, locations, dates, finance, helpers, and miscellaneous categories. Developers can install it with npm for Node.js, load it in a browser, or use the separate chance-cli package from the command line. Browser users may create a global instance or instantiate several instances. Supplying a seed makes output repeatable; instances given the same seed can produce the same sequence. Integer generation accepts inclusive minimum and maximum bounds, and the unique() helper builds arrays without repeated generated items. The documented name generator supports English and Italian nationality options. The site lists chance.js at 95KB uncompressed and chance.min.js at 55KB, or 17KB gzipped. Chance is not intended for cryptographic applications requiring true randomness. The site credits Victor Quinn as its writer.
Mockaroo
Mockaroo is a web-based synthetic data generator for developers and testers who need realistic test records or a mock back end while building a user interface. It offers more than 100 built-in data types; users can also upload reference data or define types with the formula API. The Generate API produces JSON, CSV, tab-separated or custom-delimited text, SQL, and XML. Mock APIs can connect request parameters to schemas and return dynamic or static data, or simulate errors. Both APIs require an API key, sent as a query parameter or an X-API-Key header. Free includes 1,000 rows per file and 200 API requests per day. Silver is $60 a year and allows 100,000 rows per file and 1 million API records per day; Gold is $500 a year and allows 10 million rows per file and 10 million API records per day. Synchronous API responses are limited to 5,000 records on every plan; background generation requires a paid plan. Enterprise is $7,500 a year, with unlimited data and users and Docker deployment in a private cloud or datacenter.