Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ant可以加载URL吗?_Ant - Fatal编程技术网

Ant可以加载URL吗?

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"

我有一个Ant构建脚本,它当前启动一个服务器,然后等待URL解析,然后为我执行一些Selenium测试。这个任务看起来是这样的

<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>