
660 S.W.2d 149 (1983)
Robert Don LIPSEY, Appellant,
v.
Waldine F. LIPSEY, Appellee.
No. 10-83-250-CV.
Court of Appeals of Texas, Waco.
October 27, 1983.
Rehearing Denied November 17, 1983.
*150 J.E. Jackson, Bobby J. Phillips, Jackson & Phillips, Carthage, for appellant.
Bob J. Cavender, Stephen L. Swanson, Cavender & Swanson, Pasadena, for appellee.

OPINION
THOMAS, Justice.
The central question presented by this appeal is: does Appellant's will contest constitute a claim for affirmative relief within the provisions of Rule 164?[1] We answer the question in the negative and affirm.
Appellee filed an application to probate the will of her husband in the county court of Leon County. Appellant, the decedent's son, filed a will contest, which asks the trial court in the prayer to find that decedent "did not have the requisite testamentary capacity to make the will offered for probate by [Appellee], and additionally that [Appellee] used undue influence upon the decedent ..., and that said will should be declared null and void and not admitted to probate...."[2] The contested proceeding was transferred to the district court pursuant to Tex.Prob.Code § 5 (1980). Thereafter, the trial court granted Appellee a non-suit, which provided that "the above action be and is hereby non-suited as to [Appellee's] application for probate of the last will and testament of [decedent], ... without prejudice to her right to reinstate or refile same for probate...."
Appellant's sole point of error contends the trial court erred in dismissing Appellee's application to probate the will after Appellant had sought affirmative relief by his will contest. Under this point, Appellant argues that: such a dismissal materially affects the legal status of the subject matter of the suit; the dismissal splits one cause of action on which each party seeks affirmative relief, where the relief sought depends upon the legal status of the will; the will contest constituted a compulsory counter-claim under Rule 97(a); and Appellee *151 is in the position of a defendant, rather than plaintiff, so that she is not entitled to a non-suit under Rule 164. We overrule this point of error.
The right of a plaintiff to discontinue the entire proceeding by non-suit under Rule 164 can only be defeated when the defendant, by a counter-claim, seeks "affirmative relief". The defendant must not only pray for affirmative relief, but he must state facts showing he has a cause of action. Greenberg v. Brookshire, 640 S.W.2d 870 (Tex.1982). If a defendant is doing nothing more than resisting plaintiff's recovery, the pleading cannot be construed as requesting affirmative relief. Hoodless v. Winter, 80 Tex. 638, 16 S.W. 427 (1891). Rule 164 is entitled to a liberal construction with respect to a plaintiff's right to a non-suit. Smith v. Columbian Carbon Co., 145 Tex. 478, 198 S.W.2d 727 (1947).
We have not been citednor have we foundany authority holding that a will contest, which alleges lack of testamentary capacity and undue influence and contains a prayer that the purported will be declared null and void, constitutes a counter-claim for affirmative relief. Generally, in order for a pleading to be construed as a counter-claim for affirmative relief, the defendant must allege facts which show he has a cause of action, independent of plaintiff's claim, on which he might proceed to recover benefits, compensation, or relief, even though plaintiff abandons his cause of action or fails to establish it. (Emphasis added). Newman Oil Co. v. Alkek, 614 S.W.2d 653 (Tex.Civ.App.Corpus Christi 1981, writ ref'd n.r.e.).
Appellant's will contest, which is predicated on undue influence, constitutes the pleading of an affirmative defense on which he had the burden of proof. Hassell v. Pruner, 286 S.W.2d 266 (Tex.Civ.App. Amarillo 1956, writ ref'd n.r.e.). Appellee carried the burden of establishing decedent's testamentary capacity under Tex. Prob.Code § 88 (1980). We hold Appellant's defensive pleading seeks nothing more than to resist Appellee's effort to establish decedent's purported will as a valid testamentary instrument. The will contest cannot stand alone as a separate cause of action, independent of Appellee's action to establish the will, and it fails, therefore, to meet the test of Alkek, supra. Appellant cannot show that his pleading will stand alone if Appellee fails to establish her cause or, as here, abandons it. The fact that Appellant sought through his prayer to have the court declare the will null and void does not, in our view, elevate his defensive pleading to the level of a claim for affirmative relief.
Since Appellant's will contest does not constitute a counter-claim for affirmative relief, Appellee was entitled to have the entire proceeding dismissed under Rule 164 by her non-suit.
Appellant's defensive pleading cannot be viewed as a counter-claim under Rule 97(a). Zemaco, Inc. v. Navarro, 580 S.W.2d 616 (Tex.Civ.App.Tyler 1979, writ dism'd). Under the facts presented, Appellee occupied the status of a plaintiff and was entitled to the benefit of Rule 164.
Affirmed.
NOTES
[1]  All references to rules in this opinion are to the Texas Rules of Civil Procedure.
[2]  Appellant also sought a declaratory judgment that the will was invalid as a testamentary instrument, but he does not assert on appeal that his pleading for declaratory judgment constitutes a claim for affirmative relief. In any event, we hold the validity of the entire will cannot be questioned through a declaratory judgment proceeding. Kausch v. First Wichita Nat. Bank of Wichita Falls, Tex., 470 F.2d 1068 (5th Cir.1972); Howard Hughes Med. Inst. v. Lummis, 596 S.W.2d 171 (Tex.Civ.App.Houston [14th Dist.] 1980, writ ref'd n.r.e.).
