Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- a few new tests for examples section of the documentation
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
yql.url.v1=http://query.yahooapis.com/v1/public/yql | ||
yql.url=${yql.url.v1} | ||
|
||
yql.perf.iterations=100 | ||
yql.perf.threads=1 | ||
yql.perf.agent=1 | ||
yql.queries=SELECT * FROM search.web WHERE query='pizza',\ | ||
SELECT * FROM flickr.photos.search WHERE text='Cat' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<script xmlns="http://dtf.org/v1" name="simple_query"> | ||
<info> | ||
<author> | ||
<name>Rodney Gomes</name> | ||
<email></email> | ||
</author> | ||
<description> | ||
This test will simple query the various queries that are stored in the | ||
${yql.queries} property and make sure that YQL is capable of responding | ||
with some data. This does not of course validate the data or do any | ||
additional work and is simply part of a wiki example of how to use DTF | ||
for testing a service like YQL. | ||
</description> | ||
</info> | ||
|
||
<local> | ||
<createstorage id="INPUT" path="${dtf.xml.path}/input"/> | ||
<createstorage id="OUTPUT" path="${dtf.xml.path}/output"/> | ||
|
||
<loadproperties uri="storage://INPUT/yql.properties"/> | ||
</local> | ||
|
||
<function name="yql"> | ||
<param name="q" type="required"/> | ||
|
||
<urlencode result="q" source="${q}"/> | ||
<http_get uri="${yql.url}?q=${q}"/> | ||
<return>${http.get.body}</return> | ||
</function> | ||
|
||
<for property="query" range="${yql.queries}"> | ||
<log>querying [${query}]</log> | ||
<call function="yql" result="result"> | ||
<property name="q" value="${query}"/> | ||
</call> | ||
</for> | ||
|
||
</script> |