The Suggestions section is where you can interact with the test cases generated by the Ponicode AI. This section is populated when you open the interface for the first time and will be updated as you interact with it. In order to provide to you the best possible suggestions, Ponicode looks at:
- The tested function
- The function parameter(s)
- The calls on the function
- The written/accepted test cases
- Your custom type definitions
When suggestions are generated, you will notice that only the inputs columns are populated. You can either fill the expectations column by hand, or let Ponicode do it for you by running the test case using the
You will also notice that there are colored bands to the right of each suggestion. These colored stripes represent the nature of the inputs: the stripe is blue for a happy path, yellow for an edge case and purple for a manually modified value.
Finally, the percentage indicated next to each suggestion represents the coverage to be gained on the function if it is ever added to your test suite.
If you spot some test cases that seem relevant to you, you can easily add them to the Unit Tests section (which will add them to your test file) by using the
Plus button on the right hand side of each test case row.
All input and outputs values are editable cells. You can complete or overwrite them whenever you want. See the dedicated docs page for more information on what can be entered in a cell.
To remove a test case, simply click on the
Bin icon at the right side of the test case row.