GithubHelp home page GithubHelp logo

mockobo's Introduction

mockobo

Make mock submissions to a deployed KoBo form

NOT WORKING FOR GROUPED QUESTIONS YET OR MEDIA-TYPE QUESTIONS

  1. Setup
git clone https://github.com/joshuaberetta/mockobo
cd mockobo

python3 -m venv e
. e/bin/activate
pip3 install -r requirements.txt

chmod +x mockobo.py
  1. Create config file in the root

kobo.json

{
  "token": "YOUR_TOKEN",
  "kf_url": "https://kf.kobotoolbox.org",
  "kc_url": "https://kc.kobotoolbox.org"
}
  1. Create submissions
./mockobo.py --asset-uid aLmmfWSAUNamKwiSTcVSix --count 42

Or

./mockobo.py -a aLmmfWSAUNamKwiSTcVSix -c 42
  1. Use attachments

Add a video or audio file to your project, and run mockobo with --media-file option
The format is type:/path/to/the/file

./mockobo.py -a aLmmfWSAUNamKwiSTcVSix -c 42 --media-file image:/path/to/mypicture.jpg
./mockobo.py -a aLmmfWSAUNamKwiSTcVSix -c 42 --media-file video:/path/to/myvideo.mp4
  1. Use concurrency

By default, mockobo only uses 2 threads. Increasing the value for dev environments is almost useless since the Django dev server does not seem to handle it. On production, the gain is noticeable, especially when you want to create a large set of data.

BE AWARE to not flood the server.

./mockobo.py -a aLmmfWSAUNamKwiSTcVSix -c 42 -w 10

mockobo's People

Contributors

joshuaberetta avatar noliveleger avatar tinok avatar

Stargazers

Leszek Pietrzak avatar

Watchers

 avatar

Forkers

tinok

mockobo's Issues

Submissions can't be edited

Something in the assembled XML must be broken as attempts to edit mocked submissions with Enketo is met with a 400 response upon submit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.