最近一直再研究 jenkins 的自动化集成测试,设计思路:
好了,接下来看看具体是怎么操作的吧!
# Filename: CopyPictures.py
# coding=utf8
import os
import time,shutil
from os import listdir
from os.path import isdir
HOST = '192.168.1.82'
PORT = 8080
source_dir = 'X:\\'
target_dir = 'E:\\DONG\\appium-testng\\apps'
now = time.strftime('%Y%m%d')
k=0
filelist = listdir(source_dir) #获取源目录下所有的文件
print(filelist)
for name in filelist :
srcFilename = source_dir + '\\' + name
srcFilename = '"' + srcFilename + '"'
desFilename = target_dir + '\\' + name
desFilename = '"' + desFilename + '"'
print
copy_command = "copy %s %s" % (srcFilename, desFilename)
print copy_command
if os.system(copy_command) == 0:
k = k + 1
print 'Successful backup to copy from', srcFilename, 'to' ,desFilename
else:
print 'Fail to copy', srcFilename, 'to', desFilename
print 'total copy', k, 'files'
@echo off
@start appium -a 127.0.0.1 -p4723 -U32308bd2a27c7fb3
ping /n 3 127.1 >nul
set LIB=C:\automation
set CLASSPATH=%LIB%\auto.jar;%LIB%\qshc.jar
java org.testng.TestNG %LIB%\testng.xml
抛出一问题:jenkins 邮件触发功能,我目前只能用系统自带的邮件功能,而扩展邮件的插件配置后总是没起作用,尤其是 developer 角色的邮件发送,请指导的人告知下,我先截个我配置的图给大伙看看