I need to stop an iMac update that is already downloaded and ready to install
The installer is usually in Applications. "Install macOS Sierra.app". Delete that, empty the trash (or direct-delete in Terminal).


  I am testing software on an El Capitan system


Get a virtual machine like Fusion or Parallels. Set up a new install of the OS and make a snapshot. Whatever happens next can be restored to the initial state in 30 seconds by restoring the snapshot.

VMs are also capable of running the next version. I run El Capitan right now and have VMs from 10.5 to Sierra. And with enough memory it's possible to have them all open at once.