Testcase Query Examples

From OLPC
Jump to navigation Jump to search

Other ways to query for test cases than the query(s) on Test cases 8.2.0

See Inline query output formats.

Query counting each test case

There are {{#ask: Stream::joyride

 | format=count
 | default=No articles found in Category:Test cases with Property:Stream of Joyride?

}} <== automatically generated! test cases in Category:Test cases with Property:Stream of Joyride.

Query displaying each test case

If the pages you are including are small, you can embed them with format=embedded. This is like transcluding each page with {{:Title of page}} {{:Another page}} ..., but dynamic.

{{#ask: Stream::joyride

 | format=embedded 
 | embedformat=h4
 | default=No articles found in Category:Test cases with Property:Stream of Joyride?

}}

Bug: query for a disallowed value sometimes still works

Bug: if I query for a bogus value, it counts all of them. A query for Stream==BADVALUE returns a count of {{#ask: Stream::BOGUS VALUE

 | format=count
 | default=No articles found in Category:Test cases with Property:Stream of BOGUS VALUE?

}}