I tried but couldn't find the magic combination of eval, parse, expr that will make it work directly. When faced with situations like this I tend to use a brute force approach. Basically you build a string dynamically and execute it with eval(parse()). Using evalinsert allows clean insertion of parameters, in this case xbarname. Also, using the constructs \[ and ]\ allow for embedding of double quotes without the need to escape them, which also gives the code a cleaner look.
testname = "Temperature";
xbarname = "XBar of " || Testname;
cc_expr = evalinsert("\[
Control Chart(
Sample Label( :Sample ),
Chart Col( :Testcolumn, XBar( Box Plots( 1 ), Connect Points( 0 ), ), ),
SendToReport(
Dispatch(
{"^xbarname^"},
"2",
ScaleBox,
{Min( 1 ), Max( 1.5 ), Inc( 0.05 ), Minor Ticks( 1 )}
),
)
)]\");
eval(parse(cc_expr));