Ponicode CLI on an open source project - Meteor
Are you confused between Ponicode and CircleCI? It’s not you, it’s us. Ponicode was acquired by CircleCI as of March 2022. The content and material published prior to this date remains under Ponicode’s name. When in doubt: Ponicode = CircleCI.
Hello guys, today we wanted to demonstrate the power of Ponicode CLI on a big open source project. Check out our video if you are convinced give it a try on your own project.
Ponicode CLI is free and available for all developers starting now.
Meteor Project: https://github.com/meteor/meteor
Demo on meteor
First clone meteor :
bashgit clone https://github.com/meteor/meteor
Then you can test it 🙌 :
bashcd meteor/packagesponicode test ./
Wait a few minutes and see thousands of tests generated!
Hi this is Alex from the Ponicode team and today I wanted to make a short video about Ponicode CLI. If you are new to us, Ponicode CLI is the perfect tool if your project lacks unit tests; you haven’t had time or you just have been given the responsibility of untested legacy code. You have low code coverage and you need to raise it fast. This is the perfect and only tool to bring it to the right level, investing little of your time.
Today I’m gonna run Ponicode CLI on a public repo. I think this is the opportunity to show the power of Ponicode CLI and our AI on a big project, how simple and efficient it is.
You will see the very few steps so you can take over and use it for your own project.
I will take as an example Meteor which is one of my favorite projects to show you how efficient Ponicode CLI is when it gets to big projects.
The repo is cloned, I’m going to run Ponicode CLI. I’m going in the package folder of meteor because this is where I want to generate the unit tests for all my files.
You will see Ponicode CLI run through each file and each function.You can see it process the file at pace. Each time you see “write files” it means that a new test suite has been written.
As we can see a new file has been created and I can see the test suites being added as I speak. You will see 5 or 6 test scenarios for each function.The test cases include happy paths to increase code coverage and edge cases and avoid bugs in production.
For the meteor project it will only take a few minutes. We can skip directly to review the result generated by Ponicode CLI. We have hundreds of test cases for 653 functions. All of it has been generated by writing only just one line in your terminal.
The test files follow the Jest syntax, this means that it can be reused in any ci cd pipeline.
This is going to help with code robustness. I am not going through all the benefits of unit testing, if you are curious about the resources available on our youtube channel and on our website. So far CLI generates not to throw assertions which guarantee that the code does not crash. You can use the VS code extension to make custom assertions that protect your code from regressions.
We will handle assertions within Ponicode CLI in the future. It’s on our roadmap. For now we are a bootstrapping tool for unit tests. Ponicode CLI writes the skeleton of your test suite, the body of the tests and it provides an exhaustive range of inputs. And it does it for hundreds of functions in the blink of an eye. It will help save you a lot of time and boost your project quality. The keywords for this solution are code quality, coverage and robustness is in the palm of your hand now.
If you want to give it a try I will put all the info below so you can do it yourself and see for yourself the power of Ponicode CLI. Thank you for watching this. You can subscribe to the channel to see other content, you can see some more complex function unit tests with our VS code extension. If you have any questions you can reach out on our Ponicode Slack. See you there or in the next video. Cheers