A Wiki Linking tip and a simple test matrix


A fellow sent an email the other day concerning a feature in OneNote 2010 we call "wiki linking."  He had been creating links to pages from existing pages by going to the page for which he wanted a link, right clicking the page, selecting "Copy link to this page" and then going back to the original page to paste the link on it.  He was looking for a quicker way to do this.  This is exactly a scenario for which wiki linking will help.


To summarize wiki linking, if you type a name surrounded by  two "[" characters and finished with two "]" characters, OneNote will try to link to a page with that name.  If no page exists with that title at all, OneNote will create a new page in the current section, give it the title contained in the bracket characters and link to it.  So far, this seems like a relatively straightforward area to test and doesn't look like it would take much time.  There's a little more to the algorithm I want to cover so I can mention some test cases for this feature.


So, suppose Bob wants to create a link to an existing page titled "Physics."   All he would have to do is type [[physics]] and OneNote will look in the current section for a page named "physics".  If one exists, it will link to that page.  If one does not exist in the current section, OneNote will check the notebook for a page named "physics" and use it if found.  If there is not a page in he current notebook with that name, then OneNote will check all open notebooks.  If no page is found, then OneNote will create the new blank page, otherwise the existing page will be used.


If this was all there was to this feature, the test matrix is pretty easy to explain.  It would look something like this:



Use Page

Keep Looking

Create New Page

Page exists in section




Page does not exist in current section




Page exists in current notebook




Page does not exist in current notebook




Page exists in non-current notebook




Page does not exist in non-current notebook





An obvious condition is not listed here - astute readers have probably already figured it out. 


I'll give some clues for non-obvious cases which are not listed here - mismatched languages (possible in shared notebooks), page exists in recycle bin, a previous page version is the only page with the matching title and so on…  The test matrix here is actually quite large.  And I haven't even mentioned the behavior of OneNote when you click the link.  This testing discussion is centered only on the linking of a page to the typed text.


Earlier I mentioned this doesn't look - at first glance - that it would take a tester too much time to test this feature.  But consider how long it will take to create the test notebooks for the matrix above.  Once you create the notebook, you can just copy/paste them onto a test machine, but that still takes time.  You need to allot a small amount of time to delete the notebooks from each row before adding the notebooks from the next row of the matrix since you need to have a specific configuration to test with at each step.  A reasonable estimate for the testing needed for this feature would be about 2-3 hours or so.


The obvious condition I haven't mentioned yet but you've probably figured out is the case in which there are several pages all with the same name.  In this case, OneNote will link to the first page in the current section, or current notebook, or first opened notebook.  Since you can have multiple notebooks open all with multiple pages with the same name, you can see how that simple matrix above will quickly add new rows.  This blows the estimate up to (let's say) 4-6 hours.


Automation is a key tool used to reduce the amount of test time needed.  I won't go over that here, but even an easy to describe feature like this can see some significant time savings when automated tests are created.


Questions, comments, concerns and criticisms always welcome,


Comments (3)

  1. User Ed says:

    Great tip! OneNote is great but sometimes difficult. Have you checked out TechNet Wiki?

  2. John says:

    No, never heard of it. What is technet wiki?

  3. Bruce says:

    the [[text]] trick will also link to notebooks or sections. I haven't been able to figure out how it handles duplicate names, but once the current section/notebook doesn't have a page, it's more complicated – it doesn't seem to default to looking for a specific type (in some of my test cases it finds the notebook first, other times it finds a section or page first), and it doesn't necessairly find the newest or oldest one. Does anyone know how it picks?

Skip to main content