Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Data #20

Open
vaclavHala opened this issue May 22, 2016 · 0 comments
Open

Test Data #20

vaclavHala opened this issue May 22, 2016 · 0 comments

Comments

@vaclavHala
Copy link
Owner

vaclavHala commented May 22, 2016

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()}}"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant