Skip to content

Instantly share code, notes, and snippets.

@jeffryvu
jeffryvu / xamarin_uitest_ios_device.cs
Last active August 29, 2015 14:10
Shows how to run a Xamarin UITest on an iOS device
IApp app = ConfigureApp
.iOS
.EnableLocalScreenshots()
.InstalledApp("com.example.yourappbundleid")
.DeviceIp("192.168.1.1")
.StartApp();
@jeffryvu
jeffryvu / xamarin_uitest_ios_simulator.cs
Last active August 29, 2015 14:10
Shows how to run a Xamarin UITest on an iOS simulator
IApp app = ConfigureApp
.iOS
.EnableLocalScreenshots()
.DeviceIdentifier("E67C54DA-17B2-4EBC-AA08-FBF3FB571243") // iPhone 6, 8.1
.AppBundle(PathToIPA)
.StartApp();
@jeffryvu
jeffryvu / xamarin-build.sh
Created February 6, 2015 16:07
Bash script used by Jenkins to do a Xamarin.iOS build
# !/bin/sh
# By Anonymous user on Stack Overflow
# Freely translated from https://nicolasgoles.com/blog/2011/08/continuous-integration-with-jenkins/
function fail {
echo "$*" >&2
exit 1
}
function section_print {
@jeffryvu
jeffryvu / xamarin-testcloud-upload.sh
Last active August 29, 2015 14:15
Bash script to upload iOS app to Xamarin Test Cloud. Use together with xamarin-build.sh
function section_print {
echo "\n=== $* ==="
}
# Parameter passed from the upstream job that built the iOS app
cd "$UPSTREAM_WORKSPACE"
for file in "*.ipa"
do
IPA_FILE=`echo $file`
@jeffryvu
jeffryvu / jenkins-get-changelog.sh
Created February 12, 2015 20:14
Bash script to get the changelog from a certain jenkins build, format it in a nice way and write it to a properties file.
# Based on http://stackoverflow.com/questions/11823826/get-access-to-build-changelog-in-jenkins
# Get changelog and format it properly
CHANGELOG=$(curl "http://localhost:8080/job/MyProject/$UPSTREAM_BUILD_NUMBER/api/xml?wrapper=changes&xpath=//changeSet//comment" | sed -e "s/<\/comment>//g; s/<comment>/* /g; s/<\/*changes>//g" | sed '/^$/d;G')
# Write result to properties file
echo CHANGELOG=$CHANGELOG > build.properties