Defaults

DevMate uses default names for scenarios and test cases. When you run a simple test, this is what you might see.

And this is the DevMate configuration for that test.

  1. Scenario name.

  2. Scenario description.

  3. Test case names.

  4. Method label.

Prettify everything

Changing the default labelling is not required but it can add clarity to your test output and the documentation in your auto-generated test code - the two places where labels are output.

Let’s change some labels.

  1. We’ve renamed the Scenario, which can make navigation much easier if we have multiple scenarios in this one test.

  2. We’ve added a scenario description. This doesn’t show up in the test runner but it does in the test code, helping document it.

  3. We’ve renamed the test case, which will be used to name the test function.

  4. We’ve renamed just this one Bad '0' test case description. Again, this is only for test code documentation purposes.

  5. We’ve changed the default from M1:value: boundaries to Bad boundary '0'. You can be as precise as you like. For example, Boundary : parsePositiveInString('0') might be more precise. It's up to you.

Re-run the test

Test output

Test code documentation

Not all of the prettification is shown in the test output. The other labels we changed end up as comments in the generated test code, making your code much easier to read and maintain in the future.

  1. The scenario description that we modified.

  2. Method names.

  3. An other places where labels help make the code clearer.