Generate specifications about mock objects automatically.

  1. In the Test Information tab, click the mock object that you created.
  2. In the Test Info Edit area on the right, Click [Generate Sepcification Wizard…] button.
    • If specification about the mock object is empty, [Generation mock specification] wizard automatically appears when you click the mock object.
  1. In [Generation mock specification] wizard, select the target function to specify and click [OK] button.
  2. Edit parameters, return values, and repetitions.
    • Click [Edit parameters] button to create a specification of the parameters used by the function.
      • Selecting [any value] does not restrict the value of that parameter.
      • You can restrict parameter values through [< User input… >]. For example, when you type 1 in the input value and run tests, the test fails if the parameter is not 1.
    • Click [Edit return value] button to determine the return value of the function.
      • Select [Add] button to add the value to return when the function is called.
      • Select [Remove] button to remove the last added return value.
      • If you specify one return value, it will be returned repeatedly.
      • When multiple return values are specify, the function returns them in order when called. In this case, the test fails if the function is not called by the corresponding number of return values.
    • Click [Edit repetitions] button to create a specification of the number of calls to that function.
      • If you select [No number of repetitions specified], you do not restrict the number of calls.
      • Use [< User input… >] to limit the number of function calls. For example, if you set the number of function calls to 3 and run a test, the test fails if the function is not called 3 times.
      • [No function call] is the same as specifying a zero number of calls. In this case, the test fails when the function is called.
  1. Click [OK] button to generate a specification.

Generate specifications about the mock object yourself

You can modify the specifications created by [Generate Sepcification Wizard…] on Controller Tester or create various specifications yourself. See this document for more information.

Need more help with this?
Don’t hesitate to contact us here.

Thanks for your feedback.