REST Async Search API: basic search
| ||
| comment | Try a "meta:all" search. | |
| open | /v3/async/search?search=search | |
| pause | 3000 | |
| assertElementPresent | //sid | |
| storeText | //sid | sid |
| comment | Verify our search is in the job list | |
| openAndWait | /v3/async/jobs | |
| verifyAttribute | //envelope/jobs/search[@sid = ${sid} ]/@sid | ${sid} |
| comment | Can it also be found when given a search id? | |
| openAndWait | /v3/async/jobs?sid=${sid} | |
| verifyAttribute | //envelope/search/@sid | ${sid} |
| comment |
Verify our search has a timeline.
There is some timing dependency here with timeline. It seems to take a while for the timeline to return and render (the raw) xml to the browser. We need to pause before we assert/verify. |
|
| pause | 4000 | |
| openAndWait | /v3/async/timeline?sid=${sid} | |
| assertElementPresent | //envelope/timeline/bucket | |
| comment | Verify our search has a summary. | |
| openAndWait | /v3/async/summary?sid=${sid} | |
| assertElementPresent | //envelope/summary/key/modes/value | |
| comment | Are there any events available for this search? | |
| openAndWait | /v3/async/events?sid=${sid} | |
| assertElementPresent | //envelope/results/r/m[@k="_raw"] | |
| assertElementPresent | //envelope/results/r/m[@k="_cd"] | |
| assertElementPresent | //envelope/results/r/m[@k="_index"] | |
| comment | Are 'count' and 'offset' params honored? | |
| openAndWait | /v3/async/events?sid=${sid}&count=1&offset=0 | |
| verifyText | //envelope/results/r/m[@k="_serial"] | 0 |
| openAndWait | /v3/async/events?sid=${sid}&count=1&offset=1 | |
| verifyText | //envelope/results/r/m[@k="_serial"] | 1 |
| openAndWait | /v3/async/events?sid=${sid}&count=2&offset=0 | |
| verifyText | //envelope/results/r[1]/m[@k="_serial"] | 0 |
| verifyText | //envelope/results/r[2]/m[@k="_serial"] | 1 |