This is probably going to be different for every engine.
For the early days of the Space Shuttle Main Engine (SSME), it went like this
Every engine that went on the orbiter was acceptance tested. Unless there was a rebuild, which
would trigger the need for a new acceptance or green run test, testing was done once for each
engine. If the engine passed, it was put into the flight pool. Engine 2005, earmarked for
the first orbital flight of the SSP, was the first of the three-engine cluster to be delivered to SSC,
in April 1979, for acceptance testing. Engines 2006 and 2007 followed. The acceptance test
protocol at this point in the program included a 1.5-second start verification, a 100-second
calibration firing, and a 520-second flight demonstration test. Engine 2007 was the first to
complete the acceptance test requirements, and to qualify as the first flight engine for the
SSP. Following successful completion of the test series, the three engines were shipped to
KSC for installation on Columbia.
Source SPACE TRANSPORTATION SYSTEM
HAER No. TX-116
The shuttle program also infrequently conducted a "Flight Readiness Firing" using a vehicle stacked for flight, during which all three SSMEs were briefly ignited and then shut down on the pad. This was only done after delivery of a new Orbiter or if there was some compelling circumstance.
Test firing the engine accumulated "wear and tear" on it just like running it on the vehicle did.