Testcase Query Examples: Difference between revisions

From OLPC
Jump to navigation Jump to search
(move some notes here)
m (moved some doc over)
Line 1: Line 1:
Other ways to query for test cases than the query(s) on [[Test cases 8.2.0]]
Other ways to query for test cases than the query(s) on [[Test cases 8.2.0]]


Copy these to make your own.


== Basics ==
== Basics ==
Line 9: Line 10:


See [http://semantic-mediawiki.org/wiki/Help:Inline_queries#Output_formats Inline query output formats].
See [http://semantic-mediawiki.org/wiki/Help:Inline_queries#Output_formats Inline query output formats].




=== Query counting each test case ===
=== Query counting each test case ===

Revision as of 04:14, 15 August 2008

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

Copy these to make your own.

Basics

The basic query is

 {{#ask: [[Category:Test cases]] [[Build stream::joyride|Any]]  | additional options }}

One option you should always add is |default=Query for xyz found nothing?!, otherwise you'll have no indication a page has a query that isn't working.

See Inline query output formats.


Query counting each test case

There are {{#ask: Build stream::joyride

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

}} <== automatically generated! test cases in Category:Test cases with Property:Build 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: Build stream::joyride

 | format=embedded 
 | embedformat=h4
 | default=No articles found in Category:Test cases with Property:Build 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 Build stream==BADVALUE returns a count of {{#ask: Build stream::BOGUS VALUE

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

}}