smartcat-labs / ranger

Ranger is contextual data generator used to make sensible data for integration tests or to play with it in the database
https://www.smartcat.io/products/ranger-contextual-data-and-load-generator
Apache License 2.0
59 stars 11 forks source link

Support creation of large string messages #171

Open vajda opened 7 years ago

vajda commented 7 years ago

Sometimes, there is a need to create message of 1MB or 10MB in size. Currently, one can do that using java API by reading text from custom file, or by incorporating huge string in YAML configuration. Usually, content of such string is not important, just it's size. It would be better to have option to specify it somehow:

values:
  largeMessage: fixedContentString(1000000)
  alternativeMessage1: fixedContentString(1MB)
  alternativeMessage2: fixedContentString(10MB)

Those values would be calculated only once and used each time in comparison with randomContentString where values are calculated in every iteration. Another option would be to specify it by referencing file with content, maybe something similar as in #152 could be done.