Definitions of trial and error:

  • noun:   experimenting until a solution is found