Your query is not showing any result as "TEST" login is not db_owner (as your query will only work for db_owner)
and you can use use youydb
go
SELECT P.name
FROM sys.database_principals AS P
--inner join sys.database_role_members AS RM
--ON RM.role_principal_id = P.principal_id
inner join sys.sysusers AS U
on p.principal_id = U.uid
and U.name = 'test'
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)