diff --git a/DPPP/test/CMakeLists.txt b/DPPP/test/CMakeLists.txt
index e3a2cff476926840ca93791c55febf97082ac610..f05ae29d1628b4db9ba3363524663375c92b2fae 100644
--- a/DPPP/test/CMakeLists.txt
+++ b/DPPP/test/CMakeLists.txt
@@ -31,7 +31,7 @@ configure_file(findenv.run_tmpl findenv.run_script)
 #add_test(tparse tparse.cc)
 #add_test(tBaselineSelection tBaselineSelection.cc)
 #add_test(tDemix)
-#add_test(tPredict)
+add_test(tPredict ${CMAKE_CURRENT_SOURCE_DIR}/tPredict.sh)
 add_test(tApplyBeam ${CMAKE_CURRENT_SOURCE_DIR}/tApplyBeam.sh)
 add_test(tGainCal ${CMAKE_CURRENT_SOURCE_DIR}/tGainCal.sh)
 #add_test(tH5Parm tH5Parm)
diff --git a/DPPP/test/tPredict.run b/DPPP/test/tPredict.run
index f8f77c514d6965d6c4194ed1e181dc0170662071..091eeff5a1592df3ed7cbaa8025a62d4e7a97c6e 100755
--- a/DPPP/test/tPredict.run
+++ b/DPPP/test/tPredict.run
@@ -3,6 +3,9 @@
 # Get the taql executable and srcdir (script created by cmake's CONFIGURE_FILE).
 source findenv.run_script
 echo "srcdirx=$rt_srcdir"
+pwd=`pwd`
+dpppexe=`readlink -f $pwd/../DPPP`
+echo dpppexe is $dpppexe
 
 # Set srcdir if not defined (in case run by hand).
 if test "$srcdir" = ""; then
@@ -24,7 +27,7 @@ tar zxf ${srcdir}/tPredict.tab.tgz
 echo "    select result of 0 rows" > taql.ref
 
 echo; echo "Test with beam, subtract"; echo
-cmd='NDPPP msin=tNDPPP-generic.MS msout=. msout.datacolumn=MODEL_DATA steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.usebeammodel=true predict.operation=subtract'
+cmd="$dpppexe msin=tNDPPP-generic.MS msout=. msout.datacolumn=MODEL_DATA steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.usebeammodel=true predict.operation=subtract"
 echo $cmd
 $cmd
 # Compare the MODEL_DATA column of the output MS with the original data minus the BBS reference output.
@@ -34,7 +37,7 @@ $taqlexe $taqlcmd > taql.out
 diff taql.out taql.ref  ||  exit 1
 
 echo; echo "Test without beam, add"; echo
-cmd='NDPPP msin=tNDPPP-generic.MS msout=. msout.datacolumn=MODEL_DATA steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.usebeammodel=false predict.operation=add'
+cmd="$dpppexe msin=tNDPPP-generic.MS msout=. msout.datacolumn=MODEL_DATA steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.usebeammodel=false predict.operation=add"
 echo $cmd
 $cmd
 # Compare the MODEL_DATA column of the output MS with the original data plus the BBS reference output.
@@ -49,7 +52,7 @@ open table="tPredict.parmdb"
 adddef Gain:0:0:Real values=3.
 adddef Gain:1:1:Real values=3.
 EOL
-cmd='NDPPP msin=tNDPPP-generic.MS msout=. msout.datacolumn=MODEL_DATA steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.applycal.parmdb=tPredict.parmdb predict.operation=subtract'
+cmd="$dpppexe msin=tNDPPP-generic.MS msout=. msout.datacolumn=MODEL_DATA steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.applycal.parmdb=tPredict.parmdb predict.operation=subtract"
 echo $cmd
 $cmd
 # Compare the MODEL_DATA column of the output MS with the original data minus the BBS reference output.
@@ -59,7 +62,7 @@ $taqlexe $taqlcmd > taql.out
 diff taql.out taql.ref  ||  exit 1
 
 echo; echo "Test without beam"; echo
-cmd='NDPPP msin=tNDPPP-generic.MS msout=. steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky'
+cmd="$dpppexe msin=tNDPPP-generic.MS msout=. steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky"
 echo $cmd
 $cmd
 # Compare the DATA column of the output MS with the BBS reference output.
@@ -69,7 +72,7 @@ $taqlexe $taqlcmd > taql.out
 diff taql.out taql.ref  ||  exit 1
 
 echo; echo "Test with beam"; echo
-cmd='NDPPP msin=tNDPPP-generic.MS msout=. steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.usebeammodel=true'
+cmd='$dpppexe msin=tNDPPP-generic.MS msout=. steps=[predict] predict.sourcedb=tNDPPP-generic.MS/sky predict.usebeammodel=true'
 echo $cmd
 $cmd
 # Compare the DATA column of the output MS with the BBS reference output.