DEV Community

Cover image for Test-gen: Quickly Generate test cases using interactive CLI
Rohit Bakoliya
Rohit Bakoliya

Posted on • Edited on

Test-gen: Quickly Generate test cases using interactive CLI

Hi ๐Ÿ‘‹, Competitive Fans!

Sometimes generating test-cases in between the contests to finding bugs is a bit tedious when it comes to generating tests for complex pattern strings, trees, or graphs.

Here I come with a solution, A minimal interactive-CLI that can generate test-cases of almost all input types. It also allows us to leverage the Regular Expression's power to generate complex test-cases and make CLI simpler.

demo

Node.js and NPM are needed to install this CLI.

Install

$ npm i -g @rohitbakoliya/test-gen

# or without installing it globally
$ npx @rohitbakoliya/test-gen
Enter fullscreen mode Exit fullscreen mode

Usage

$ test-gen
Enter fullscreen mode Exit fullscreen mode

Built With

What's Next?

The initial release doesn't support command-line arguments and custom seed value, no need though but some of may prefer to use, so I'll probably work on these.

In case you are curious, here's the source code ๐Ÿ‘‡

GitHub logo rohitbakoliya / test-gen

๐Ÿงช Test Generator CLI | Quickly generate test cases for stress testing

If you found any bug, feel free to open up an issue.

Thank you for reading!
I'd love to hear your thoughts on the project.
Have a nice day ๐Ÿ˜„

Top comments (0)