As a general rule, security testing should be done right before a deployment of a system, network, application or solution. It is ideal to test any software before is put into production. As cyber threats evolve rapidly, security testing should be performed on a regular basis to ensure system's resistance to newly discovered cyber threats.