I just wanted to add that I was wondering about this myself. I just started using NameMapping a couple of days ago, so it's a somewhat new topic for me. The reason I'm using it is so that my code is neater and more maintainable, but when I record it *still* creates long and unwieldy references. Is there any way to modify this behavior?
I've just checked how recording with aliases works (TC 6.30), and it worked fine for me. Before recording, please make sure that object names are mapped by unique sets of properties and that the objects meet mapping criteria.
To add to that, I would say that you should probably also make sure that you aren't mapping to fields which are unique to each instance of the applicaiton, like Window Handle, etc. You should probably only be mapping to a couple properties which will be true in the future instances of that application.
9 out of 10 people I prove wrong agree that I'm right. The other person is my wife.
One quick thing to check is the "Tools | Options | Engines | Recording | Record short names when possible" setting.
Beyond that, make sure that the objects have been properly mapped by (restarting the application and then) right-clicking on a NameMapped object, in the NameMapping tree, and telling TestComplete to "Show in object browser". Verify that the object it finds is the object you're trying to record against. (You can check various properties and highlight it on the screen.) Is the object's FullName property exactly what winds up in the recorded script, or is it a bit different?