solana-test-validator is basically a full validator run locally.
ProgramTestContext looks more light-weight.
Does testing through
ProgramTestContext skip any checks compared to
solana-program-test uses the same runtime as
solana-test-validator, with a few differences:
- solana-program-test gives you a
BanksClientrather than an
RpcClient, which has a bit less functionality
- solana-test-validator constantly moves slots forward, whereas
ProgramTestContextis locked to a slot until you use
warp_to_slot(). This means that you have control over time with
As an on-chain program developer, you don't need to worry about any differences between the two, other than these.