DEV Community

loading...
Cover image for Test-gen: Quickly Generate test cases using interactive CLI

Test-gen: Quickly Generate test cases using interactive CLI

Rohit Bakoliya
Finding glitches in the my Code-Matrix πŸ˜‰
・Updated on ・1 min read

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 πŸ˜„

Discussion (0)

Forem Open with the Forem app