The following principles were stated in the judgment of Lord Greene, the Master of the Rolls, in Associated Provincial Picture Houses Ltd v Wednesbury Corporation  1 KB 223:
It is true the discretion must be exercised reasonably. Now what does that mean? Lawyers familiar with the phraseology commonly used in relation to exercise of statutory discretions often use the word "unreasonable" in a rather comprehensive sense. It has frequently been used and is frequently used as a general description of the things that must not be done. For instance, a person entrusted with a discretion must, so to speak, direct himself properly in law. He must call his own attention to the matters which he is bound to consider. He must exclude from his consideration matters which are irrelevant to what he has to consider. If he does not obey those rules, he may truly be said, and often is said, to be acting "unreasonably." Similarly, there may be something so absurd that no sensible person could ever dream that it lay within the powers of the authority. Lord Justice Warrington in Short v Poole Corporation  Chancery 66 at pages 90 and 91, gave the example of the red-haired teacher, dismissed because she had red hair. That is unreasonable in one sense. In another sense it is taking into consideration extraneous matters. It is so unreasonable that it might almost be described as being done in bad faith; and, in fact, all these things run into one another.
[Lord Greene MR test] The court is entitled to investigate the action of the local authority with a view to seeing whether they have taken into account matters which they ought not to take into account, or, conversely, have refused to take into account or neglected to take into account matters which they ought to take into account. Once that question is answered in favour of the local authority, it may be still possible to say that, although the local authority have kept within the four corners of the matters which they ought to consider, they have nevertheless come to a conclusion so unreasonable that no reasonable authority could ever have come to it. In such a case, again, I think the court can interfere. The power of the court to interfere in each case is not as an appellate authority to override a decision of the local authority, but as a judicial authority which is concerned, and concerned only, to see whether the local authority have contravened the law by acting in excess of the powers which Parliament has confided in them.
Per Lady Hale in Braganza v BP Shipping Ltd  UKSC 17 at para.24:
The first limb [of the test of the reasonableness in Associated Provincial Picture Houses Ltd v Wednesbury Corporation  1 KB 223 above] focusses on the decision-making process – whether the right matters have been taken into account in reaching the decision. The second focusses upon its outcome – whether even though the right things have been taken into account, the result is so outrageous that no reasonable decision-maker could have reached it. The latter is often used as a shorthand for the Wednesbury principle, but without necessarily excluding the former.