How to find more bugs while testing

How to find more bugs while testing

by Tim Hunt -
Number of replies: 3
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Following an embarassing bug that has been around since Moodle 2.1, and which no amout of testing has found until some poor user hit it, I wanted to pass on the following tip. When testing, and when you are inputting some text (e.g. a forum post, or answering an essay or shortanswer question, try to include all the tricky things that might cause Moodle to break, for example:

< > & &lt; &gt; &amp; ' " \ \' \" \\ 日本語 % %% $@NULL@$ @@TEST@@

Some things that are there:

  • Characters that have special meaning in HTML.
  • The escaped equivalents of those.
  • Single and double quote characters, and backslashes.
  • Back-slash escaped versionso of those.
  • Unicode characters outside the usual ASCII range. (That is Japan in Japanese.)
  • Various other characters that occasionally get used with special meantings.

Hopefully automated testing will start to do this too. See MDL-37858.

Average of ratings: Useful (7)