snippet vs test piece

snippet

noun
  • A small part of something, such as a song or fabric; sample. 

  • A text file containing a relatively small amount of code, useless by itself, along with instructions for inserting that code into a larger codebase. 

verb
  • To produce a snippet (small part) of; to excerpt. 

  • To make small cuts, to snip, particularly with scissors. 

test piece

How often have the words snippet and test piece occurred in a corpus of books? (source: Google Ngram Viewer )