> I want people to see test12-100051 not /test12,name,100051,name_id,name_details
> From what I've read this can be accomplished only through a redirect.
What you've read is wrong, then.
If you want users to see http://www.example.com/test12-100051, then that is what you must link to in the HTML on your pages.
When a client request for the URL-path /test12-100051 arrives at your server as the result of a user clicking that link on your page, rewrite it to the physically-existing file located at /test12,name,100051,name_id,name_details
RewriteRule ^([^-]+)-([0-9]+)$ /$1,name,$2,name_id,name_details [L]
I assume you've got a script at that location, although it seems an odd filepath...
I'm also assuming that "name", "name_id", and "name_details" are fixed literal strings. If they are not, then the whole plan will fail, because mod_rewrite will have no idea what the value of those variables should be, since the only information it has to work with is that contained in the string "test12-100051".
Anyway, the most important point is that already pointed out by g1smd: The link that you link to on your pages *is* the URL, and that URL will be seen and clicked by users, and followed and listed by search engines.
Jim