Upload an image to a node and term
You need to define a Behat step for it. A possible way would be to define a method to be executed before creating a node (labelled with @beforeNodeCreate), to upload the file first and then to attach its fid to the appropriate file field of the node or term.

A possible way of doing it (for Drupal 8) is explained in detail here: https://webscope.co.nz/testing-image-and-file-fields-with-behat