The Friedman test is a nonparametric alternative to the repeated-measures analysis of variance. You might use Friedman when you are evaluating a small sample, your hypothesis concerns ordinal outcomes, or you simply do not wish to make the assumptions required for repeated-measures ANVOA. The only assumptions made by the Friedman test are that the test variables are at least ordinal, and that their distributions are reasonably similar.

Rather than testing the hypothesis of a difference between related ordinal variables, you may wish to test a hypothesis that implies change in a binary outcome over repeated measurements or between multiple matched samples. If so, then you should consider using the Cochran Q test. Think of the Cochran Q test as an extension of the McNemar test used to assess change over two times or two matched samples. Unlike the Friedman test, the Cochran test is designed for use with binary variables.