使用Monkey Talk自动化工具发送电子邮件 [英] send an email using monkey talk automation tool

查看:107
本文介绍了使用Monkey Talk自动化工具发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过自动通话工具发送html电子邮件报告.如果可能,请提供任何代码或网址.

Is it possible to send an html email report through a monkey talk automation tool. If it is possible please provide any code or url.

谢谢, 罗摩克里希纳.

Thanks, Ramakrishna.

推荐答案

对Monkeytalk使用CI(连续集成工具).

Use a CI (continuous Integration tool) with monkeytalk.

像jenkins + monkeytalk一样,配置它有点困难.但这是可以完成的.使用jenkins自动化从存储库中签出代码的过程,并编写一个shell脚本来构建项目并使用Monkeytalk运行测试用例.完成测试后,jenkins会将报告通过电子邮件发送给给定的收件人.

like jenkins+monkeytalk it is bit hard to configure it. but it can be done. use jenkins to automate the process of checkout code from repository and write a shell script to build the project and runtest cases with monkeytalk. after finish tests jenkins will email the reports to the given recipients.

詹金斯: http://jenkins-ci.org/

更多详细信息...

首先,您需要下载和部署Jenkins.下载链接

first of all you need to download and deploy Jenkins. Downloadlink

要在终端中部署

$ java -jar jenkins.war

打开浏览器http://localhost:8080将带您进入Jenkins仪表板.

open a browser http://localhost:8080 will take you to Jenkins dash board.

左侧菜单上有Jenkins设置的链接:在该页面上,您可以设置Jenkins的电子邮件帐户和密码.然后提供收件人的电子邮件地址.因此,如果构建失败,Jenkins会将所有控制台错误通过电子邮件发送给配方师. (如果难以安装,请尝试阅读Jenkins文档)

There is link for Jenkins settings on left side menu: from that page you can set an email account , password for Jenkins. and then provide recipient email addresses. so if a build faild Jenkins will email all console errors to the recipents. (try reading Jenkins documentation if it hard to install)

然后创建一个提供名称和详细信息的新作业.添加您的存储库URL,然后输入添加用户凭据.并在页面末尾配置其余部分,您可以将构建命令指定为Shell脚本或ant文件,或者有很多选项. 然后保存作业并编辑配置,如果它没有从repo签出您的代码,则开始构建,并正确地从错误控制台复制错误并在google中搜索.

Then create a new job giving a name and details . add your repository URL and type add user credientials to it. and configure the rest in the end of the page you can give a build command as a shell script or ant file or there are many options. then save the job and edit configurations start a build if it not checkout your code from repo and build correctly copy the errors from error console and search in google.

这是用于在模拟器中构建Xcode项目的示例代码

here is a sample code for build a Xcode project to a simulator

 echo "Build Start"

/usr/bin/xcodebuild -target FuncTest CODE_SIGN_IDENTITY="iPhone Distribution: Leapset Inc." PROVISIONING_PROFILE="xxxxxxxx-1216-4E86-97D5-xxxxxxxxxxxx" OTHER_LDFLAGS="-lxml2 -all_load -lstdc++" DSTROOT="build" VALID_ARCHS="armv7 armv7s i386" -arch i386 -sdk iphonesimulator6.0 -configuration Release clean build install;

echo "Build End"

如果您需要使用该应用打开iPhone模拟器

if you need to open iPhone simulator with the app use

# open app in simulator
echo "Start run app in simulator"

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication release-1.081/Leapset/build/Release-iphonesimulator/LeapsetFuncTest.app/FuncTest & disown;

echo "DONE run app in simulator"

运行测试

echo "start run Test jobs"

######### Job 1 #########
echo
echo "TEST: SignInOut.mts"
echo "DISCRIPTION: sign in and out with user credintials"

#java -jar $$ROOTPATH/monkeytalk/LeapsetTest/libs/monkeytalk-runner-1.0.43.jar -agent IOS $ROOTPATH/monkeytalk/LeapsetTest/signinUser.mt
java -jar monkeytalk/LeapsetTest/libs/monkeytalk-runner-1.0.43.jar -agent IOS monkeytalk/LeapsetTest/SignInOut.mts

和猴子谈话将生成报告.您唯一需要找到的就是将这些html报告附加到Jenkins的某种方法.Jenkins有很多可用的插件.

and monkey talk will generate reports. only thing you need to find is some way to attach those html reports to the Jenkins There are so many plugging available for Jenkins.

上面的座便器工作正常,但是您需要提供正确的路径才能使用它.就像上面的构建命令一样 注意:此命令应在项目根目录(Xcode项目文件所在的位置)内的终端中运行

above commodes are working fine but you need to give the corrects paths to work it. like for above build command Note: this command should run in terminal inside the project root directory(where the Xcode project file is)

祝你好运 :)

xocdebuild命令帮助

xocdebuild command help

xcodebuild 
[-project <projectname>] 
[[-target <targetname>]...|-alltargets] 
[-configuration <configurationname>] 
[-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] 
[-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...

xcodebuild 
[-project <projectname>] -scheme <schemeName> 
[-configuration <configurationname>] 
[-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] 
[-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...


xcodebuild 
-workspace <workspacename> -scheme <schemeName> 
[-configuration <configurationname>] 
[-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] 
[-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...

xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [<infoitem>] ]

xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]]

xcodebuild -showsdks

这篇关于使用Monkey Talk自动化工具发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆