1 Exhibit 5.1 Reed Smith Shaw & McClay LLP 435 Sixth Avenue Pittsburgh, PA 15219-1886 Phone: 412-288-3131 Fax: 412-288-3063 July 18, 1997 Tollgrade Communications, Inc. 493 Nixon Road Cheswick, PA 15024 Re: Post-Effective Amendment No. 1 to Registration Statement on Form S-8 Gentlemen: We have acted as counsel to Tollgrade Communications, Inc., a Pennsylvania corporation (the "Company"), in connection with its Post-Effective Amendment No. 1 to Registration Statement on Form S-8, File No. 333-4290 (the "Registration Statement"), relating to 392,500 shares of Common Stock, par value $.20 per share, of the Company (the "Common Stock") which may be purchased by certain employees or non-employee directors of the Company pursuant to stock options granted them in connection with services provided to the Company (the "Options"). In rendering our opinion below, we have assumed that any previously issued shares reacquired by the Company and delivered under the Options will have been duly authorized, validly issued and fully paid at the time of their original issuance. In connection with this opinion, we have examined, among other things: (1) the Articles of Incorporation and Bylaws of the Company, as amended to date; (2) actions taken by the Board of Directors of the Company on December 13, 1996 and February 17, 1997, authorizing the granting of the Options; and (3) the agreements governing the Options, as currently in effect. Based upon the foregoing and upon an examination of such other documents, corporate proceedings, statutes, decisions and questions of law as we considered necessary in order to enable us to furnish this opinion, and subject to the assumption set forth above, we are pleased to advise you that in our opinion the 392,500 shares of Common Stock being registered and which may be issued by the Company upon the exercise of the Options have been duly authorized, and upon such issuance such shares will, when sold, be validly issued, fully paid and nonassessable. In rendering the foregoing opinion, we have not examined the laws of any jurisdiction other than the laws of the Commonwealth of Pennsylvania and the federal laws of the United States of America and the foregoing opinion is limited to such laws. We hereby consent to the filing of this opinion as an Exhibit to the Registration Statement and to the use of our name in the Prospectus under the caption "Legal Opinion." Yours truly, /s/ Reed Smith Shaw & McClay PDG,Jr.