Generally residency is looked at as where you receive your mail, what the address is on your drivers license, where you reside the majority of the year. For military members, that sometimes differs. If they're deployed and they can still claim Texas as their home state and where they reside when they're not deployed, then they can still get a divorce in Texas.
In most situations, the easiest way to prove how long you've lived in Texas is by signing an affidavit that states when you moved here. If this information is contested, however, courts will require further evidence to back up your statement. Things such as utility bills and leases typically suffice, as well as mail addressed to you that has a postmark on it showing when you began receiving mail here.
Find out more about Trusler Legal PLLC - The Austin Divorce Lawyers.