Skip to content

Instantly share code, notes, and snippets.

View MatthewPatience's full-sized avatar

Matthew Patience MatthewPatience

View GitHub Profile
# This script will parse a json response from randomuser.me and convert it to the xml
# format required to import into Salesforce Demandware
#
# It fetches 500 random users from Canada. Just modify the URL parameters to modify these conditions.
import json
import os, sys
import codecs
from datetime import datetime
from xml.etree.ElementTree import ElementTree, Element, SubElement, Comment, tostring

Set up Robolectric with Gradle

  1. Open your top level build.gradle file.

  2. Add Sonatype repo to buildscript repositories and Square Gradle Android Test Plugin to buildscript dependencies. (Older Gradle projects may automatically put this buildscript code in your project build.gradle, in which situation you should put the following in that file.)