hp-testpage: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/hp-testpage - from package: hplip

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/hp-testpage - from package: hplip

You may install the required package with command apt-get install {package}
Error in other languages:
hp-testpage: bevel nie gevind nie
hp-testpage: comandă negăsită
hp-testpage: comando não encontrado
hp-testpage: commande introuvable
hp-testpage: command not found
hp-testpage: käsku ei ole
hp-testpage: không tìm thấy lệnh
hp-testpage: komanda nerasta
hp-testpage: Kommando nicht gefunden.
hp-testpage: kommandot finns inte
hp-testpage: komut yok
hp-testpage: nie znaleziono polecenia
hp-testpage: níor aimsíodh an t-ordú
hp-testpage: no se encontró la orden
hp-testpage: no s'ha trobat l'ordre
hp-testpage: opdracht niet gevonden
hp-testpage: parancs nem található
hp-testpage: perintah tidak ditemukan
hp-testpage: príkaz nenájdený
hp-testpage: příkaz nenalezen
hp-testpage: команда не найдена
hp-testpage: командата не е открита
hp-testpage: 命令找不到
hp-testpage: コマンドが見つかりません