tar on a directory mydir will archive hidden files and hidden subdirectories, but tar from within mydir with a * wildcard will no
mydir
*
With wildcard it will not work. You have to specify . (current directory) if you mean full directory including hidden files. You can do
tar -cvpzf test.tgz .