shell脚本自动测试+自动覆盖率统计+自动转PDF+自动发邮件


DATE=`date +%Y_%m_%d_%H_%M`


cd /Users/song/Desktop/project/moderoom 

xcodebuild test -project moderoom.xcodeproj -scheme moderoom -sdk iphonesimulator -destination name="iPhone 6s" -configuration Debug -enableCodeCoverage YES



 bundle exec slather coverage     --input-format profdata     --html     --ignore "../**/*/Xcode*"  --ignore "moderoom/Third-framework/*"  --ignore "moderoom/*.h"  --output-directory /Users/song/Desktop/testReport/slather-report-${DATE}     --scheme moderoom     moderoom.xcodeproj


cd /Users/song/Desktop/testReport/slather-report-${DATE}


 wkhtmltopdf index.html index.pdf



 curl -s --user 'api:key-a00d2b49fc2c2913efd6521103311e75'     https://api.mailgun.net/v3/mail.whatsmode.com/messages     -F from='[email protected]'  -F to='[email protected]'   -F subject='Code Coverage Report for'-${DATE}     -F text='Dear sirs:

附件是最新的代码覆盖率统计状况,请查阅,谢谢!' -F attachment=@/Users/song/Desktop/testReport/slather-report-${DATE}/Index.pdf



你可能感兴趣的:(shell脚本自动测试+自动覆盖率统计+自动转PDF+自动发邮件)