abouttutorialspricingterms
Login

  • Quick start
  • Modelling and data generation (part 1)
  • Modelling and data generation (part 2)
  • Integration with Java
  • Integration with C++
  • Integration with C#
  • Integration with Python
  • Integration with Node.js
  • Examples

Documentation

  • JUnit runner
  • Export templates

Modelling and data generation, part 1

Contents

Prerequisites and syntax
Model editor
Classes and methods
Parameters and choices
Hierarchical choices
Randomized choices
User types
Constraints
Data generation
Data export

User types

So far we used parameter types that correspond to Java built in types (int, String, boolean, etc.). EcFeed allows users to define their own types. These types represent Java enums. The use of the user types looks similar to enums, but there are some significant differences, for example, when the user types are used for output parameters (see Expected parameters). Let's add a parameter that will define a type of a document of which the serial number was provided. We will call it documentType. Now, in the Type column in the parameters viewer on the method details page, instead selecting a type from a combo box, we will enter our own type that is com.example.test.DocumentType. We can add choices for that parameter as for any other parameter, with couple of exceptions:

⁣1) The value of the choice must comply to the enum value in Java. By convention, the value is capitalized with underscores for spaces, for example DRIVERS_LICENSE.
⁣2) Value of a user type parameter cannot be randomized.

Let's add following choices for documentType parameter:
  • passport (PASSPORT)
  • drivers license (DRIVERS_LICENSE)
  • personal id (PERSONAL_ID)

Let's also create an another parameter called gender with type com.example.test.Gender with two choices:
  • male (MALE)
  • female (FEMALE)

With drag&drop you can place them higher between customer's name and age.