Yes, you can do that by using Command substitution:
Test="$(grep 'test: \K(\d+)' $file),$(grep 'test1: \K(\d+)' $file)"
The variable=$(..) called Command substitution and it's means nothing more but to run a shell command and store its output to a variable or display back using echo command. For example, display date and time:
echo "Today is $(date)"
and for store it to a variable:
SERVERNAME=$SERVERNAME="$(hostname)"
you can concatenate to output:
echo $"$(hostname),$(date)"
the result will be:
hostnameyourhostname,Tue Jan 24 09:56:32 EET 2017