To create the initial test model for the Equivalence Class Partitioning devmate parses your code. During parsing it will collect all required type information and adds it to the test model. To trigger this process just put the cursor somewhere in the header or body of the method you want to test and right-click to open the context menu. Select item “Test with demvate” at the bottom of the menu. Now devmate collects all needed information and asks you where to store the data (*.tmdl file)
By storing the model data in your project along with your source code devmate blends into your software development process. You can use any software configuration management tool (e.g. Git) to manage devmate‘s test models.
It is important that you put the test model file somewhere in one of your solution’s projects. We recommend to put it in the same folder as the unit test code that will be generated from the model.
After selecting a location devmate opens and presents the model. The first line shows the methods name and return type. The following lines contain the input factors (one per line). Since AverageSpeed is a non-static method the first input factor is the object that receives the method call. After that there is one input factor per formal parameter. In our example these are duration and track. Under each input factor you find two lines with the text valid in invalid. Those are predefined equivalence classes.
If predictions are available for your parsed code (see chapter Equivalence Class Prediction), the best predictions for your input factors are automatically used. In the case that a prediction is available for all input factors, test cases are also combined. You then only need to enter the expected values, exceptions and side effects for the test cases and the test code can be generated.