SagePay has 2 test options, a simulator and a sandbox system. Note that for each, a different test url is required (see docs).
It is recommended a test is run with the simulator first, before the sandbox. You`ll need to contact SagePay for a sandbox account if you don`t already have one.
Simulator:
https://test.sagepay.com/simulator/
Sandbox
https://test.sagepay.com/mysagepay/login.msp
Test cards for sandbox account:
Visa: 4929000000006
Visa Delta (Debit): 4462000000000003
Visa Electron UK Debit: 4917300000000008
Mastercard: 5404000000000001
UK Maestro: 5641820000000005
International Maestro: 300000000000000004
American Express: 374200000000004
Japan Credit Bureau (JCB): 3569990000000009
Diners Club: 36000000000008
Laser Cards: 6304990000000000044
Security:
CV2: 123
Billing Address: 88
Billing PostCode: 412
3D Secure password: password