There are a number of test suites for 6502, each with their own intentions and peculiarities.
For the most part they aim to test emulators, which are subject to different bugs than CPU implementations, and therefore the effective coverage may not be as good as expected. Such tests are generally self-checking - there is no golden results file of bus activity - and generally assume some specific platform's I/O facilities.
Self-testing (6502 ROMs and programs):
- Wolfgang Lorenz' C64 suite exhaustive, excluding decimal mode, uses C64 facilities to chain each program (stubbing instructions here by Christer Palm) (testsuite on Tom Seddon's site) (11kbyte total) (some description)
- Ruud Baltissen's 8k test ROM from his VHDL 6502 core (includes source, but only a subset of files found in the previous version)
- NES test rom by Kevin Horton (24kbyte) (haven't found source for this, he says he hasn't got clean source to release)
- AllSuiteA.asm from the hcm-6502 (verilog) project. ROM available. Load at and reset to 0xf000 and set irq vector to 0xf5a4.
- Decimal mode tests by Bruce Clark ADC/SBC (tests C but not N, V or Z flags.) Other Decimal tests here.
- Test code supplied with Rob Finch's 6502 core (archive.org) (1500 bytes)
- py65 tests by Mike Naberezny (python)
It can also be useful to run a monitor or BASIC interpreter, although the test coverage isn't very high and the run time is. Favourites are: Apple 1 monitor, Apple 1 integer BASIC, C64 BASIC, BBC OS and BASIC.