Generating test data automatically


I have really long forms developed and I would like to test out the data and how it exports out etc. Is there a way to automatically generate say 100 observations of test data from a CommCare form and export out as a CSV?


Hi Soha,

There are a couple of ways to generate test form data.

The two easiest, depending on your scale, would be

  1. Use the Web Apps layer to more quickly be able to enter and submit data from your app. You can hand enter, or use available browser macro programs to automate entry
  2. Export a template form and use the form submission api, to automate submission from a script or program. Each form would need to submit a unique formID to not be tagged as a duplicate on the server.

Hi Clayton,

Thank you for your response. So, I’ve tried option 1 but given that my forms are extremely long, the process still takes some time to hand-enter. I’m not sure how to use macro programs to automate entry. I’ll try to look into that, but if you have any suggestions on how to do that, I would appreciate your support.


Hi Soha,

Unfortunately I don’t have a lot of recent experience.

Another option I forgot to mention that may help out is that you can copy either the form or app to make a duplicate definition, then in that duplicate definition add Default Values to the questions which would allow you to submit the form immediately after opening it.

Within your project space, data is shared between apps as long as the user logging into each app has access to it, so you can accomplish this without needing to make those Default Value changes directly to the ‘live’ version of your application.


Thank you Clayton. I will try what you’ve suggested and let you know if I encounter any issues.