Generator Faker
GeneratorFaker
This is a Generator using Faker to create Data. The Faker function to be used is given as a parameter.
Kind: global class
generatorFaker.logger
The logger used for logging
Kind: instance property of GeneratorFaker
generatorFaker.unique
Defines if the generated value must be unique. Default is 'false'
Kind: instance property of GeneratorFaker
object
generatorFaker.generate(instanceId, testcase, todoGenerator) ⇒ Generates the value and saves it for the given instance.
Kind: instance method of GeneratorFaker
Returns: object
- data The genrated data. If the data could not be generated because of missing data
then the generator should return 'undefined'. So it could be called later. This may be the case if the generator
needs referenced data which is not generated yet.
Param | Type | Description |
---|---|---|
instanceId | string | The testcase instance id. for the same instance id the same data object will be returned. If this is undefined then always a new value will be created. |
testcase | object | The already generated testcase data object. |
todoGenerator | object | The generator todo |