Home

Test Case Template

%3CLINGO-SUB%20id%3D%22lingo-sub-871353%22%20slang%3D%22en-US%22%3ETest%20Case%20Template%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871353%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20test%20template%20I%20am%20building%20that%20would%20require%20steps%20in%20the%20test%20case%20cycle%20to%20be%20updated%20depending%20on%20what%20platform%20the%20user%20would%20be%20testing%20when%20selecting%20this%20via%20a%20Drop%20Down%20Content%20Control.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EFor%20example%2C%20if%20a%20test%20analyst%20selected%20iOS%2C%20the%20form%20would%20auto%20populate%20fields%20individually%20(one%20row%20for%20one%20task)%20with%20a%20Drop%20Down%20Control%20Box%20for%20a%20pass%20or%20fail.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThis%20could%20mean%20there%20is%20a%20list%20of%2020%20items%20within%20the%20single%20test%20case%20that%20may%20need%20to%20be%20populated%20based%20on%20the%20platform%20the%20test%20analyst%20chose.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20have%20attached%20a%20template%20I%20have%20been%20working%20on%20which%20I%20hope%20makes%20some%20sense.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%20would%20be%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-871353%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-880134%22%20slang%3D%22en-US%22%3ERe%3A%20Test%20Case%20Template%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-880134%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F413997%22%20target%3D%22_blank%22%3E%40dan78h%3C%2FA%3E%26nbsp%3BThe%20first%20step%20is%20to%20save%20the%20document%20you%20posted%20as%20a%20macro-enabled%20template%20(*.dotm)%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20second%20step%20is%20to%20store%20each%20step's%20test%20action%20and%20its%20result%20in%20the%20template%20as%20an%20AutoText%20entry%2C%20using%20a%20naming%20convention%20that%20includes%20the%20step%20number%20as%20one%20part%20of%20the%20name%20and%20the%20platform%20(or%20some%20abbreviation%20of%20it)%20as%20another%20part%20of%20the%20name.%20(See%20the%20%22AutoText%20in%20Word%202007%22%20section%20of%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwordmvp.com%2FFAQs%2FCustomization%2FAutoText.htm%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwordmvp.com%2FFAQs%2FCustomization%2FAutoText.htm%3C%2FA%3E%26nbsp%3Bif%20you%20need%20instructions.)%20Also%20store%20one%20copy%20of%20the%20%22Pass%2FFail%22%20content%20control%20as%20an%20AutoText%20entry.%20I've%20made%20a%20start%20on%20this%20step%20in%20the%20template%20that%20you%20can%20download%20from%20%3CA%20href%3D%22https%3A%2F%2Fjay-freedman.info%2FTest_Case_Template.dotm%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fjay-freedman.info%2FTest_Case_Template.dotm%3C%2FA%3E%2C%20with%20steps%20for%20the%20iOS%20and%20Android%20Device%20platforms%20only.%20I%20leave%20it%20to%20you%20to%20add%20AutoText%20entries%20for%20the%20rest%20of%20the%20platforms.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20last%20and%20largest%20step%20is%20to%20create%20a%20macro%20in%20the%20ThisDocument%20module%20of%20the%20template%2C%20naming%20the%20subroutine%20as%26nbsp%3BDocument_ContentControlOnExit(ByVal%20CC%20As%20ContentControl%2C%20Cancel%20As%20Boolean).%20That%20macro%20runs%20automatically%20any%20time%20the%20cursor%20moves%20out%20of%20any%20content%20control%20in%20a%20document%20that's%20based%20on%20this%20template.%20The%20code%20of%20the%20macro%20uses%20a%20Select%20Case%20statement%20to%20look%20at%20the%20value%20of%20the%20dropdown%20that%20was%20just%20exited%2C%20and%20uses%20that%20value%20to%20decide%20what%20to%20insert%20in%20the%20document.%20It%20updates%20the%20list%20of%20the%20Activation%20Type%20dropdown%20and%20creates%20the%20rows%20in%20the%20last%20table%20for%20the%20stored%20steps.%20Again%2C%20it's%20your%20job%20to%20insert%20similar%20code%20for%20the%20other%20platforms.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
dan78h
Occasional Visitor

Hello,

 

I have a test template I am building that would require steps in the test case cycle to be updated depending on what platform the user would be testing when selecting this via a Drop Down Content Control.


For example, if a test analyst selected iOS, the form would auto populate fields individually (one row for one task) with a Drop Down Control Box for a pass or fail.


This could mean there is a list of 20 items within the single test case that may need to be populated based on the platform the test analyst chose.


I have attached a template I have been working on which I hope makes some sense.

 

Any ideas would be appreciated.

1 Reply

@dan78h The first step is to save the document you posted as a macro-enabled template (*.dotm) file.

 

The second step is to store each step's test action and its result in the template as an AutoText entry, using a naming convention that includes the step number as one part of the name and the platform (or some abbreviation of it) as another part of the name. (See the "AutoText in Word 2007" section of https://wordmvp.com/FAQs/Customization/AutoText.htm if you need instructions.) Also store one copy of the "Pass/Fail" content control as an AutoText entry. I've made a start on this step in the template that you can download from https://jay-freedman.info/Test_Case_Template.dotm, with steps for the iOS and Android Device platforms only. I leave it to you to add AutoText entries for the rest of the platforms.

 

The last and largest step is to create a macro in the ThisDocument module of the template, naming the subroutine as Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean). That macro runs automatically any time the cursor moves out of any content control in a document that's based on this template. The code of the macro uses a Select Case statement to look at the value of the dropdown that was just exited, and uses that value to decide what to insert in the document. It updates the list of the Activation Type dropdown and creates the rows in the last table for the stored steps. Again, it's your job to insert similar code for the other platforms.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies