Guidelines for test cases and test plans
Wiki's are free-form and allow for different contributors to format pages in different ways. This wiki, however, is being used to store and collate test cases in a structured way. It is therefore important that we follow standard mark-up conventions across the wiki so that multiple test cases can be combined into longer test plan documents while retaining a consistant layout.
Layout for test cases
For test cases we follow this basic template:
= xxxxxxx = '''Affected packages:''' package-name ##xxx-001 === Case name === '''Case ID: ''' xxx-001 1. ... ##endcases
Note the use of a level 1 heading for the page and a level 3 heading for the case itself. The 'xxx' is replaced by a suitable 3-letter code and must be lower case. See a longer hardware support template at HardwareTestcaseTemplates.
Example Case
Affected packages: app Test Case ID: TC-APP-001 Test Case Description: My cool test Actions: Do this! Do that! Expected Result: Something happened! Something else happened!
Layout for test cases for multiple packages
Sometimes it's advantageous to create test cases on one page (e.g. Applications/UbuntuOne) for multiple packages. In this case, you want to have sections for each package you're testing and include those test cases on the individual package page.
The page with test cases follows this template:
= xxxxxxx = ##startsection-xxx '''Affected packages:''' package-name ##xxx-001 === Case name === '''Case ID: ''' xxx-001 1. ... ##endsection-xxx ---- ##startsection-yyy '''Affected packages:''' package-name ##yyy-001 === Case name === '''Case ID: ''' yyy-001 1. ... ##endsection-yyy ##endcases
And then we include the sections on the appropriate package page like this:
<<Include(Applications/UbuntuOne, , from="##startsection-xxx",to="##endsection-xxx")>>
Layout for test plans
These are longer documents that pull multiple test cases into a test plan.
'''Test plan for ...''' <intro> '''Filing bugs:''' Please refer to https://help.ubuntu.com/community/ReportingBugs for best practice on filing bugs and in addition add the <something> tag. ~+<<TableOfContents(2)>>+~ = Install = <<Include(Install/DesktopWhole, , from="##uwi-001",to="##endcases")>> = Main test section 1 = <<Include(System/ExampleContent, , from="##exc-001",to="##endcases")>> == Sub section 1 == <<Include(Hardware/Keyboard/Builtin, , from="##kbt-002",to="##kbt-003")>>
Note the use of level 1 and 2 headings to break up the document and a table of contents. Inividual included test cases bring in their own level 3 heading.