EXHIBIT 5.01 ------------ September 23, 1999 Keynote Systems, Inc. 2855 Campus Drive San Mateo, California 94043 Gentlemen/Ladies: At your request, we have examined the Registration Statement on Form S-8 (the "REGISTRATION STATEMENT") to be filed by you with the Securities and Exchange Commission (the "COMMISSION") on or about September 23, 1999 in connection with the registration under the Securities Act of 1933, as amended, of an aggregate of 7,374,395 shares of your Common Stock (the "STOCK") subject to issuance by you upon the exercise of: (1) stock options granted by you under your 1996 Stock Option Plan (the "1996 PLAN"); (2) stock options granted by you under your 1999 Stock Option Plan (the "1999 OPTION PLAN"); (3) stock options granted or to be granted by you under your 1999 Equity Incentive Plan (the "1999 EQUITY PLAN"); and (4) purchase rights granted or to be granted by you under your 1999 Employee Stock Purchase Plan (the "1999 PURCHASE PLAN"). The plans referred to in clauses (1) through (4) above are collectively referred to in this letter as the "PLANS." In rendering this opinion, we have examined the following: (1) your registration statement on Form S-1 (File No. 333-82781) filed with, and declared effective by, the Commission on September 23, 1999, together with the Exhibits filed as a part thereof, including without limitation, each of the Plans and related stock option grant or purchase and exercise agreements; (2) your registration statement on Form 8-A (File No. 000-27241), filed with the Commission on September 3, 1999, together with the order of effectiveness issued by the Commission therefor on September 23, 1999; (3) the Registration Statement, together with the Exhibits filed as a part thereof; (4) the Prospectuses prepared in connection with the Registration Statement; (5) the minutes of meetings and actions by written consent of the shareholders and Board of Directors that are contained in your minute books that are in our possession; (6) the stock records that you have provided to us (consisting of a list of shareholders of even date herewith and a list of option and warrant holders of even date herewith respecting your capital and of any rights to purchase capital stock, which you have represented to us are true and complete as of their dates); and Keynote Systems, Inc. September 23, 1999 Page 2 (7) a Management Certificate addressed to us and dated of even date herewith executed by the Company containing certain factual and other representations. We have also confirmed the continued effectiveness of your registration under the Securities Exchange Act of 1934, as amended, by telephone call to the offices of the Commission and have confirmed your eligibility to use Form S-8. In our examination of documents for purposes of this opinion, we have assumed, and express no opinion as to, the genuineness of all signatures on original documents, the authenticity of all documents submitted to us as originals, the conformity to originals of all documents submitted to us as copies, the legal capacity of all natural persons executing the same, the lack of any undisclosed terminations, modifications, waivers or amendments to any documents reviewed by us and the due authorization, execution and delivery of all documents where due authorization, execution and delivery are prerequisites to the effectiveness thereof. As to matters of fact relevant to this opinion, we have relied solely upon our examination of the documents referred to above and have assumed the current accuracy and completeness of the information obtained from public officials and records referred to above. We have made no independent investigation or other attempt to verify the accuracy of any of such information or to determine the existence or non-existence of any other factual matters; HOWEVER, we are not aware of any facts that would cause us to believe that the opinion expressed herein is not accurate. We are admitted to practice law in the State of California, and we express no opinion herein with respect to the application or effect of the laws of any jurisdiction other than the existing laws of the United States of America and the State of California. In connection with our opinion expressed below, we have assumed that, at or prior to the time of the delivery of any shares of Stock, the Registration Statement will have become effective under the Securities Act of 1933, as amended, that the registration will apply to such shares of Stock and will not have been modified or rescinded and that there will not have occurred any change in law affecting the validity or enforceability of such shares of Stock. Based upon the foregoing, it is our opinion that the 7,374,395 shares of Stock that may be issued and sold by you upon the exercise of: (1) stock options granted under the 1996 Plan; (2) stock options granted under the 1999 Option Plan; (3) stock options granted or to be granted under the 1999 Equity Plan; and (4) purchase rights granted or to be granted under the 1999 Purchase Plan, when issued and sold in accordance with the applicable plan and stock option or purchase agreements entered into or to be entered into thereunder, and in the manner referred to in the relevant Prospectus associated with the Registration Statement, will be validly issued, fully paid and nonassessable. Keynote Systems, Inc. September 23, 1999 Page 3 We consent to the use of this opinion as an exhibit to the Registration Statement and further consent to all references to us, if any, in the Registration Statement, the Prospectus constituting a part thereof and any amendments thereto. This opinion speaks only as of its date and we assume no obligation to update this opinion should circumstances change after the date hereof. This opinion is intended solely for the your use as an exhibit to the Registration Statement for the purpose of the above sale of the Stock and is not to be relied upon for any other purpose. Very truly yours, FENWICK & WEST LLP By: /s/ Jeffrey R. Vetter ------------------------------------