Hi, I'm Dr STeve. I agree that cats can start inappropriate urination and defecation, but it typically begins shortly after introducng new pets to the home. THis doesn't sound like the case in your situation. Even if it woould happen to be behavioral, there are no specific tests for behavioral problems. You need to check out any medical problem possibilities first , then if these tests are negative ,then a diagnosis of behavioral may be the problem. Taking her to the vet is by far the best decision and here is what I would ask about. THe most common reason that i see for this problem is a urinary tract ( bladder ) infection. THis is very common on female cats as they approach middle age. THe pooing may just be due to the fact that she is so frustratd by having a bladder infection. Bladder infections can cause pain and bladder spasms and these can hit very suddenly causing a cat to urinate ( and in some cases defecate at the same time) right where they are, especially if they are not used to going on a litter and in her case not be able to make it outside. THis condition is easy t diagnose with a urine sampl. If you cna get one off the floor ( if she should happen to do it again) all that is needed is an eye dropper or two put into a plastic bag or dish. Then yor vet can test it immediately and you will know. If you are not able to get a sample , your vet may be able to express one at the exam time or possibly keep her for a short time until they can get the sample.
If there is no bladder infection , there are blood tests to run for kidney infection and if your vet determines that it is behavioral there are steps and medicines available to help with that. Your vet will be well versed in this area as well. I hope I have given you some ideas and things to discuss with your vet and that it has helped. If it has would you please click the submit button so i may receive credit for my answer. I will check later tonight and over the next few days to see if you have more questions. If you don't mind, I wold welcome an update when you have seen your vet. Thanks for using just answer and good luck.