There are two places where DevMate performs little bit of magic. This is very helpful and can save tedious repetition. As you work through the tutorials don’t be surprised if you suddenly see certain things pre-filled. This is our Recommendation Engine at work.

Don’t worry about how the screens shown below work and are configured. You’ll learn that as you work through the tutorials.

Overview

DevMate learns about your codebase you continue to use it. It learns from previous tests you have configured. Each time you add a new test, it tries to find similar examples to use as a basis for pre-filling fields.

Without Recommendation Engine support

The following screen shows a brand new test configured to test the method parsePositiveIntString(). This is what you’ll get if DevMate has no help to offer.

  1. The default Equivalence Classes for Inputs are all empty.

  2. There are No Test Cases Defined.

  3. There is a lightbulb icon for each method parameter (there’s only one in this example). This will bring up the input recommendations if pressed. We’ll show this further down.

WITH Recommendation Engine support

If you’ve been working with DevMate a bit, you might see that DevMate has used the Recommendation Engine to pre-fill what it can.

  1. The inputs are now pre-filled.

  2. Test cases are pre-generated.

  3. All we need to do is define outputs. We will soon be able to predict the outputs also. Currently, we have to complete the process

  4. The Generate Test Code button is disabled until the outputs are defined and associated with the test cases.

Manually checking Recommendations

In the first screenshot, we pointed to the lightbulb icon. This brings up a screen that shows you the the available recommendations along with confidence scores.

  1. On the left, you’ll see a list of suggestions with a Similarity score and the number of Equivalence Class partitions. Given the small size of our tutorial project, there’s only one.

  2. On the right, you’ll see the associated Equivalence Class partitions. In this case, there are ten suggestions based on Equivalence Class partitions we’ve done in the past.

You can select one of the partitions and DevMate can then insert these into the main dialog.

Argument Names

You can help DevMate better manage its weightings but being consistent about your variable names. If an argument is called User user in one method and and User currentUser in another, DevMate might still detect both, but will be less confident.