Skip to content

Instantly share code, notes, and snippets.

View xdtianyu's full-sized avatar
🏠
Working from home

tianyu xdtianyu

🏠
Working from home
View GitHub Profile
location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
root /var/www/;
try_files /autodiscover/autodiscover.php =404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_param SERVER_ADDR "";
fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
@xdtianyu
xdtianyu / build.gradle
Created December 11, 2019 02:13
android framework jar
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xbootclasspath/p:${rootDir}/app/libs/ext/framework.jar"
}
}
}

Android 开发人员自动化测试

[TOC]

​ 编写测试的目的是为了验证程序是否正确执行、行为无误及是否稳定可用。同时,拥有充分测试代码的项目易于维护,便于交接、团队协作。

NOTE: These are updated to Android 5.0.1
@xdtianyu
xdtianyu / railgun-arch-install.zsh
Created May 5, 2019 03:07 — forked from typcn/railgun-arch-install.zsh
Install cloudflare railgun on ArchLinux
#!/usr/bin/zsh
mkdir rg-install
cd rg-install
wget http://pkg.cloudflare.com/dists/xenial/railgun/binary-amd64/Packages.gz
gunzip Packages.gz
wget "http://pkg.cloudflare.com/${$(cat Packages | grep Filename:)//Filename: }"
ar -x *.deb
tar xvf data.tar.xz
rm -rf /usr/local/railgun
mkdir -p /usr/local/railgun
@xdtianyu
xdtianyu / xxx.php
Last active December 31, 2018 11:45
<?php
if (rand()%5==0) {
echo "1111";
} else {
echo "0000";
}
?>
@xdtianyu
xdtianyu / build.gradle
Created September 25, 2018 09:14
coverage,checkstyle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.61'
repositories {
google()
jcenter()
}
dependencies {
@xdtianyu
xdtianyu / jacoco.gradle
Created August 21, 2018 07:45 — forked from bhargavms/jacoco.gradle
A gradle plugin for checking test coverage using jacoco.
apply plugin: 'jacoco'
jacoco {
toolVersion "0.7.1.201405082137"
reportsDir = file("$buildDir/intermediates/test")
}
// Taken from https://blog.gouline.net/2015/06/23/code-coverage-on-android-with-jacoco/
project.afterEvaluate {
// Grab all build types and product flavors
def buildTypes = android.buildTypes.collect { type -> type.name }
@xdtianyu
xdtianyu / .gitlab-ci.yml
Created August 16, 2018 02:19 — forked from danielgomezrico/.gitlab-ci.yml
Android / Gitlab ci - sample setup files to setup your own local gitlab runner with real physical android devices. Check https://github.com/caipivara/awesome-android-scripts
stages:
- build
- test
- deploy
variables:
GIT_STRATEGY: clone
cache:
key: ${CI_PROJECT_ID}
100% — FF
99% — FC
98% — FA
97% — F7
96% — F5
95% — F2
94% — F0
93% — ED
92% — EB
91% — E8