Ant可以加载URL吗?
我有一个Ant构建脚本,它当前启动一个服务器,然后等待URL解析,然后为我执行一些Selenium测试。这个任务看起来是这样的Ant可以加载URL吗?,ant,Ant,我有一个Ant构建脚本,它当前启动一个服务器,然后等待URL解析,然后为我执行一些Selenium测试。这个任务看起来是这样的 <target name="test.selenium" depends="compile.constants, launch.server" description="Run the Selenium tests"> <echodesc/> <waitfor maxwait="1" maxwaitunit="minute"
<target name="test.selenium" depends="compile.constants, launch.server" description="Run the Selenium tests">
<echodesc/>
<waitfor maxwait="1" maxwaitunit="minute" checkevery="2" checkeveryunit="second">
<http url="http://127.0.0.1:${product.listenport}/"/>
</waitfor>
<exec executable="${deps.python}" spawn="false" failonerror="true" dir="src">
<arg line="manage.py test --selenium-only" />
</exec>
</target>
“NUL”使我能够在不处理创建的新文件的情况下使用get,因此这非常适合作业\o/您可以使用
get
任务调用http url。这里有更多信息
例如
就是这样!dest=“NUL”是我正在搜索的提示!
<target name="shutdown.server" depends="init.properties" description="Shutdown the server">
<get src="http://127.0.0.1:${product.listenport}/QUIT" dest="NUL"/>
</target>