Let's take a look at one of the ways we expose inserting equations into OneNote 2010 Tech Preview from the test point of view. While working on this article, I realized that there a large amount of test work I need to be complete before I can actually get to the fun and gratifying part of equations - seeing them on a OneNote page! – that I can’t simply jump in and test equations without laying out a foundation of the testing perspective. The groundwork that needs to be done to test a feature can sometimes seem overwhelming, but that is the nature of software testing. While I would really like to jump in and get into an equation and show how to test it, there are many details that I need to explain first that would make understanding verifications too hard to explain. So, I am starting here with the basics, and will build up to testing a math equation over time. Bear with me and chime in if you think this is useful!
First things first, though, and I need to define a term.
A "math zone," in the context of this article, is the element on a OneNote page that recognizes input into it should be treated as an equation. There are some specific items I need to verify to know that the given element is a "math zone." From a back box point of view, two possible verifications are
There are two very obvious ways to insert an equation into OneNote and let's concentrate on those first.
On a very high level, I need to verify these each work as expected. I'm choosing these two only because the expectation of choosing each is pretty simple. Another few ways of inserting equations (via cut/copy/paste as an example) are possible, but let's stay focused on # 1 above for now.
The ribbon is expected to show the standard set of equations that Word also displays so clicking it and verifying it matches Word appears to be an easy, short test. There is much more expected, though, and I need to be nitpicky in my verifications. What I hope to show here is even this simple test of selecting one of these equations has many details that need to be tracked.
First, I need to ensure the equations shown when the dropdown is selected are the same set as Word.
I did not find any bugs with this - it's pretty simple. You may see a few more at once depending on your screen resolution - notice the scroll bar to move down to the rest. But I had a few expectations about what I could have expected to go wrong (and every tester should have clear expectations about the result of a test or else you aren't testing - you are playing - but that is a whole new subject). For instance, I could imagine a scenario in which clicking the drop down did nothing. Or, that it showed a blank list of equations. An example of something I did not reasonably expect to happen was the list only being partially complete, or the equations to not show anything to the right of the = signs. These results would have surprised me.
Fortunately, the drop down shows the equations exactly as expected! Selecting each one also seems an easy test. The verification list might, if you are not used to testing, seem to be long. First, let's simply examine the ribbon dropdown behavior.
Once I have completed these tests, I can move on to actually getting an equation on a page! I'll move on to that next.
I'm also compelled to point out that, from the testing point of view, I'm taking for granted that the ribbon tester has verified that the button can be added, the Insert tab of the ribbon actually shows, and that the ribbon is responding properly to mouse clicks and keyboard shortcuts. This helps me avoid duplicating test efforts at that level and lets me get to focusing on my feature.
Next up, I'll go over the verifications for adding one of the canned equations to the page.
Questions, comments, concerns and criticisms always welcome,