Don't confuse . (source the script) with ./ (Under the current directory)
. test.sh = source test.sh
Now the shell looks for the directories in the path ($PATH). If it finds test.sh in any of those directories it will execute or you would have to go to that directory and do a ./test.sh
To avoid doing a ./ do the following.
Edit your .bash_profile or .bashrc file under your home directory.
add the line
export PATH='$PATH:.' -> i.e. add a . to the end of the path
If this doesn't work for you change the single quotes to double quotes.
Run echo $PATH to check if the path is correct.