代码拉取完成,页面将自动刷新
同步操作将从 hellotester/PageObjectModelSelenium 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<project basedir="." default="all" name="automation test">
<tstamp>
<format property="time" pattern="yyyyMMddhhmm" />
</tstamp>
<!-- 项目所在的目录 -->
<property name="base.dir" value="D:/Users/liuchao448/git/PageObjectModelSelenium"/>
<!-- jar包路径-->
<property name="lib.dir" value="${base.dir}/lib"/>
<!-- testng的路径-->
<property name="suite.file" value="${base.dir}/testSuits"/>
<!-- 文件格式-->
<property name="testng.file" value="*.xml"/>
<!-- 生成的报告的前缀 -->
<property name="ReportName" value="TestReport" />
<!-- 生成报告的路径 -->
<property name="testng.output.dir" value="${base.dir}/report/${ReportName}${time}"/>
<!-- 接收测试报告的邮箱 -->
<property name="mail_from" value="lcmanburensheng@126.com"/>
<property name="mail_password" value="XXXXX"/>
<property name="mail_to" value="lcmanburensheng@126.com" />
<!-- 电脑地址 -->
<property name="ComputerName" value="jkqsh-l0285"/>
<taskdef resource="testngtasks" classpath="${lib.dir}/testng.jar"/>
<target name="clean">
<delete dir="${base.dir}/bin"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="${base.dir}/bin"/>
<javac srcdir="${base.dir}/src" destdir="${base.dir}/bin" classpathref="classes" includeantruntime="off" debug="on" debuglevel="lines,vars,source">
<!-- 编译时为了和项目的编码保持一致 -->
<compilerarg line="-encoding GBK "/>
</javac>
<!-- 将配置文件复制到编辑目录 -->
<copy todir="${base.dir}/bin">
<fileset dir="${base.dir}/src">
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</fileset>
</copy>
</target>
<path id="classes">
<fileset dir="${lib.dir}" includes="*jar"/>
<fileset dir="${lib.dir}" includes="*zip"/>
<pathelement location="${base.dir}/bin"/>
</path>
<!-- 运行testng文件 -->
<target name="regression" depends="compile">
<!-- testng属性设置,自定义的测试报告 ,用到了第三方的jar包(guice-3.0.jar,reportng.jar,velocity-dep.jar -->
<testng classpathref="classes"
useDefaultListeners="false"
listeners="org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter"
outputdir="${testng.output.dir}"
failureproperty="test.failed"
delegateCommandSystemProperties="true">
<!-- 设置测试报告标题 -->
<sysproperty key="org.uncommons.reportng.title" value="自动化测试报告" />
<xmlfileset dir="${suite.file}" includes="${testng.file}" />
</testng>
</target>
<!-- 发送邮件 -->
<target name="sendmail" description="发送邮件">
<mail mailhost="smtp.126.com" user="${mail_from}" password="${mail_password}" subject="AutomationTest" mailport="25">
<from address="${mail_from}" />
<to address="${mail_to}" />
<!-- 发送附件 -->
<fileset dir="${testng.output.dir}/html/">
<include name="index.html"/>
</fileset>
<message>This email was sent automatically by ANT. < >Please check the automation test report by the link below. <>If there are any questions, please contact with QA. Thank you! <>< >
http://${ComputerName}/${testng.output.dir}/html/index.html
</message>
</mail>
</target>
<target name="all">
<antcall target="regression" />
<!-- <antcall target="sendmail" /> -->
</target>
</project>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。