trial and error

trial and error (a method of discovery, solving problems, etc., based on practical experiment and experience rather than on theory; the process of trying something again and again until you succeed. You don't know exactly what you're doing when you get started, but you figure it out in the process) — метод проб и ошибок

by / through trial and error (by experimenting, in an empirical manner) — методом проб и ошибок, опытным путем

Example 1: She learned to cook by trial and error.

Example 2: Eventually, by trial and error, he found the correct combination.

Example 3: Success in Silicon Valley often emerges through trial and error.

Example 4: Much of what we consider to be true science was discovered by trial and error.