Skip to content

Test Data #20

@vaclavHala

Description

@vaclavHala

Generate All The Things

For generating test data, we can use the tool JSON-Generator.
Just pass below snippets in and it will generate all the test data you could ever need. For use from within tests or just as a standalone tool see DataGen in test sources dir.

  • User
{    
  "login" : "{{lorem(1, 'words')}}",
  "password" : "{{lorem(1, 'words')}}",
  "email": "{{firstName()}}@{{surname()}}.{{random('cz','sk','com','org')}}"
}
  • Issue
{ 
  "subject" : function (tags, parent) {return tags.lorem(1).substring(0,40);},
  "description" : "{{lorem(2)}}",
  "priority" : "{{random('MUST_HAVE', 'SHOULD_HAVE', 'CAN_HAVE', 'WANT_TO_HAVE')}}",
  "category" : "{{random('ADD','REMOVE','REPAIR','COMPLAINT')}}",
  "coords" : {
    "lon" : "{{floating(-10,-5)}}",
    "lat" : "{{floating()}}"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions