The test for coke hardness is Hardgrove Grindability Index or HGI. The test method is ASTM D5003. It is the same method for testing the grindability of coal which is covered in test ASTM D409.
The test uses a crushed sample of petroleum coke and then screens that sample for a particular size. That is put into the Hardgrove machine that is a ball mill and run 60 revolutions. The amount of 75 micron and smaller particles is weighed and then a chart is used to determine the HGI of the petroleum coke. Smaller numbers mean harder coke. Coke with an HGI of less than 30 is difficult to sell as it is too hard to grind without special equipment. Coke with an HGI of 40 or less can be sold but sometimes at a discount due to the hardness. An HGI of 80 or higher is very soft coke.