How to get your first 50 users with RxPeople

… a reactive android Library for generating random user data :)

When developing an application, you would be wise to test it. You might test it for correctness and you might test it for load. Both of these situations benefit from having a large body of data that is coherent, but one that would be automatically generated. RxPeople is an attempt at making this problem smaller.

Why is test data important?

If you’re developing an application, you’ll want to make sure you’re testing it under conditions that closely simulate a production environment. If you’re hand-entering data into a test environment one record at a time, you’re never going to build up the volume and variety of data that your app will accumulate in a few days in production. Worse, the data you enter will be biased towards your own usage patterns and won’t match real-world usage, leaving important bugs undiscovered.

Why does realistic data matter?

When your test data is composed by realistic looking data, you’ll be more engaged as a tester. When you demonstrate new features to others, they’ll understand them faster. Real data is varied and will contain characters that may not play nice with your code, such as apostrophes, or unicode characters from other languages. Testing with realistic data will make your app more robust because you’ll catch errors that are likely to occur in production before release day.


Getting 100 random people from random countries:

Being specific: Getting 50 women from Brazil:

Useful info

  • It’s really important to set both .subscribeOn() and .observeOn() it’s the only way to guarantee the thread which the request is gonna run at (if you don’t know why I’m asking this read my blog post Party tricks with Rxjava);
  • Want to convert my FakeUser class into your own UserClass? use a flatMap to transform it before subscribing to the Observer, easypeasy;
  • An example.json of a complete FakeUser can be found here;
  • Don’t forget to check the Sample project.


Add the dependency in the form:

Thanks to

Hit me up on @cesarmcferreira if you have any questions☺

Senior Android Developer, currently working as a Tech Lead @GlueHome. More on me @

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store