Ponicode CLI: coverage catch up - Product Release
The Ponicode team is celebrating the release its new solution: Ponicode CLI
It’s been a year since the release of Ponicode Unit Test - a year of improvements, a year of feedback collection, a year of community growth. Today we are celebrating this milestone with pride with the release of our second developer tool, which will help us accelerate developers even more in their code quality journey.
Most of this year interaction between the Ponicode team and our VS Code extension users showed us the pain points developers experience when it comes to code quality:
- Unit testing remains a very tedious task
- It’s hard to systematically come up with every relevant scenario for an exhaustive test
- It’s time consuming to type out all the inputs necessary for a good unit test
- It’s not always obvious when and what it is important to mock
- Not everyone is comfortable with unit tests syntax, especially when it comes to mocking
- When it comes to testing, the white page syndrome is a real enemy
Unfortunately, a lack of unit tests is a catalyst for technical debt, number of bugs in production, number of regressions observed and - as a consequence - developers’ stress levels.
With the release of our VS Code extension last year, we provided an interface that allows developers to focus on building robustness, high coverage and exhaustive testing. This one-test-at-a-time approach enables them to review each and every different test scenario for a given function one by one, while still obtaining a complete unit test suite in a fraction of the time it would take to do so manually. It was all about removing tediousness and increasing quality at the same time. It also provided a tool for more junior developers to learn about unit tests.
But we also realised that when it comes to unit tests we often talk about volumes.
Each developer can write hundreds of thousands of new functions every year, and the repetitiveness of testing gets in the way of velocity and creativity. It is unfortunately very common to find existing projects that have zero to none unit tests - usually because they were not considered a priority at the time of writing the code, or there simply wasn't enough time.
Equally often, teams are then forced to write a large number of tests at once in order to achieve some coverage goal, putting on hold most work on new features.
This can be extremely frustrating for developers and teams, as well as for managers who see the time to market for new features increase for the sake of code quality.
With Ponicode CLI, we leveraged the power of AI and our learnings from the VS Code extension to address the issue of producing unit tests at scale and help every developer to bootstrap their unit test production.
A command line tool that allows you to generate unit tests on entire files, directories or projects in just one command.
Ponicode CLI makes unit tests production quick and easy.
- One-step authentication with Github
- Automatic generation of 5 test scenario for every supported function
- Highly relevant test scenarios based on their impact on code coverage and code robustness
- Edge cases and happy paths diversity
On average Ponicode CLI takes less than 5 seconds to generate a test suite with 5 scenarios. This is a game changer for unit testing. Edmond Aouad, CPO @ Ponicode.
Is Ponicode CLI made for you?
Our alpha testers have shared with us the scope of use cases where they see Ponicode CLI bringing the highest value. Discover our user stories or create your own unit test journey with Ponicode CLI
Quality catch up
- New clients or new management often come with specific code coverage standards that existing code might not match. Those new standards can sometimes demand the quality upgrade of entire codebases. However, creating a high volume of unit tests all at once involves refocusing resources that would otherwise be spent on developing new features, with a significant negative effect on time to market
Ponicode CLI finally makes it possible to achieve unit test coverage compliance with a fraction of the resources.
Legacy at scale.
- Some software is already 5, 10 or even 20 years old, and as new features pile up over time and as teams change we observe that the codebase ends up with inconsistent standards of unit tests and eroding code quality. This state of things makes the manipulation of legacy code manipulation unstable and uncomfortable for new developers. Unfortunately, more often than not, no resources are allocated to fix this situation.
Regaining confidence over the handling of legacy code is possible thanks to bulk generation of unit tests at scale. Non-regression tests across the codebase enable stakeholders to make changes safely in the knowledge that they are not breaking existing functionalities. A fully unit tested codebase brings control to software engineers and works as guardrails to their development environment.
- Companies migrating to the cloud are often, if not always, facing under-documented and under-tested code to migrate. Unfortunately, fixing the codebase after such migration is very resource consuming, and teams have no visibility ahead of the curve. This makes migration a stressful project. The volume of regressions and the difficulty to resorb them makes replatforming projects hard to complete within time and budget constraints.
In a shift-left migration approach, Ponicode helps to raise unit test coverage instantly. Teams can use Ponicode CLI to perform a snapshot of the behavior of an application pre-migration and post-migration in order to identify and fix regressions fast.
Merge & Acquisition
- A growing number of firms are investing vast amounts of time and resources into raising the code quality of their latest acquisitions to their required level of compliance. This task can take years to complete and means taking highly skilled staff away from innovation and product development.
Ponicode CLI enables teams to instantaneously raise the quality of their newly acquired code to the required standards, thus accelerating the capacity to absorb new technology and quickly refocusing resources on innovation.
How does it work?
What Ponicode CLI does for you:
Generating test structure:
- Writing the imports
- Writing a test suite per function
- Writing the body of each test suite and test case
Generating relevant inputs and instantiation:
- Instantiate a class instance where necessary to test a method
- Provide input values for the tested function expected by the developers (happy paths)
- Provide relevant edge case scenarios to test the limit behavior of the function
- Suggest primitive values, all native types, objects with high level of nesting, callbacks, nested instances
Ponicode CLI produces what is commonly called smoke tests. Those tests are meant to verify that when you execute your function with the given inputs your code runs smoothly and without errors. With this approach developers are reducing the possibility of an error in the app they are creating. This shift-left friendly approach to testing helps to prevent bugs at scale by automatically generating a high number of scenarios for every unit of your code.
A bootstrapping tool taking you from 0 to a 100 in a minute. Use Ponicode CLI to start building the perfect tests.
We are excited to see the unexpected ways of how Ponicode CLI is going to be used by our community. This brings a new tool to our platform and a step forward in the support of all software engineers in their coding journey. Share your feedback on our channels and reach out to our team for all your questions.
NPM Package https://www.npmjs.com/package/ponicode
Official Page https://www.ponicode.com/cli
Product Hunt Page https://www.producthunt.com/posts/ponicode-cli-unit-test-catch-up