History Section

Running your application is a good way to trigger your function in a way that you want to test. When you run your application, Ponicode can catch the function calls and the transiting values to generate test cases. The History section is where you can find them.

How does it work?

To use this functionallity you need to install the Ponicode npm package.

npm install -g ponicode

You can then run your application using the ponicode package.

ponicode node APPLICATION

You are good to go! Now, you can interact with your application and whenever you trigger the function you are currently creating tests for, Ponicode will catch the values running through it and populate the History section by creating a new test case row for each function call.

Adding test cases to the Unit Tests section/your test file

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.

Removing test cases

To remove a test case, simply click on the "Bin" icon at the right side of the test case row.

Running test cases

You might want to run your test cases to see wether they pass ("checked icon") or fail ("red cross icon"). There are two ways to do this:

  1. Run your test cases individually by using the  button on the right hand side of the test case row.
  2. Use watch mode

Ready to write beautiful code?

Smart and simple docstring generation. Now available in your favorite code hosting platform.

Try it now