How to Create New FeatureTests
From OSIS Open Source Identity Systems
Contents |
Creating New FeatureTests
Step 1: Create the Test Page
- Go to the FeatureTest category for your interop, eg Category:I3 FeatureTests
- Enter your test name, prefixed with 'FeatureTest-" into the input box and click "Create"
- Use the Template Help Page to determine template parameters
- After the template (ie the lines starting with {{ and ending with }}) add instructions like so:
=== Instructions === # Step 1 # Step 2 # Step 3
Step 2: Editing the FeatureTest List
Each solution role has it's own FeatureTest List. Open the FeatureTest List Template for the solution role:
- Template:Information_Card_Identity_Selector_FeatureTest_List
- Template:Information_Card_Browser_Add-On_FeatureTest_List
- Template:Information_Card_Identity_Provider_FeatureTest_List
- Template:Information_Card_Relying_Party_FeatureTest_List
- Template:OpenID_Identity_Provider_FeatureTest_List
- Template:OpenID_Relying_Party_FeatureTest_List
When editing the FeatureTest List, leave most of the lines intact, copying the line entitled DT Form Header to add a test area, and the line entitled DT Form Field to add a test. You must know the name of the FeatureTest and the identifier.
{{DT Form Header |Nice Area Name |value= | width=180 | color=#ccbbcc}}
{{DT Form Field |[[I3:FeatureTest-Some Test |Some Test]] |value={{FTResultValue | {{{ns}}}:FTI3-SOMETYPE-SOMEAREA-SOMENUMBER-x-{{{name|}}} }} }}
Step 3: View a Solution and Verify FeatureTest List
Each Solution displays a FeatureTest List for every solution role it plays. You should be able to view a FeatureTest List for any solution that has a solution role matching the primarysolution parameter listed in the test, and see your new feature listed for that solution. You should see a link on the left side of the FeatureTest List that goes to your test page, and a link on the right side of the FeatureTest List that creates a new page when you click on it. MAKE SURE THAT YOU VERIFY THAT THE NAME OF THAT TEST PAGE MATCHES THE IDENTIFIER OF THE TEST!!!
Step 4: Add the Feature Test to the Feature's Test List
- Open The Feature List for the solution role being tested:
- Click the "edit" button for the feature that your new test proves
- Add a link to your test within the "testlist" parameter (add the parameter if it doesn't exist, order doesn't matter)
==Feature-Basic use of PIN-protected Self-Issued Information Card==
{{Feature
|feature_id = Basic use of PIN-protected Self-Issued Information Card
|feature_type = interop
|solution_role = Information Card Identity Selector
|feature_description = Support for self-issued cards protected by a user-set PIN number
|test_description = Use a self-issued information card protected by a PIN number
|testlist = [[I3:FeatureTest-Your Feature Test]]
|acceptable = Required and selected optional claims delivered
|not_acceptable = Additional claims delivered or some selected claims not delivered
}}
- Your test should now be visible for the feature - and when you click the link within the feature and go to the test, you should now see the feature listed under "Features Proven".
- Add the same test link to all features tested by this FeatureTest
